POST
/
api
/
v1
/
token
User Authentication
curl --request POST \
  --url https://api-auth.trade.rails.xyz/api/v1/token \
  --header 'X-Api-Key: <x-api-key>' \
  --header 'X-Api-Secret: <x-api-secret>'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50VHlwZSI6InJldGFpbCIsImlzcyI6InN0YWdpbmcuZnVuZ2libGUueHl6Iiwic3ViIjoiNDcwMGYyODItMGFkNC00ZjU1LWIxNDItZGUzZTYwZDVkMTFlIiwiYXVkIjpbInN0YWdpbmctYXBwLmZ1bmdpYmxlLnh5eiJdLCJleHAiOjE3MTA4ODIxNzAsImlhdCI6MTcxMDg4MDM3MH0.Vgh_zKUgPSOPbVQ7nTHVg6jCYZ59nSJwqx6pfSDfGss",
  "token_type": "Bearer",
  "expires_in": 1800
}

Setup Required

You need to set up your API Keys first before using this endpoint.

Rate Limits

We reserve the right to ban API access if rate limits are not respected.Exceeding Rate Limits:
  • When a 429 is received, it’s your obligation as an API user to back off and not spam the API.
  • Repeatedly violating rate limits and/or failing to back off after receiving 429 responses could result in a ban.
This endpoint allows up to 20 requests per minute per API key. Exceeding this limit will result in a 429 Too Many Requests response.

Token Management

The generated token expires every 30 minutes. Since tokens remain valid for this duration, we recommend caching and reusing the token within your application to minimize unnecessary requests and avoid hitting the rate limit.

Headers

X-Api-Key
string
required

The API key for the user

X-Api-Secret
string
required

The API secret for the user

Response

200
application/json

The response is of type object.