Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Bearer token for authenticationFormat: Bearer <your_jwt_token>
Response
The status of the request. Returns "success" on successful retrieval.
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 Code | Description |
|---|
| 200 | Balance retrieved successfully |
| 401 | Unauthorized - Missing or invalid authentication token |
| 404 | User not found |
| 500 | Internal server error or failed to fetch balance from database |
Code Example
curl --location 'https://api.exness.com/api/v1/balance' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
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);
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']}")