clientId = "Your application Client ID" request. PROTOBUF_PORT, TcpProtocol ) def onError ( failure ): # Call back for errors print ( "Message Error: ", failure ) def connected ( _ ): # Callback for client connection print ( " \n Connected" ) # Now we send a ProtoOAApplicationAuthReq request = ProtoOAApplicationAuthReq () request. PROTOBUF_DEMO_HOST client = Client ( host, EndPoints. Usage from ctrader_open_api import Client, Protobuf, TcpProtocol, Auth, EndPoints from ctrader_open_pb2 import * from ctrader_open_pb2 import * from ctrader_open_pb2 import * from ctrader_open_pb2 import * from twisted.internet import reactor hostType = input ( "Host (Live/Demo): " ) host = EndPoints. Makes handling request responses easy by using Twisted deferreds It contains the Open API messages files so you don't have to do the compilation This package uses Twisted and it works asynchronously. A Python package for interacting with cTrader Open API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |