szmile2008 / FTPlugin

富途行情交易开放接口, 详见 "Plugins\PluginLocalServer\bin\readme.txt"
78 stars 43 forks source link

DEMO可以执行! #13

Open jinyuwang opened 8 years ago

jinyuwang commented 8 years ago

socket_to_futu_api = futu_comom_api.connect_to_futunn_api("localhost", 11111)

def connect_to_futunn_api(host, port): try: socket_futu_api = socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket_futu_api.settimeout(2) socket_futu_api.connect((host, port)) socket_futu_api.settimeout(None) except Exception as e: print("连接错误") print(e) return return socket_futu_api

hkpeter234 commented 7 years ago

你好, 請問一开始為什么执行不了? 因為我也遇到問題