Access Point / Host Discovery
Always resolve the Access Point for your trading account before using the Trader API, including account-scoped REST requests and WebSocket connections. Start with the Gateway host shown in the DNS widget, then use the returned Access Point for that account.
Before you start
- Create or obtain your API key identifier and private signing key.
- Have the trading account ID that your API key can access.
- Copy the Gateway host from the DNS widget in Key Management.
The DNS widget provides the Gateway host for discovery. It is not the account Access Point. Call the discovery endpoint below with the account ID before making Trader API requests for that account.
Gateway host and account Access Point
| Value | Use |
|---|---|
| Gateway host from the DNS widget | Send the discovery request to this host. |
access_point returned by discovery | Use the returned Access Point for this account's REST requests and WebSocket connections. |
Do not copy a hostname from an example or guess the Gateway URL from an account Access Point.
Discovery is rate limited. Resolve the Access Point once and cache it in your application instead of calling discovery before every request.
Resolve an Access Point programmatically
The Gateway provides GET /v1/trading/access-point. It requires account_id as a query parameter: a trading account ID represented as an unsigned 64-bit integer string.
- 1Use the Gateway host from the DNS widget as the discovery base URL.
- 2Build
/v1/trading/access-point?account_id=123456, replacing123456with your account ID. - 3
- 4Send the request and read
access_pointfrom the HTTP200response. - 5Use the returned Access Point for this account's REST requests and WebSocket connections. Sign each REST request or WebSocket handshake using the exact path and query sent to the server.
For signed Trader API GET requests, the EXN-IDEMPOTENCY-KEY header is required and its value must be empty. Do not omit the header. The signed idempotency_key field in EXN-DATA must also be an empty string.
Request-shape example
Set EXN_DISCOVERY_BASE_URL to the Gateway base URL from the DNS widget without a trailing slash. Replace the account ID and authentication placeholders before sending. This example does not generate a signature.
curl "${EXN_DISCOVERY_BASE_URL}/v1/trading/access-point?account_id=123456" \
-H "EXN-API-KEY: <your-api-key>" \
-H "EXN-IDEMPOTENCY-KEY;" \
-H "EXN-TIMESTAMP: <fresh-unix-milliseconds>" \
-H "EXN-SIGN-VERSION: 1" \
-H "EXN-DATA: <base64url-encoded-signed-data>" \
-H "EXN-SIGN: <base64url-encoded-signature>"
The semicolon in curl's EXN-IDEMPOTENCY-KEY; option sends the required header with an empty value. For this example, the signed path is /v1/trading/access-point?account_id=123456, not a full URL.
Illustrative HTTP 200 response; the URL is a placeholder:
{
"access_point": "https://access-point.example",
"account_id": "123456"
}
access_point is a URL. The echoed account_id is a string, not a JSON number.
Continue with the selected host
- 1Send your first REST request to read account details. Replace the example host and account ID with your selected values.
- 2Sign the exact request path and query as described in Request signing. The signed
pathis not a full URL. - 3For streams, follow Subscribe to WebSocket Events. Sign the handshake as
GETusing the exact connection path and query sent to the server.
If discovery fails
| HTTP status | What to check |
|---|---|
400 | Check the required account_id query parameter and request format. |
401 | Check the API key, signed headers and signature. |
403 | Check access to the requested account. |
429 | Retry after the time indicated by Retry-After or retry_after. |
500 | Read the response's description for more information. |
503 | The service is temporarily unavailable; retry later. |
If the Gateway host is unavailable, obtain it from Key Management before sending the discovery request. Do not switch to a hostname copied from an example.