Guys, have mercy on me. I need help before I start believing someone in IT is playing a joke on me.
I have been trying for several days to connect a Python trading bot to the Tradovate/NinjaTrader API. I really believe I am following the correct steps, but I keep getting the same authentication error.
Here is my setup:
-
Live funded Tradovate/NinjaTrader account with over $1,000 equity.
-
API Access subscription is active ($25/month — I haven’t even started trading and I’m already down for the year).
-
Created API keys.
-
Created a dedicated API password for the key.
-
Endpoint being used:
https://live.tradovateapi.com/v1/auth/accesstokenrequest
- Python script prompts me for:
-
Tradovate username: Honda54
-
Password: dedicated API key password
-
CID: I enter only the number, no “cid:” text
-
Secret: I copy/paste the secret key
The payload structure is basically:
{
“name”: “Honda54”,
“password”: “[dedicated API password]”,
“appId”: “HullBot”,
“appVersion”: “1.0”,
“cid”: 14111,
“sec”: “[secret key]”,
“deviceId”: “[generated UUID]”
}
The test script does NOT place orders. It only tries to get the access token, list the account, and look up MES.
Here is the error I keep getting:
C:\Users\sergi\OneDrive\Desktop\bot>python tradovate_connection_test.py
TRADOVATE CONNECTION TEST
This will NOT place any orders.
It only tests login + account list + MES product lookup.
Tradovate username: Honda54
Tradovate password:
API key / cid: 14111
API secret / sec:
Requesting Tradovate access token…
Auth status: 200
AUTH RESPONSE DID NOT INCLUDE accessToken
{
“errorText”: “Incorrect username or password. Please try again, noting that passwords are case-sensitive.”
}
Things I have already tried:
-
Regular Tradovate login password
-
Dedicated API password
-
New API keys
-
Old API keys archived by NinjaTrader API Support
-
Fresh CID and Secret
-
Live endpoint instead of demo endpoint
-
Confirmed account is Live & Active
-
Confirmed CID is being sent as an integer, not a string
Still the same exact error.
At this point, I am probably missing something simple, but I cannot see it anymore. If anyone has run into this exact Tradovate API authentication issue and solved it, I would seriously appreciate the help.
And when this bot finally works and I become Trader of the Year, I will absolutely give this forum credit in my acceptance speech.
Thank you,
Sergio Castro