Troubleshooting
Public request works but account read fails
Check all three credentials: apiKey, apiSecret and apiPassphrase. The passphrase is not your account password. Check key version, permissions, IP restrictions and the server clock. Confirm the account region matches apiRegion. Never paste credentials into an issue or screenshot.
Expected a sandbox but reached live services
The SDK has no supported testnet or demo constructor switch. Regions select live services. Use the test-order endpoint for supported validation, and never assume a URL override provides simulated funds.
Socket does not open
Classic V1 subscriptions require a REST token request before the WebSocket opens. Check both HTTP and WebSocket routes. When using a proxy, configure requestOptions for token requests as well as wsOptions.agent. See Proxies.
No private updates after connecting
Check subscription acknowledgements and exception events. Confirm the credentials, region, connection key and topic version. A quiet stream can be normal when no account activity occurs. A socket opening does not prove subscriptions succeeded.
Reconnected but state is stale
The SDK restores connections and subscriptions, not missed trades or your local store. Reconcile balances, open orders, completed orders and fills while buffering new events. Preserve newer terminal states when merging older REST results.
Order command timed out
Treat the result as unknown. Check private events and query with saved order identifiers. Keep a returned newOrderId after amendment. Do not submit a replacement until the original outcome is resolved.
Browser or mobile request fails
Keep private operations on a server. Check CORS, network access and the full configuration in the runtime guide. A successful import or bundle does not prove live connectivity. Do not expose API secrets or disable transport security to work around a connection failure.
Reporting a problem
Include the SDK version, runtime or framework version, client, exchange environment and method. For failed requests, include the HTTP status and exchange error code. Add a minimal request example or, for streams, the topic and connection events. Remove credentials, signatures and private account data before sharing.
TypeScript checks
The SDK works with both JavaScript and TypeScript. TypeScript is optional, but we strongly recommend it for SDK integrations: the included types help catch invalid method names, parameter shapes and response assumptions at build time, before requests reach the exchange. If you choose TypeScript, follow the TypeScript setup and run npx tsc --noEmit during development and CI. Type checking does not replace runtime validation or exchange-side checks.
Some runtimes can execute TypeScript directly. For example, Node.js type stripping supports erasable TypeScript syntax without a separate compiler, but does not check types. If your runtime cannot execute the syntax used by a TypeScript example, compile that example to JavaScript or use a compatible TypeScript runner. Examples with local .js imports that refer to TypeScript source files can use the compiler-based setup above. Plain JavaScript usage does not need any TypeScript tooling.