Spot Trading Orders & History
Execute spot trades on GaiaEx via API: place market and limit orders, cancel orders, and retrieve trade history.
Overview
All spot trading endpoints require authentication.
Place Spot Order
POST https://openapi.gaiaex.com/v1/trade/spot/order
Place a spot market or limit order.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
user_address | string | Yes | Your wallet address |
symbol | string | Yes | Spot pair (e.g., PURR/USDC) |
is_buy | boolean | Yes | true for buy, false for sell |
size | number (Decimal) | Yes | Order size in base token units |
price | number (optional) | No | Limit price. Required for limit orders. |
order_type | string | No | "market" (default) or "limit" |
client_id | string | No | Client-assigned order ID |
Example — Market Buy:
{
"user_address": "0xYourAddress",
"symbol": "PURR/USDC",
"is_buy": true,
"size": 1000,
"order_type": "market"
}Example — Limit Sell:
{
"user_address": "0xYourAddress",
"symbol": "PURR/USDC",
"is_buy": false,
"size": 1000,
"price": 0.0550,
"order_type": "limit"
}Response:
{
"success": true,
"orderId": 555666777,
"symbol": "PURR/USDC",
"side": "BUY",
"type": "MARKET",
"origQty": "1000",
"status": "resting",
"timestamp": 1743508800000
}Note: status reflects the exchange response and may be "resting", "filled", or "pending" depending on order type and fill result.
Cancel Spot Order
POST https://openapi.gaiaex.com/v1/trade/spot/order/cancel
Cancel a single open spot order.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
user_address | string | Yes | Your wallet address |
symbol | string | Yes | Spot pair |
order_id | int | Yes | The order ID to cancel |
Example Request:
{
"user_address": "0xYourAddress",
"symbol": "PURR/USDC",
"order_id": 555666777
}Cancel All Spot Orders
POST https://openapi.gaiaex.com/v1/trade/spot/order/cancel-all
Cancel all open spot orders, optionally filtered by symbol.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
user_address | string | Yes | Your wallet address |
symbol | string | No | Filter by pair. Omit to cancel all. |
Response:
{
"success": true,
"cancelled_count": 3,
"failed_count": 0,
"errors": null,
"market": "spot",
"timestamp": 1743508800000
}Transfer (Perp ↔ Spot)
POST https://openapi.gaiaex.com/v1/trade/spot/transfer
⛔ Permanently Deprecated
This endpoint is permanently deprecated. It returns HTTP 410. Use the sendAsset flow instead:
GET /sendAsset/payload— fetch the unsigned payload- Sign the payload client-side
POST /sendAsset— submit the signed transaction
Actual response (HTTP 410):
{
"detail": "This endpoint is deprecated. Use the sendAsset flow."
}