pub struct BinanceFuturesAlgoOrder {Show 25 fields
pub algo_id: i64,
pub client_algo_id: String,
pub algo_type: BinanceAlgoType,
pub order_type: BinanceFuturesOrderType,
pub symbol: Ustr,
pub side: BinanceSide,
pub position_side: Option<BinancePositionSide>,
pub time_in_force: Option<BinanceTimeInForce>,
pub quantity: Option<String>,
pub algo_status: Option<BinanceAlgoStatus>,
pub trigger_price: Option<String>,
pub price: Option<String>,
pub working_type: Option<BinanceWorkingType>,
pub close_position: Option<bool>,
pub price_protect: Option<bool>,
pub reduce_only: Option<bool>,
pub activate_price: Option<String>,
pub callback_rate: Option<String>,
pub good_till_date: Option<i64>,
pub create_time: Option<i64>,
pub update_time: Option<i64>,
pub trigger_time: Option<i64>,
pub actual_order_id: Option<String>,
pub executed_qty: Option<String>,
pub avg_price: Option<String>,
}Expand description
Algo order response from Binance Futures Algo Service API.
Algo orders are conditional orders (STOP_MARKET, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET) that are managed by Binance’s Algo Service rather than the traditional order matching engine.
§References
Fields§
§algo_id: i64Unique algo order ID assigned by Binance.
client_algo_id: StringClient-specified algo order ID for idempotency.
algo_type: BinanceAlgoTypeAlgo type (currently only Conditional is supported).
order_type: BinanceFuturesOrderTypeOrder type (STOP_MARKET, STOP, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET).
symbol: UstrTrading symbol.
side: BinanceSideOrder side (BUY/SELL).
position_side: Option<BinancePositionSide>Position side (BOTH, LONG, SHORT).
time_in_force: Option<BinanceTimeInForce>Time in force.
quantity: Option<String>Order quantity.
algo_status: Option<BinanceAlgoStatus>Algo order status.
trigger_price: Option<String>Trigger price for the conditional order.
price: Option<String>Limit price (for STOP/TAKE_PROFIT limit orders).
working_type: Option<BinanceWorkingType>Working type for trigger price calculation (CONTRACT_PRICE or MARK_PRICE).
close_position: Option<bool>Close all position flag.
price_protect: Option<bool>Price protection enabled.
reduce_only: Option<bool>Reduce-only flag.
activate_price: Option<String>Activation price for TRAILING_STOP_MARKET orders.
callback_rate: Option<String>Callback rate for TRAILING_STOP_MARKET orders (0.1 to 10, where 1 = 1%).
good_till_date: Option<i64>Good till date in milliseconds.
create_time: Option<i64>Order creation time in milliseconds.
update_time: Option<i64>Last update time in milliseconds.
trigger_time: Option<i64>Trigger time in milliseconds (when the algo order triggered).
actual_order_id: Option<String>Order ID in matching engine (populated when algo order is triggered).
executed_qty: Option<String>Executed quantity in matching engine (populated when algo order is triggered).
avg_price: Option<String>Average fill price in matching engine (populated when algo order is triggered).
Implementations§
Source§impl BinanceFuturesAlgoOrder
impl BinanceFuturesAlgoOrder
Sourcepub fn to_order_status_report(
&self,
account_id: AccountId,
instrument_id: InstrumentId,
price_precision: u8,
size_precision: u8,
ts_init: UnixNanos,
) -> Result<OrderStatusReport>
pub fn to_order_status_report( &self, account_id: AccountId, instrument_id: InstrumentId, price_precision: u8, size_precision: u8, ts_init: UnixNanos, ) -> Result<OrderStatusReport>
Converts this Binance algo order to a Nautilus [OrderStatusReport].
§Errors
Returns an error if client order ID, quantity, price, trigger, or trailing fields cannot be parsed.
Sourcepub fn to_order_status_report_with_actual(
&self,
actual: &BinanceFuturesOrder,
account_id: AccountId,
instrument_id: InstrumentId,
price_precision: u8,
size_precision: u8,
treat_expired_as_canceled: bool,
ts_init: UnixNanos,
) -> Result<OrderStatusReport>
pub fn to_order_status_report_with_actual( &self, actual: &BinanceFuturesOrder, account_id: AccountId, instrument_id: InstrumentId, price_precision: u8, size_precision: u8, treat_expired_as_canceled: bool, ts_init: UnixNanos, ) -> Result<OrderStatusReport>
Converts this algo order to a report enriched with matching-engine execution details.
The algo order remains the source of client identity and conditional-order metadata. The matching-engine order is authoritative for status, quantity, fills, average price, venue order identity, and the last update time.
§Errors
Returns an error if the matching-engine order does not match this algo order or either response contains invalid report data.
Trait Implementations§
Source§impl Clone for BinanceFuturesAlgoOrder
impl Clone for BinanceFuturesAlgoOrder
Source§fn clone(&self) -> BinanceFuturesAlgoOrder
fn clone(&self) -> BinanceFuturesAlgoOrder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BinanceFuturesAlgoOrder
impl Debug for BinanceFuturesAlgoOrder
Source§impl<'de> Deserialize<'de> for BinanceFuturesAlgoOrder
impl<'de> Deserialize<'de> for BinanceFuturesAlgoOrder
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>,
Auto Trait Implementations§
impl Freeze for BinanceFuturesAlgoOrder
impl RefUnwindSafe for BinanceFuturesAlgoOrder
impl Send for BinanceFuturesAlgoOrder
impl Sync for BinanceFuturesAlgoOrder
impl Unpin for BinanceFuturesAlgoOrder
impl UnsafeUnpin for BinanceFuturesAlgoOrder
impl UnwindSafe for BinanceFuturesAlgoOrder
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more