1. Base URL
All endpoints are served from a single base URL:| Group | Prefix | Example |
|---|---|---|
| Addresses, Orders | /otc | https://api.nexbridge.io/v1/otc/orders/quote |
| Funding activity, Balances | /funding | https://api.nexbridge.io/v1/funding/funding-activity |
2. Authentication
Send your API key on every request:3. Conventions
- Money is a decimal string, never a JSON number (e.g.
"1003.5"). This preserves exact precision. Send amounts as strings; expect them back as strings.amountDecimals(2 or 6) on order responses tells you the display precision for the asset. - Pagination: list endpoints take
page(1-indexed, default 1) andlimit(default 20, max 100). Paginated responses wrap results as{ "data": [...], "pagination": { page, limit, total, totalPages } }. - Timestamps are ISO-8601 strings (UTC).
- Errors are returned as:
{ "statusCode": number, "error": string, "message": string, "code"?: string }.
4. The partner flow at a glance
QUOTED → PENDING_FUNDING → PARTIALLY_FILLED → FILLED, with CANCELLED reachable from QUOTED, PENDING_FUNDING, and PARTIALLY_FILLED.
5. Addresses
Manage the addresses an order can pay out to / be funded from.| Method | Path | Description |
|---|---|---|
GET | /otc/addresses | List your addresses (paginated, filtered) |
GET | /otc/addresses/{id} | Get one address |
POST | /otc/addresses | Register a new address |
PUT | /otc/addresses/{id} | Update an address’s notes |
DELETE | /otc/addresses/{id} | Delete an address |
A newly registered address is reviewed and approved before it can be used on an order.
GET /otc/addresses
Query: search (substring of the address), network (address type), status, asset, page, limit.
200 → { data: Address[], pagination }.
GET /otc/addresses/{id}
200 → Address. 404 if not found.
POST /otc/addresses
Register an address. One of type or network is required.
Address. 400 validation, 409 if the address already exists.
PUT /otc/addresses/{id}
Address.
DELETE /otc/addresses/{id}
204 No Content.
Address object
Fields include the address string, its type/network, asset, lifecycle status, screening result where applicable, and timestamps.
6. Orders
Quote, list, inspect, confirm, and cancel orders.| Method | Path | Description | Returns |
|---|---|---|---|
POST | /otc/orders/quote | Create a quote (unconfirmed order) | OrderDetail (201) |
GET | /otc/orders | List your orders | Order[] (200) |
GET | /otc/orders/{id} | Get enriched order detail | OrderDetail (200) |
POST | /otc/orders/{id}/confirm | Confirm a quoted order | OrderSummary (200) |
POST | /otc/orders/{id}/cancel | Cancel an order | OrderSummary (200) |
POST /otc/orders/quote — create a quote (unconfirmed order)
Prices the order on a fresh rate, applies your fee, and returns a QUOTED order. The quote has an expiry (quote.expiresAt).
OrderDetail. Notable errors: 404 (no tradable route for this asset pair), 422 (route not tradable), 409 (conflict), 503 (price_unavailable).
GET /otc/orders
List your orders. Optional repeated id filter: ?id=<a>&id=<b>.
200 → array of Order (raw shape — see below; differs from the enriched OrderDetail returned by the detail endpoint).
GET /otc/orders/{id}
Enriched detail: summary, quote info, cancellation eligibility, and resolved wallets.
200 → OrderDetail. 404 if not found.
POST /otc/orders/{id}/confirm — confirm a quoted order
Confirms a QUOTED order whose quote is still valid: QUOTED → PENDING_FUNDING.
200 → OrderSummary. Errors:
- 409
quote_already_used— the quote was already confirmed. - 409
quote_expired— the quote expired or was cancelled.
POST /otc/orders/{id}/cancel — cancel an order
Cancels the order when it is in a cancellable state (QUOTED, PENDING_FUNDING, or PARTIALLY_FILLED).
200 → OrderSummary. 400 if the order is not in a cancellable state.
Order response shapes
OrderSummary (returned by confirm/cancel):
OrderDetail (returned by quote/get) = OrderSummary plus:
The funding walletaddressinOrderDetail.walletsis where you send the deposit for aPENDING_FUNDINGorder.
Order (raw shape returned by GET /otc/orders list): id, userPairId, status, size, rate, amountIn, amountOut, actualFee, payoutStatus, and lifecycle timestamps (confirmationTimestamp, fulfillmentTimestamp, cancellationTimestamp, payoutStarted, payoutCompleted, expiresAt, createdAt, updatedAt). All money fields are decimal strings.
7. Funding activity & balances
After an order is confirmed and funded, track the deposit and your balance.| Method | Path | Description | Returns |
|---|---|---|---|
GET | /funding/funding-activity | Your funding-activity feed | paginated FundingActivityItem |
GET | /funding/balances | Your balances | paginated BalanceRow |
GET /funding/funding-activity — the funding-activity feed
Paginated feed of your fundings (deposits), each annotated with the orders it is allocated to.
Query: asset, network, status, order_id, date_from, date_to (all optional), plus page and limit.
200 → { data: FundingActivityItem[], pagination }:
FundingStatus values: RECEIVED, DIRTY, ELIGIBLE, TRANSFER_FAILED, AVAILABLE, PARTIALLY_ALLOCATED, ALLOCATED, CONSUMED.
linked_orders includes orders linked via live (non-cancelled) allocations; a fully consumed funding still shows what it was spent on. Amounts are summed per order across the funding’s allocations.
GET /funding/balances — balances
Paginated balances at (asset, network) grain — the same asset on two networks is reported as two rows, never merged.
Query: asset, network (optional), plus page and limit.
200 → { data: BalanceRow[], pagination }:
8. Error reference
| Status | Meaning | When |
|---|---|---|
400 | Bad request / validation | malformed payload; order not in a cancellable state |
401 | Unauthorized | missing/invalid credential |
403 | Forbidden | credential without access to the resource |
404 | Not found | resource missing or not yours |
409 | Conflict | address already exists; quote_already_used; quote_expired |
422 | Unprocessable | order route not tradable |
500 | Internal error | — |
503 | Service unavailable | price_unavailable; pricing temporarily unavailable |