Skip to content

API overview

Base URLs, the public and signed surfaces, response conventions, and a first request against the Nexwest API.

Updated Nov 4, 2026Builders2 min read
On this page

The Nexwest API exposes the same state the chain uses. Public reads require no authentication; writes are signed actions sent to the exchange endpoint.

Base URLs

EnvironmentRESTWebSocket
Mainnethttps://api.nexwest.appwss://api.nexwest.app/ws
Testnethttps://api.testnet.nexwest.appwss://api.testnet.nexwest.app/ws

All requests use JSON. The Content-Type header must be application/json. Responses are UTF-8 JSON with string-encoded decimal values for prices and sizes.

Two surfaces

SurfaceMethodAuthPurpose
InfoPOST /infoNoneMarket data, account state, history
ExchangePOST /exchangeSignedOrders, cancels, transfers, leverage
WebSocketwss://None for public; signed for userReal-time streams and posted actions

Public data needs no key

You can read books, candles, funding, and public account state without an API wallet. A wallet is only required to sign state-changing actions.

First request

code
curl -s https://api.nexwest.app/info \
  -H "Content-Type: application/json" \
  -d '{"type":"meta"}'

Response conventions

  • Prices and sizes are strings to preserve precision.
  • Timestamps are milliseconds since the Unix epoch.
  • Addresses are lowercase hex with a 0x prefix.
  • Enums are lowercase strings, except HTTP methods and order sides.
  • An empty result is null, [], or {} depending on the endpoint; it is never an error.

Errors

Errors return a non-2xx status and a JSON body:

code
{
  "status": "err",
  "response": "Insufficient margin to place order"
}

See error codes for the full list and retry guidance.

Versioning

The API is versioned by behavior, not by URL. Breaking changes are announced in the changelog at least 30 days before deployment. Additive fields are not considered breaking.

Rate limits

Limits are applied per address and per IP. The default is 1,200 weight per minute, with heavier endpoints consuming more weight. See rate limits.

Next steps

Was this page helpful?