Last active
April 28, 2020 02:22
-
-
Save ypochien/c8f3f2245b0f7ece59328968c96e12f4 to your computer and use it in GitHub Desktop.
[SAMPLE] Sinopac Shioaji Login and print contracts ready message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shioaji as sj | |
import datetime | |
api = sj.Shioaji() | |
def cb_contract(msg): | |
print(datetime.datetime.now(), msg) | |
api.login("USERID","PASSWORD" ,contracts_timeout=0 ,contracts_cb=cb_contract) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment