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