---
updatedAt: 2026-03-26T12:27:31.000Z
agentTools:
  projectIndex: https://public-api.tradelocker.com/llms.txt
---

# Fetch JWT token

Returns JWT `accessToken` and `refreshToken`.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "Trading API",
    "version": "2.11.0",
    "title": "Trading API",
    "contact": {}
  },
  "tags": [
    {
      "name": "Auth",
      "description": "JWT access and refresh tokens, list of all accounts."
    }
  ],
  "paths": {
    "/auth/jwt/token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Fetch JWT token",
        "description": "Returns JWT `accessToken` and `refreshToken`.",
        "operationId": "getJWTTokens",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCredentials"
              }
            }
          },
          "description": "User credentials - email, password, server",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JWTTokensResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://demo.tradelocker.com/backend-api"
    },
    {
      "url": "https://live.tradelocker.com/backend-api"
    }
  ],
  "components": {
    "schemas": {
      "UserCredentials": {
        "type": "object",
        "required": [
          "email",
          "password",
          "server"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "User email",
            "example": "john@email.com"
          },
          "password": {
            "type": "string",
            "description": "User password",
            "example": "secretPassword123"
          },
          "server": {
            "type": "string",
            "description": "Name of the broker server, also used during web login.",
            "example": "SERVER"
          }
        },
        "title": "User credentials"
      },
      "JWTTokensResponse": {
        "type": "object",
        "required": [
          "accessToken",
          "refreshToken",
          "expireDate"
        ],
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "Access token for accessing /trade APIs.",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0cmFkZWxvY2tlci1hcGkiLCJhdWQiOiJ0cmFkZWxvY2tlci1hcGktdHJhZGVycyIsInR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJzdWIiOiJPU1AjREVWQ0xMOWc0aXNUT0VpS2pmTmRKdzEzIiwidWlkIjoiMTQ0YmYyODctNTFlNC00YjQyLWJlNTQtYzBkZTRmMTE3ODMzIiwiYnJhbmQiOiJPU1AiLCJpYXQiOjE2ODUxMTY3OTMsImV4cCI6MTY4NTEyMDM5M30.cyDXRqUNVX6h5rtZb7m30vNIwEoYN7xUU2jfGM-Cf90"
          },
          "refreshToken": {
            "type": "string",
            "description": "Refresh token for refreshing JWT tokens.",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0cmFkZWxvY2tlci1hcGkiLCJhdWQiOiJ0cmFkZWxvY2tlci1hcGktdHJhZGVycyIsInR5cGUiOiJyZWZyZXNoX3Rva2VuIiwic3ViIjoiT1NQI0RFVkNMTDlnNGlzVE9FaUtqZk5kSncxMyIsInVpZCI6IjE0NGJmMjg3LTUxZTQtNGI0Mi1iZTU0LWMwZGU0ZjExNzgzMyIsImJyYW5kIjoiT1NQIiwiaWF0IjoxNjg1MTE2NzkzLCJleHAiOjE2ODU3MjE1OTN9.GKNglolZzX76lKjTsrQ28MpmLTfU0A_T7vCMrsojLcg"
          },
          "expireDate": {
            "type": "string",
            "description": "Access token expire date.",
            "example": "2023-05-26T16:59:53.000Z"
          }
        },
        "title": "JWTTokensResponse"
      }
    }
  }
}
```