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 | string | Yes | Order size in base token units |
price | string | 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": "filled",
"timestamp": 1743508800000
}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,
"timestamp": 1743508800000
}Transfer (Perp ↔ Spot)
POST https://openapi.gaiaex.com/v1/trade/spot/transfer
Transfer USDC between your perpetual and spot accounts.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
user_address | string | Yes | Your wallet address |
amount_usdc | string | Yes | Amount to transfer |
to_perp | boolean | Yes | true = spot→perp, false = perp→spot |
Example — Move $100 from spot to perp:
{
"user_address": "0xYourAddress",
"amount_usdc": "100",
"to_perp": true
}Response:
{
"success": true,
"direction": "spot_to_perp",
"amount_usdc": "100.00",
"result": { "status": "ok" },
"timestamp": 1743508800000
}