Skip to content

Instantly share code, notes, and snippets.

@ypochien
Last active April 28, 2020 02:22
Show Gist options
  • Save ypochien/c8f3f2245b0f7ece59328968c96e12f4 to your computer and use it in GitHub Desktop.
Save ypochien/c8f3f2245b0f7ece59328968c96e12f4 to your computer and use it in GitHub Desktop.
[SAMPLE] Sinopac Shioaji Login and print contracts ready message.
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