POST /ws-tokens
Mint a WebSocket token (legacy)
Mint a WebSocket token (legacy).
operationId: createWsTokenLegacy
Not reachable through CCXT. WebSocket transport and token minting. Covered by the CCXT Pro channel map, not by a REST unified method.
Authentication: hmacAuth.
Legacy endpoint. Prefer POST /ws/token which supports both HMAC keys and registered agents. Returns a short-lived (60s), single-use token. GET /stream no longer consumes it (ENG-3128 removed token auth there), and GET /ws takes a token from POST /ws/token instead — so nothing on the current contract requires a token from this endpoint. Retained for clients that still call it; new integrations should use POST /ws/token with GET /ws.
Responses
200
— (no schema declared)
A minted WebSocket authentication token.
401
— (no schema declared)
HMAC authentication required
Example
curl -X POST 'https://exchange.nexus.xyz/api/exchange/ws-tokens' \
-H 'X-API-Key: nx_7f3a1b...' \
-H 'X-Timestamp: 1776033911836' \
-H 'X-Signature: <hmac-sha256>'import requests
headers = {
"X-API-Key": "nx_7f3a1b...",
"X-Timestamp": "1776033911836",
"X-Signature": "<hmac-sha256>"
}
response = requests.post("https://exchange.nexus.xyz/api/exchange/ws-tokens", headers=headers)
response.raise_for_status()
print(response.json())const response = await fetch("https://exchange.nexus.xyz/api/exchange/ws-tokens", {
method: "POST",
headers: {
"X-API-Key": "nx_7f3a1b...",
"X-Timestamp": "1776033911836",
"X-Signature": "<hmac-sha256>"
},
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());X-Signature is a placeholder: it is derived from this specific request. See Authentication for the canonical string and the HMAC rule.
Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.
Last updated

