Skip to main content
GET
/
api
/
v1
/
balance
Get Balance
curl --request GET \
  --url https://api.example.com/api/v1/balance \
  --header 'Authorization: <authorization>'
{
  "status": "success",
  "message": 10000
}

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization
string
required
Bearer token for authenticationFormat: Bearer <your_jwt_token>

Response

status
string
The status of the request. Returns "success" on successful retrieval.
message
number
The user’s current account balance

Response Examples

{
  "status": "success",
  "message": 10000
}
{
  "error": "Unauthorized"
}
{
  "status": "error",
  "message": "User not found"
}
{
  "error": "Token expired or invalid ❌"
}

Error Codes

Status CodeDescription
200Balance retrieved successfully
401Unauthorized - Missing or invalid authentication token
404User not found
500Internal server error or failed to fetch balance from database

Code Example

cURL
curl --location 'https://api.exness.com/api/v1/balance' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
JavaScript
const response = await fetch('https://api.exness.com/api/v1/balance', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
  }
});

const data = await response.json();
console.log('Current balance:', data.message);
Python
import requests

url = 'https://api.exness.com/api/v1/balance'
headers = {
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
}

response = requests.get(url, headers=headers)
data = response.json()
print(f"Current balance: {data['message']}")

Build docs developers (and LLMs) love