#[repr(i32)]pub enum OrderType {
Show 18 variants
Unknown = 0,
Normal = 1,
Market = 2,
AbsoluteLimit = 5,
Auction = 6,
AuctionLimit = 7,
SpecialLimit = 8,
SpecialLimitAll = 9,
Stop = 10,
StopLimit = 11,
MarketifTouched = 12,
LimitifTouched = 13,
TrailingStop = 14,
TrailingStopLimit = 15,
TwapMarket = 16,
TwapLimit = 17,
VwapMarket = 18,
VwapLimit = 19,
}Expand description
订单类型
Variants§
Unknown = 0
未知类型
Normal = 1
普通订单(港股的增强限价单、港股期权的限价单,A股限价委托、美股的限价单,港股期货的限价单,CME期货的限价单)。目前港股期权只能指定此订单类型。
Market = 2
市价订单(目前支持美股、港股正股、涡轮、牛熊、界内证)
AbsoluteLimit = 5
绝对限价订单(目前仅港股),只有价格完全匹配才成交,否则下单失败,比如你下价格为5元的买单,卖单价格必须也要是5元才能成交,低于5元也不能成交,下单失败。卖出同理
Auction = 6
竞价订单(目前仅港股),仅港股早盘竞价和收盘竞价有效,A股的早盘竞价订单类型不变还是OrderType_Normal
AuctionLimit = 7
竞价限价订单(目前仅港股),仅早盘竞价和收盘竞价有效,参与竞价,且要求满足指定价格才会成交
SpecialLimit = 8
特别限价订单(目前仅港股),成交规则同增强限价订单,且部分成交后,交易所自动撤销订单
SpecialLimitAll = 9
特别限价且要求全部成交订单(目前仅港股),要么全部成交,要么自动撤单
Stop = 10
止损市价单
StopLimit = 11
止损限价单
MarketifTouched = 12
触及市价单(止盈)
LimitifTouched = 13
触及限价单(止盈)
TrailingStop = 14
跟踪止损市价单
TrailingStopLimit = 15
跟踪止损限价单
TwapMarket = 16
TWAP 市价单
TwapLimit = 17
TWAP 限订单
VwapMarket = 18
VWAP 市价单
VwapLimit = 19
VWAP 限订单
Implementations§
Source§impl OrderType
impl OrderType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrderType
impl<'de> Deserialize<'de> for OrderType
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
Source§impl Ord for OrderType
impl Ord for OrderType
Source§impl PartialOrd for OrderType
impl PartialOrd for OrderType
impl Copy for OrderType
impl Eq for OrderType
impl StructuralPartialEq for OrderType
Auto Trait Implementations§
impl Freeze for OrderType
impl RefUnwindSafe for OrderType
impl Send for OrderType
impl Sync for OrderType
impl Unpin for OrderType
impl UnwindSafe for OrderType
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