Sending your first Exness API request
Before you start executing live trading operations, it is highly recommended to verify your connection with a simple test request. By sending a basic request to view your account details, you can confirm that your API key, security signature, account access, and host connection are all working properly.
Before you begin
Make sure you have the following ready before making your request:
- Your API key and secret, stored securely.
- Your specific account ID.
- The base host URL or access point you are connecting to.
- The ability to generate your EXN-DATA and EXN-SIGN security headers.
Example requests
Here is an example of what a test request looks like using a command-line tool like curl:
curl -X GET "https://ap-4decef67.exness.com/v1/configuration/accounts/123456/account" \
-H "EXN-API-KEY: exnsk_your_public_api_key" \
-H "EXN-IDEMPOTENCY-KEY:" \
-H "EXN-TIMESTAMP: 1773656070123" \
-H "EXN-SIGN-VERSION: 1" \
-H "EXN-DATA: <base64url_encoded_payload>" \
-H "EXN-SIGN: <base64url_encoded_signature>"
If you are building this into your own code, here is a basic structural example using a validated signing helper:
# Pseudo-code: use your validated signing helper.
headers = sign_request(
method="GET",
path="/v1/configuration/accounts/123456/account",
body=None,
idempotency_key="",
)
response = http.get("https://ap-4decef67.exness.com/v1/configuration/accounts/123456/account", headers=headers)
What to expect in return
If your request is successful, the server will return your account configuration details. Depending on your setup, this will include information like your account currency, leverage, margin call level, and stop-out level.
Your response should look something like this:
{
"account_id": 123456,
"currency": "USD",
"leverage": "1:2000",
"margin_call_level": "60",
"stop_out_level": "0"
}
Always use the generated API Reference documentation as your final guide for the exact response fields to ensure your system processes the data correctly.
Troubleshooting common errors
If your request fails, refer to this table to diagnose the issue and find a quick solution.
| HTTP status / code | What It Means | How to Fix It |
|---|---|---|
| 401 / 1000 | Invalid API key | Check your API key value, expiration date, and account access. |
| 401 / 1001 | Invalid signature | Double-check your payload data, private key, timestamp, and data encoding format. |
| 404 / 2000 | Account not found | Verify your account ID and check your API key permissions. |
| 429 / 1 | Rate limited | You are sending requests too quickly; slow down and try again later. |
| 503 / 2 | Temporary unavailability | Our systems are temporarily busy; wait a moment and retry your request. |