pub struct CreateOrderRequest {Show 18 fields
pub expiration_date: Option<String>,
pub leverage: Option<String>,
pub margin_account_id: Option<Uuid>,
pub margin_bucket_collateral: Option<String>,
pub margin_bucket_id: Option<Uuid>,
pub order_type: String,
pub position_side: Option<CreateOrderRequestPositionSide>,
pub price: Option<String>,
pub quantity: String,
pub reduce_only: Option<bool>,
pub side: String,
pub slippage_tolerance_bps: Option<i32>,
pub stop_loss: Option<ParentTpSlLeg>,
pub take_profit: Option<ParentTpSlLeg>,
pub time_in_force: Option<String>,
pub trading_mode: Option<String>,
pub trading_pair_id: Uuid,
pub use_master_balance: Option<bool>,
}Expand description
CreateOrderRequest
JSON schema
{
"type": "object",
"required": [
"order_type",
"quantity",
"side",
"trading_pair_id"
],
"properties": {
"expiration_date": {
"description": "Order expiration date (ISO 8601, must be in the future)",
"examples": [
"2026-06-01T00:00:00Z"
],
"type": [
"string",
"null"
]
},
"leverage": {
"description": "Leverage multiplier as decimal string for margin orders",
"examples": [
"5"
],
"type": [
"string",
"null"
]
},
"margin_account_id": {
"description": "Margin account UUID for margin orders",
"examples": [
"123e4567-e89b-12d3-a456-426614174000"
],
"type": [
"string",
"null"
],
"format": "uuid"
},
"margin_bucket_collateral": {
"description": "Decimal collateral to allocate into a new isolated margin bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.",
"examples": [
"1000"
],
"type": [
"string",
"null"
]
},
"margin_bucket_id": {
"description": "Existing isolated margin bucket UUID for bucket-scoped margin orders",
"examples": [
"123e4567-e89b-12d3-a456-426614174001"
],
"type": [
"string",
"null"
],
"format": "uuid"
},
"order_type": {
"description": "Order type: LIMIT or MARKET",
"examples": [
"LIMIT"
],
"type": "string"
},
"position_side": {
"description": "Position side for margin orders: LONG, SHORT, or NONE",
"examples": [
"LONG"
],
"type": [
"string",
"null"
],
"enum": [
"LONG",
"SHORT",
"NONE"
]
},
"price": {
"description": "Limit price as decimal string (required for LIMIT orders)",
"examples": [
"35000.00"
],
"type": [
"string",
"null"
]
},
"quantity": {
"description": "Order quantity as decimal string",
"examples": [
"0.5"
],
"type": "string"
},
"reduce_only": {
"description": "Whether the margin order is reduce-only",
"examples": [
false
],
"type": [
"boolean",
"null"
]
},
"side": {
"description": "Order side: BUY or SELL",
"examples": [
"BUY"
],
"type": "string"
},
"slippage_tolerance_bps": {
"description": "Maximum slippage tolerance in basis points (market orders only)",
"examples": [
50
],
"type": [
"integer",
"null"
],
"format": "int32",
"maximum": 10000.0
},
"stop_loss": {
"$ref": "#/components/schemas/ParentTpSlLeg"
},
"take_profit": {
"$ref": "#/components/schemas/ParentTpSlLeg"
},
"time_in_force": {
"description": "Time in force: GTC, IOC, or FOK",
"examples": [
"GTC"
],
"type": [
"string",
"null"
]
},
"trading_mode": {
"description": "Trading mode: SPOT or MARGIN (default: SPOT)",
"examples": [
"SPOT"
],
"type": [
"string",
"null"
]
},
"trading_pair_id": {
"description": "Trading pair UUID",
"examples": [
"afae0e16-2d05-4ee9-9ee8-afae0e162d05"
],
"type": "string",
"format": "uuid"
},
"use_master_balance": {
"description": "Use master account balance for sub-account orders",
"examples": [
false
],
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
}Fields§
§expiration_date: Option<String>Order expiration date (ISO 8601, must be in the future)
leverage: Option<String>Leverage multiplier as decimal string for margin orders
margin_account_id: Option<Uuid>Margin account UUID for margin orders
margin_bucket_collateral: Option<String>Decimal collateral to allocate into a new isolated margin bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.
margin_bucket_id: Option<Uuid>Existing isolated margin bucket UUID for bucket-scoped margin orders
order_type: StringOrder type: LIMIT or MARKET
position_side: Option<CreateOrderRequestPositionSide>Position side for margin orders: LONG, SHORT, or NONE
price: Option<String>Limit price as decimal string (required for LIMIT orders)
quantity: StringOrder quantity as decimal string
reduce_only: Option<bool>Whether the margin order is reduce-only
side: StringOrder side: BUY or SELL
slippage_tolerance_bps: Option<i32>Maximum slippage tolerance in basis points (market orders only)
stop_loss: Option<ParentTpSlLeg>§take_profit: Option<ParentTpSlLeg>§time_in_force: Option<String>Time in force: GTC, IOC, or FOK
trading_mode: Option<String>Trading mode: SPOT or MARGIN (default: SPOT)
trading_pair_id: UuidTrading pair UUID
use_master_balance: Option<bool>Use master account balance for sub-account orders
Trait Implementations§
Source§impl Clone for CreateOrderRequest
impl Clone for CreateOrderRequest
Source§fn clone(&self) -> CreateOrderRequest
fn clone(&self) -> CreateOrderRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more