Overview
Use the API to quote a pair, create an exchange order, then poll the transaction endpoint until the order reaches a terminal state.
Content-Type: application/jsonGridex provides a streamlined exchange API for creating swaps, tracking order status, and managing the full transaction lifecycle in a privacy-focused environment. All operations are designed to minimize data exposure while maintaining reliable execution and clear status visibility across exchanges, including high-value transactions processed through internal settlement logic.
Use the API to quote a pair, create an exchange order, then poll the transaction endpoint until the order reaches a terminal state.
Content-Type: application/jsonCreate a swap by sending the source asset, target asset, amount, and payout address.
POST /api/exchange
{
"fromCurrency": "btc",
"toCurrency": "xmr",
"fromAmount": 1,
"payoutAddress": "84j7...xmr"
}200 OK
{
"orderId": "0f7d6d1a-2e1d-4dd2-b0df-7a4a8a902999",
"routing": "gridex",
"depositAddress": "bc1q...internal",
"expectedReceiveAmount": 312.4821,
"status": "waiting"
}Clients should poll the order endpoint every 10–15 seconds while the order is active.
GET /api/orders/{orderId}
{
"orderId": "0f7d6d1a-2e1d-4dd2-b0df-7a4a8a902999",
"routing": "api",
"providerStatus": "exchanging",
"displayStatus": "exchanging",
"steps": ["waiting", "confirming", "exchanging", "sending", "finished"]
}Public exchange creation and order tracking use rate limits and payload validation. Admin operations require a signed-in admin session and server-side role verification.
| 400 | Invalid request payload, unsupported currency pair, or amount outside supported bounds. |
| 401 | Authentication is required for protected operational endpoints. |
| 404 | Order or transaction ID was not found. |
| 409 | Order state does not allow the requested operation. |
| 429 | Too many requests. Retry after the rate-limit window. |
| 500 | Upstream provider or internal routing service is temporarily unavailable. |