Authentication

API keys, the base URL, and what a 401 means.

Every endpoint except /health needs an API key. Rave issues keys to partners; contact the Rave team to get one.

Send the key

Send the key as a bearer token in the Authorization header:

Authorization: Bearer ***

The examples in these docs use *** as a placeholder. Keep the real key in your backend secret manager and inject it at request time.

🚧

Backend only

Never put the key in browser code, mobile apps, public logs or support screenshots. If a key may have been exposed, ask Rave to rotate it.

The WebSocket stream reads the same header on the handshake. Browsers cannot set that header, so relay the stream through your own backend. See Price stream.

Trial access

Trial keys can have agreed pair, direction, recipient, order-size and usage allowances. Trial access does not include the WebSocket price stream: its handshake returns HTTP 403 before the upgrade. Use the REST endpoints included in your trial instead. See Errors for trial refusal codes.

Trial access to transaction records and wallet history is limited to trades quoted through that trial access. Knowing another trade's hash or wallet address does not grant access to it. See Track trades.

A missing or invalid key

The API answers 401 with a flat JSON body:

{ "error": "unauthorized" }

If you get a 401:

  • Check that your backend sends Authorization: Bearer *** with a valid key.
  • Check that the request comes from your backend, not from a browser.
  • Check that you call the direct API host below.

Base URL

export RAVE_API="https://api.rave-trading.com/api"

RAVE_API already ends in /api, so every endpoint is a relative /v2/... path: GET /v2/assets is https://api.rave-trading.com/api/v2/assets. Do not add a second /api.

HostUse
https://api.rave-trading.com/apiAll traffic. Reuse HTTP connections (keep-alive) for quotes, levels and the stream
https://rave-trading.com/apiCompatibility path only. Slower for latency-sensitive calls

The API Reference lists the server as https://api.rave-trading.com/api with /v2/... paths, so every request URL is https://api.rave-trading.com/api/v2/....

Check the API is up

/health needs no key:

curl -s "$RAVE_API/health"
{ "status": "ok" }

Did this page help you?