CRX API v3
CRX account, trading and maker calls.
Taker calls read markets, open RFQs, accept quotes, read the account, move collateral and grant read-only viewers. Maker calls send and cancel firm quotes, decline RFQs and request a test trade.
Authentication. Every call except GET /health and GET /markets carries the signed headers x-crx-address, x-crx-ts and x-crx-sig; add x-crx-signer when a delegate signs. x-crx-sig is the personal_sign (EIP-191) signature of this message, lines joined with \n, no trailing newline:
CRX-REST-LOGIN
Audience: crx-gateway
Method: <HTTP method, uppercase>
Path: <request path, no query string>
Custody: <x-crx-address, 0x + 40 lowercase hex>
Signer: <x-crx-signer if sent, else x-crx-address; 0x + 40 lowercase hex>
Timestamp: <x-crx-ts>
Body: 0x<keccak256 of the exact body bytes sent, zero bytes if none; 64 lowercase hex>
Each signed call is accepted once. A session token from POST /session replaces the signed headers on the calls that list it.
Signatures. The signed headers and POST /session sign the EIP-191 text message CRX-REST-LOGIN; the stream logon signs CRX-WS-LOGIN. An accept, a withdrawal and a quote sign EIP-712 typed data. A custodian must allow both kinds. No text signature moves money.
Errors. A refusal returns error and code; most add outcome and message, and some add details. Branch on code; show message to users. During a restart, any POST, PUT or DELETE can return 503 service_restarting with Retry-After. An unsupported method returns 405 method_not_allowed.
Versions. Paths carry no version. Responses can add fields, enum values and error codes; ignore unknown ones.
Rate limits. Rate-limited calls return ratelimit-limit, ratelimit-remaining, ratelimit-reset and ratelimit-refill; a 429 adds Retry-After.
Units. Amounts and rates are decimal strings. Times are Unix time in milliseconds unless a field states seconds.
Events. GET /trades returns your account's events. The schema Event types each event by its type. seq numbers your account's events from 1. A number can be skipped. Each event keeps its seq and ts on every read. Ignore an unknown type.
Error
| Field | Type | Description |
|---|---|---|
error required | string | Technical error text. Subject to change. |
code required | string | Stable error code; branch on this value. |
outcome | string | One-word outcome. Not on every error; new values can appear. |
message | string | Text to show the user. On a 400 or 422, it names the field and the value to send. |
details | object | Error details. Omitted if the code has none. |
details.limit | string | Limit breached, on |
details.pair_status | string paused delisted | Pair status, on |
details.delisting_at | integerminimum 0 | Scheduled delisting time, on |
Base URL
https://api.crxfx.com
Production. Ethereum (ethereum) and USDC.
Headers
| Header | Description |
|---|---|
x-crx-address | The account wallet, as 0x hex. |
x-crx-signer | The signing delegate or viewer, as 0x hex. Send only when the account wallet does not sign. |
x-crx-ts | Signing time, in Unix time (milliseconds). At most 5 seconds ahead of and 120 seconds behind server time; use a new value for every call. |
x-crx-sig | EIP-191 signature of the |
x-crx-session | Session token from |
Market data
Service status and markets. No signature required.
GET /health | Read service status |
GET /markets | List markets |
RFQs
Request quotes and accept one.
POST /rfqs | Open a request for quotes |
POST /rfqs/{rfq_id}/accept | Accept a quote |
GET /rfqs/{rfq_id}/accept-check | Check an accept before you sign |
Maker
Send, cancel and decline quotes; request a test trade. Makers only.
POST /test-requests | Request a maker test trade |
POST /rfqs/{rfq_id}/quotes | Send a firm quote |
DELETE /rfqs/{rfq_id}/quotes/{leg_id} | Cancel a quote |
POST /rfqs/{rfq_id}/decline | Decline an RFQ |
Account
Balance, positions and events.
GET /balance | Read your balance |
GET /positions | List your open positions |
GET /trades | Read your event tape |
Viewers
Read-only access for other wallets.
GET /viewers | List your viewers |
PUT /viewers/{viewer} | Grant a viewer |
DELETE /viewers/{viewer} | Remove a viewer |
Funds
Deposit and withdraw collateral.
POST /deposit | Get deposit transactions |
POST /rpc | Send a chain call |
POST /withdraw | Withdraw |
Session
Session tokens that replace the signed headers.
POST /session | Mint a session token |
DELETE /session | End session tokens |