Contact me:

Python+Bark将量化程序交易 推送到手机

步骤

ios15下载Bark

图片替换文本

Python交易操作的类中添加:

import requests, urllib3

 def send2bark(self,title, content):
        bl = "https://api.day.app/你的编号"
        urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
        try:
            msg = "{0}/{1}/{2}/?isArchive=1".format(bl, title, content)
            link = msg
            res = requests.get(link, verify=False)
        except Exception as e:
            print('Reason:', e)
            return
        return
posted @ 2021-11-20 22:37  impwa  阅读(852)  评论(0编辑  收藏  举报