Skip to navigation

Your First API Call

This guide walks you through making your first successful API call to the Tradovate Partner API, covering authentication, request structure, and response handling.

Prerequisites

Before making your first API call, ensure you have:

  • ✅ Partner API credentials (API key and secret)
  • ✅ Development environment set up
  • ✅ HTTP client ready (curl, Postman, or code library)

If you haven’t completed these steps, start with our 5-Minute Quickstart.

Step 1: Authenticate and Get Access Token

All API requests require a valid access token. Here’s how to obtain one:

POST
/v1/auth/accesstokenrequest
const url = 'https://demo.tradovateapi.com/v1/auth/accesstokenrequest';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: '{"name":"string","password":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Response
{
"errorText": "string",
"hibpHint": "EmailAndPasswordCompromised",
"accessToken": "string",
"expirationTime": "2024-01-15T09:30:00Z",
"passwordExpirationTime": "2024-01-15T09:30:00Z",
"userStatus": "Active",
"userId": 1,
"name": "string",
"hasLive": true,
"hasSimPlus": true,
"showKIDs": true
}

If you’re unfamiliar with authentication, please read the Auth Overview section.

Step 2: Make Your First Data Request

Now let’s retrieve your user profile information:

GET
/v1/auth/me
const url = 'https://demo.tradovateapi.com/v1/auth/me';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Response
{
"errorText": "",
"userId": 123456789,
"name": "jdoe",
"fullName": "John Doe",
"email": "jdoe@example.com",
"emailVerified": true,
"isTrial": false,
"organizationName": "Acme Trading Co.",
"currentAccountPlan": "Pro Plus",
"currentMDSubs": [
"marketDataPremium",
"newsFeed"
],
"currentBalance": 2540.75,
"activePlugins": [
"advancedCharting",
"autoTrader"
]
}