Skip to main content
The Pacifica Python SDK provides a comprehensive example on using this endpoint.

Request

{
  "id": "660065de-8f32-46ad-ba1e-83c93d3e3966",
  "params": {
    "create_market_order": {
      "account": "AwX6321...",
      "signature": "5vnYpt...",
      "timestamp": 1749223025396,
      "expiry_window": 5000,
      "symbol": "BTC",
      "reduce_only": false,
      "amount": "0.001",
      "side": "bid",
      "slippage_percent": "0.5",
      "client_order_id": "79f948fd-7556-4066-a128-083f3ea49322",
      "builder_code": "MYCODE"
    }
  }
}
FieldTypeNeedDescriptionExample
”id”Full UUID stringrequiredClient-defined request ID660065de-8f32-46ad-ba1e-83c93d3e3966
”params”objectrequiredContains action type and action parameters”create_order"
"create_market_order”objectrequiredSpecifies action type and contains parametersSee examples.
”account”stringrequiredUser’s wallet address42trU9A5…
“agent_wallet”stringoptionalAgent wallet address69trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”expiry_window”integeroptionalSignature expiry in milliseconds30000
”symbol”stringrequiredTrading pair symbolBTC
”reduce_only”booleanrequiredWhether the order is reduce-onlyfalse
”amount”stringrequiredOrder amount0.1
”side”stringrequiredOrder side (bid/ask)bid
”slippage_percent”stringrequiredMaximum allowed slippage in percentage, e.g. “0.5” means 0.5% max slippage0.5
”client_order_id”Full UUID stringoptionalClient-defined order IDf47ac10b-58cc-4372-a567-0e02b2c3d479
”builder_code”stringoptionalBuilder program code (3-16 alphanumeric)MYCODE
”take_profit”objectoptionalTake profit stop order configurationSee next three rows
”stop_price”stringrequired (if “take_profit” exists)Stop trigger price55000
”limit_price”stringoptionalLimit price for the triggered order54950
”client_order_id”Full UUID stringoptionalClient-defined order ID for the stop ordere36ac10b-58cc-4372-a567-0e02b2c3d479
”trigger_price_type”stringoptionalPrice type to trigger stop. Options: mark_price (default), last_trade_price, mid_pricemark_price
”stop_loss”objectoptionalStop loss order configurationSee next three rows
”stop_price”stringrequired (if “stop_loss” exists)Stop trigger price48000
”limit_price”stringoptionalLimit price for the triggered order47950
”client_order_id”Full UUID stringoptionalClient-defined order ID for the stop orderd25ac10b-58cc-4372-a567-0e02b2c3d479
”trigger_price_type”stringoptionalPrice type to trigger stop. Options: mark_price (default), last_trade_price, mid_pricemark_price

Response

{
  "code": 200,
  "data": {
    "I": "79f948fd-7556-4066-a128-083f3ea49322",
    "i": 645953,
    "s": "BTC"
  },
  "id": "660065de-8f32-46ad-ba1e-83c93d3e3966",
  "t": 1749223025962,
  "type": "create_market_order",
  "rl": {
    "r": 9990,
    "q": 10000,
    "t": 1000
  }
}
FieldTypeDescription
'code'integerStatus code
'data'objectContains information about placed order
'I'stringCLOID (if provided)
'i'integerOrder ID
's'stringSymbol
'id'stringClient-defined request ID
't'integerTimestamp in milliseconds
'type'stringSpecifies action type
'rl'object or nullRate-limit info, always present: r = credits remaining, q = quota, t = reset-in (ms)
On error, the frame omits data and instead carries an err (string) field describing the failure, alongside the same id, type, code, t, and rl fields. Note: In order to protect liquidity providers from adverse selection, all market orders are subject to a ~200ms delay.