Create order

This request type allows users to place orders through Pacifica's websocket API.

The Pacifica Python SDK provides a comprehensive example on using this endpoint.

Request

{
  "id": "660065de-8f32-46ad-ba1e-83c93d3e3966",
  "params": {
    "create_order": {
      "account": "AwX6321...",
      "signature": "5vnYpt...",
      "timestamp": 1749223025396,
      "expiry_window": 5000,
      "symbol": "BTC",
      "price": "100000.00",
      "reduce_only": false,
      "amount": "0.001",
      "side": "bid",
      "tif": "GTC",
      "client_order_id": "79f948fd-7556-4066-a128-083f3ea49322"
    }
  }
}
Field
Type
Need
Description
Example

"id"

Full UUID string

required

Client-defined request ID

660065de-8f32-46ad-ba1e-83c93d3e3966

"params"

object

required

Contains action type and action parameters

"create_order"

"create_order"

object

required

Specifies action type and contains parameters

See examples.

"account"

string

required

User's wallet address

42trU9A5...

"agent_wallet"

string

optional

Agent wallet address

69trU9A5...

"signature"

string

required

Cryptographic signature

5j1Vy9Uq...

"timestamp"

integer

required

Current timestamp in milliseconds

1716200000000

"expiry_window"

integer

optional

Signature expiry in milliseconds

30000

"symbol"

string

required

Trading pair symbol

BTC

"price"

string

required

Order price

50000

"reduce_only"

boolean

required

Whether the order is reduce-only

false

"amount"

string

required

Order amount

0.1

"side"

string

required

Order side (bid/ask)

bid

"tif"

string

required

Time in force (GTC, IOC, FOK, PO)

GTC

"client_order_id"

Full UUID string

optional

Client-defined order ID

f47ac10b-58cc-4372-a567-0e02b2c3d479

"take_profit"

object

optional

Take profit stop order configuration

See next three rows

"stop_price"

string

required (if "take_profit" exists)

Stop trigger price

55000

"limit_price"

string

optional

Limit price for the triggered order

54950

"client_order_id"

string

Full UUID string

Client-defined order ID for the stop order

e36ac10b-58cc-4372-a567-0e02b2c3d479

"stop_loss"

object

optional

Stop loss order configuration

See next three rows

"stop_price"

string

required (if "stop_loss" exists)

Stop trigger price

48000

"limit_price"

string

optional

Limit price for the triggered order

47950

"client_order_id"

string

Full UUID string

Client-defined order ID for the stop order

d25ac10b-58cc-4372-a567-0e02b2c3d479

Response

{
  "code": 200,
  "data": {
    "I": "79f948fd-7556-4066-a128-083f3ea49322",
    "i": 645953,
    "s": "BTC"
  },
  "id": "660065de-8f32-46ad-ba1e-83c93d3e3966",
  "t": 1749223025962,
  "type": "create_order"
}
Field
Type
Description

'code'

integer

Status code

'data'

object

Contains information about placed order

'I'

string

CLOID (if provided)

'i'

integer

Order ID

's'

string

Symbol

'id'

string

Client-defined request ID

't'

integer

Timestamp in milliseconds

'type'

string

Specifies action type

Last updated