pub struct CreateConditionalOrderRequest {Show 14 fields
pub condition_type: CreateConditionalOrderRequestConditionType,
pub expires_at: Option<String>,
pub limit_price: Option<String>,
pub margin_account_id: Uuid,
pub order_type: CreateConditionalOrderRequestOrderType,
pub position_side: CreateConditionalOrderRequestPositionSide,
pub quantity: Option<String>,
pub reduce_only: bool,
pub side: CreateConditionalOrderRequestSide,
pub slippage_tolerance_bps: Option<i32>,
pub time_in_force: Option<CreateConditionalOrderRequestTimeInForce>,
pub trading_pair_id: Uuid,
pub trigger_price: String,
pub trigger_source: CreateConditionalOrderRequestTriggerSource,
}Expand description
CreateConditionalOrderRequest
JSON schema
{
"type": "object",
"required": [
"condition_type",
"margin_account_id",
"order_type",
"position_side",
"reduce_only",
"side",
"trading_pair_id",
"trigger_price",
"trigger_source"
],
"properties": {
"condition_type": {
"description": "STOP_LOSS or TAKE_PROFIT",
"type": "string",
"enum": [
"STOP_LOSS",
"TAKE_PROFIT"
]
},
"expires_at": {
"description": "Optional conditional order expiry timestamp (ISO 8601)",
"examples": [
"2026-06-01T00:00:00Z"
],
"type": [
"string",
"null"
]
},
"limit_price": {
"description": "Limit price for LIMIT conditional orders",
"examples": [
"64950"
],
"type": [
"string",
"null"
]
},
"margin_account_id": {
"description": "Isolated margin account UUID",
"examples": [
"123e4567-e89b-12d3-a456-426614174000"
],
"type": "string",
"format": "uuid"
},
"order_type": {
"description": "Triggered order type: MARKET or LIMIT",
"type": "string",
"enum": [
"MARKET",
"LIMIT"
]
},
"position_side": {
"description": "Position side being reduced: LONG or SHORT",
"type": "string",
"enum": [
"LONG",
"SHORT"
]
},
"quantity": {
"description": "Quantity to close; omit for full current position size",
"examples": [
"0.5"
],
"type": [
"string",
"null"
]
},
"reduce_only": {
"description": "Must be true for TP/SL",
"examples": [
true
],
"type": "boolean"
},
"side": {
"description": "Close order side: BUY or SELL",
"type": "string",
"enum": [
"BUY",
"SELL"
]
},
"slippage_tolerance_bps": {
"description": "MARKET only slippage tolerance in basis points",
"examples": [
50
],
"type": [
"integer",
"null"
],
"format": "int32",
"maximum": 10000.0
},
"time_in_force": {
"description": "LIMIT only: GTC or IOC",
"type": [
"string",
"null"
],
"enum": [
"GTC",
"IOC"
]
},
"trading_pair_id": {
"description": "MARGIN trading pair UUID",
"examples": [
"123e4567-e89b-12d3-a456-426614174000"
],
"type": "string",
"format": "uuid"
},
"trigger_price": {
"description": "Mark price that triggers the conditional order",
"examples": [
"65000"
],
"type": "string"
},
"trigger_source": {
"description": "Trigger source; v1 supports MARK_PRICE",
"type": "string",
"enum": [
"MARK_PRICE"
]
}
},
"additionalProperties": false
}Fields§
§condition_type: CreateConditionalOrderRequestConditionTypeSTOP_LOSS or TAKE_PROFIT
expires_at: Option<String>Optional conditional order expiry timestamp (ISO 8601)
limit_price: Option<String>Limit price for LIMIT conditional orders
margin_account_id: UuidIsolated margin account UUID
order_type: CreateConditionalOrderRequestOrderTypeTriggered order type: MARKET or LIMIT
position_side: CreateConditionalOrderRequestPositionSidePosition side being reduced: LONG or SHORT
quantity: Option<String>Quantity to close; omit for full current position size
reduce_only: boolMust be true for TP/SL
side: CreateConditionalOrderRequestSideClose order side: BUY or SELL
slippage_tolerance_bps: Option<i32>MARKET only slippage tolerance in basis points
time_in_force: Option<CreateConditionalOrderRequestTimeInForce>LIMIT only: GTC or IOC
trading_pair_id: UuidMARGIN trading pair UUID
trigger_price: StringMark price that triggers the conditional order
trigger_source: CreateConditionalOrderRequestTriggerSourceTrigger source; v1 supports MARK_PRICE
Trait Implementations§
Source§impl Clone for CreateConditionalOrderRequest
impl Clone for CreateConditionalOrderRequest
Source§fn clone(&self) -> CreateConditionalOrderRequest
fn clone(&self) -> CreateConditionalOrderRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for CreateConditionalOrderRequest
impl<'de> Deserialize<'de> for CreateConditionalOrderRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateConditionalOrderRequest
impl RefUnwindSafe for CreateConditionalOrderRequest
impl Send for CreateConditionalOrderRequest
impl Sync for CreateConditionalOrderRequest
impl Unpin for CreateConditionalOrderRequest
impl UnsafeUnpin for CreateConditionalOrderRequest
impl UnwindSafe for CreateConditionalOrderRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more