N
</>

API Documentation

Integrate with NexChange using our RESTful API. All endpoints use JSON request/response bodies.

Base URL: https://api.nexchange.io
Auth: Bearer <JWT>

Rate Limiting

Auth routes: 10 req/min
Financial routes: 30 req/min
General API: 120 req/min

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in all responses.

🔐 Authentication

Register, login, manage sessions and 2FA.

🔌 WebSocket API

Endpoint: wss://api.nexchange.io/ws

The WebSocket connection provides real-time orderbook updates and trade data. Connection automatically sends heartbeat pings every 30 seconds.

Message Types

orderbook_update — Real-time orderbook bids/asks
trades — New trade executions with price, amount, timestamp
// Example message
{
  "type": "orderbook_update",
  "pair": "BTCUSDT",
  "bids": [{ "price": "67500.00", "amount": "0.5" }],
  "asks": [{ "price": "67510.00", "amount": "0.3" }]
}