pub struct InsertOrderRequest {
pub symbol: String,
pub exchange_id: Option<String>,
pub instrument_id: Option<String>,
pub direction: String,
pub offset: String,
pub price_type: String,
pub limit_price: f64,
pub volume: i64,
}Expand description
下单请求
Fields§
§symbol: String合约代码(格式:EXCHANGE.INSTRUMENT,如 SHFE.au2512)
exchange_id: Option<String>交易所代码(可选,如果提供 symbol 则自动拆分)
instrument_id: Option<String>合约代码(可选,如果提供 symbol 则自动拆分)
direction: String下单方向 BUY/SELL
offset: String开平标志 OPEN/CLOSE/CLOSETODAY
price_type: String价格类型 LIMIT/ANY
limit_price: f64委托价格
volume: i64下单手数
Implementations§
Source§impl InsertOrderRequest
impl InsertOrderRequest
Sourcepub fn get_exchange_id(&self) -> String
pub fn get_exchange_id(&self) -> String
获取交易所代码(从 symbol 拆分或使用 exchange_id)
Sourcepub fn get_instrument_id(&self) -> String
pub fn get_instrument_id(&self) -> String
获取合约代码(从 symbol 拆分或使用 instrument_id)
Trait Implementations§
Source§impl Clone for InsertOrderRequest
impl Clone for InsertOrderRequest
Source§fn clone(&self) -> InsertOrderRequest
fn clone(&self) -> InsertOrderRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InsertOrderRequest
impl RefUnwindSafe for InsertOrderRequest
impl Send for InsertOrderRequest
impl Sync for InsertOrderRequest
impl Unpin for InsertOrderRequest
impl UnwindSafe for InsertOrderRequest
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