For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support Center
OverviewAPIResources
OverviewAPIResources
  • REST API Endpoints
    • GETGet Timestamp
    • GETO IDC User Info
      • POSTAccess Token Request
      • GETChallenge
      • POSTCountry Is Banned
      • POSTGet Product
      • GETJ WKS
      • GETMe
      • POSTO Auth Token
      • GETProducts
      • GETRenew Access Token
      • POSTSearch
      • GETWell Known Openid Configuration
Support Center
LogoLogo
REST API EndpointsAuthentication

O Auth Token

POST
https://demo-d.tradovateapi.com/v1/auth/oauthtoken
POST
/v1/auth/oauthtoken
1const url = 'https://demo-d.tradovateapi.com/v1/auth/oauthtoken';
2const options = {
3 method: 'POST',
4 headers: {'Content-Type': 'application/json'},
5 body: '{"grant_type":"string"}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
200Successful
1{
2 "access_token": "string",
3 "refresh_token": "string",
4 "token_type": "string",
5 "expires_in": 1,
6 "refresh_token_expires_in": 1,
7 "error": "string",
8 "error_description": "string",
9 "id_token": "string"
10}
### Used to exchange your OAuth code for an access token. Using the OAuth authorization delegation flow, we can send a request to verify that our users are who they say they are. For more information on using OAuth with the Tradovate API see our [OAuth JavaScript tutorial](https://github.com/tradovate/example-api-oauth).
Was this page helpful?
Previous

Products

Next
Built with

Used to exchange your OAuth code for an access token.

Using the OAuth authorization delegation flow, we can send a request to verify that our users are who they say they are. For more information on using OAuth with the Tradovate API see our OAuth JavaScript tutorial.

Request

This endpoint expects an object.
grant_typestringRequired<=64 characters
codestringOptional<=8192 characters
redirect_uristringOptional<=8192 characters
client_idstringOptional<=8192 characters
client_secretstringOptional<=8192 characters
httpAuthstringOptional<=8192 characters
refresh_tokenstringOptional<=8192 characters

Response

OAuthTokenResponse
access_tokenstring<=8192 characters
refresh_tokenstring<=8192 characters
token_typestring<=64 characters
expires_ininteger
refresh_token_expires_ininteger
errorstring<=64 characters
error_descriptionstring<=8192 characters
id_tokenstring<=8192 characters