I am seeing some people say that I must contact the CME to use this API ?
For API Access, to have an account is free. The Tradovate API Subscription cost $25/mo + you have to register with CME for Non Display Category A license which is $390/mo
I am trying to use the websocket, but all I am getting back is received message: a[{"s":200,"i":1}]
async def connect_websocket():
uri = “wss://md.tradovateapi.com/v1/websocket” # Replace with the actual WebSocket server URL
async with websockets.connect(uri) as websocket:
# Perform actions with the WebSocket connection
await websocket.send("authorize\n1\n\n" + res['accessToken']) # Send a message to the server
response = await websocket.recv() # Receive a message from the server
print(f"Received message: {response}")
# Perform actions with the WebSocket connection
#await websocket.send(f"md/getChart \n2\n\n"+"{symbol:'ESU3'}") # Send a message to the server
await websocket.send('md/subscribeQuote\n1135633\n\n{\"symbol\":\"ESU3\"}') # Send a message to the server
#await websocket.send(f"md/subscribeQuote\n2\n\n{json.dumps(payload)}") # Send a message to the server
response = await websocket.recv() # Receive a message from the server
print(f"Received message: {response}")
I get this from this from the above
Received message: o
Received message: a[{“s”:200,“i”:1}]
Received message: a[{“s”:200,“i”:1215633,“d”:{“errorText”:“Symbol is inaccessible”,“errorCode”:“UnknownSymbol”,“mode”:“None”}}]
Received message: a[{“s”:200,“i”:1156323,“d”:{“errorText”:“Symbol is inaccessible”,“errorCode”:“UnknownSymbol”,“mode”:“None”}}]
My token I am using has access to market data…