POST
/
api
/
v1
/
orders
curl -X POST "https://api.roxom.com/api/v1/orders" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "OIL-BTC",
    "instType": "perpetual",
    "orderType": "market",
    "side": "buy",
    "qty": "12",
    "unit": "BTC"
  }'
{
  "data": {
    "orderId": "01234567-89ab-7def-8123-456789abcdea"
  },
  "error": false
}

Create Order

Place a new trading order with various order types and execution options.

Endpoint

POST /api/v1/orders

Parameters

X-API-Key
string
required
API key for authentication. Format: your_api_key_here

Request Body

symbol
string
required
Trading instrument symbol (e.g., “OIL-BTC”)
instType
string
required
Instrument type: “perpetual”
side
string
required
Order side: “buy” or “sell”
orderType
string
required
Order type: “market”, “limit”, “stop”, “stoplimit”
qty
string
required
Order quantity as decimal string
px
string
Order price as decimal string (required for limit and stoplimit orders)
triggerPx
string
Stop trigger price as decimal string (required for stop and stoplimit orders)
timeInForce
string
default:"gtc"
Time in force: “gtc” (Good Till Canceled), “ioc” (Immediate or Cancel), “gtd” (Good Till Date)
unit
string
default:"btc"
Price unit: “sats” or “btc”
cancelAt
integer
Cancel timestamp in milliseconds (for GTD orders)

Example Requests

curl -X POST "https://api.roxom.com/api/v1/orders" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "OIL-BTC",
    "instType": "perpetual",
    "orderType": "market",
    "side": "buy",
    "qty": "12",
    "unit": "BTC"
  }'

Response

{
  "data": {
    "orderId": "01234567-89ab-7def-8123-456789abcdea"
  },
  "error": false
}
data
object
Order creation response

Order Validation

Before placing orders, ensure they meet symbol requirements:

Error Handling

Best Practices