Skip to main content

MarketId

Enum MarketId 

Source
#[repr(i32)]
pub enum MarketId {
Show 128 variants MktInvalidId = 0, MktIdMin = 1, MktGemboardId = 2, MktNasdaqboardId = 3, MktExtendboardId = 4, MktFutureId = 5, MktFutureNewId = 6, MktHkStockOptionId = 7, MktHkIndexOptionId = 8, MktHkMaxId = 9, MktUsMarketMinId = 10, MktUsMarketNasdaqId = 11, MktUsMarketAmexId = 12, MktUsMarketPinkId = 13, MktUsMarketCveId = 14, MktUsMarketIdxeId = 15, MktUsMarketLonId = 16, MktUsMarketMutfId = 17, MktUsMarketOtcId = 18, MktUsMarketOtcmId = 19, MktUsMarketOtcbId = 20, MktUsMarketPipoId = 21, MktUsMarketTseId = 22, MktUsMarketUsId = 23, MktUsMarketUnknId = 24, MktUsMarketIdxxId = 25, MktUsMarketSlgrId = 26, MktUsMarketHkId = 27, MktUsMarketBbttId = 28, MktUsMarketBatsId = 29, MktAMinId = 30, MktASz = 31, MktAStib = 32, MktAChiNext = 35, MktAMaxId = 40, MktUsOptionMinId = 41, MktUsLateCloseOptionId = 42, MktUsOptionMaxId = 45, MktStId = 50, MktNtId = 51, MktUsFutureMinId = 60, MktUsFutureNymexMax = 69, MktUsFutureComexMin = 70, MktUsFutureComexMax = 79, MktUsFutureCbotMin = 80, MktUsFutureCbotYm = 81, MktUsFutureCbot3Id = 82, MktUsFutureCbot4Id = 83, MktUsFutureCbot5Id = 84, MktUsFutureCbotMax = 89, MktUsFutureCmeMin = 90, MktUsFutureCmeIndex = 91, MktUsFutureCme3Id = 92, MktUsFutureCmeMax = 99, MktUsFutureCboeMin = 100, MktUsFutureCboeMax = 109, MktHkFutureMinId = 110, MktHkFutureCurrencyId = 111, MktHkFutureMetalId = 112, MktHkFutureStockId = 113, MktHkFutureIndexId = 114, MktHkFuture115Id = 115, MktHkFutureMaxId = 119, MktForexMinId = 120, MktForexIndexId = 121, MktForexMaxId = 123, MktPrivateFund = 124, MktBondMinId = 130, MktBondCmeaHardId = 131, MktBondCmeaLocalId = 132, MktBondUsGovId = 133, MktBondEuGovId = 134, MktBondApacHardId = 135, MktBondApacLocalId = 136, MktBondLatamHardId = 137, MktBondEuCpHyId = 138, MktBondEuCpIgId = 139, MktBondEuCpMgId = 140, MktBondUsCpIgId = 141, MktBondUsCpHyId = 142, MktBondEuGovImId = 143, MktBondEuCphyImId = 144, MktBondEuCpigImId = 145, MktBondLatamUsdId = 146, MktBondBondsFrnId = 147, MktBondFrnOffId = 148, MktBondChinabondsId = 149, MktBondUsFrnId = 150, MktBondApacDualId = 151, MktBondEuDualId = 152, MktBondDimsumId = 153, MktBondMaxId = 159, MktSgxFutureMinId = 160, MktSgxFuture161Id = 161, MktSgxFuture162Id = 162, MktSgxFuture163Id = 163, MktSgxFuture164Id = 164, MktSgxFuture165Id = 165, MktSgxFuture166Id = 166, MktSgxFuture167Id = 167, MktSgxFuture168Id = 168, MktSgxFuture169Id = 169, MktSgxFuture170Id = 170, MktSgxFuture171Id = 171, MktSgxFutureMaxId = 179, MktSgxMarketMinId = 180, MktSgxCatalistId = 181, MktSgxMarketMaxId = 184, MktJpxFutureMinId = 185, MktJpxFutureMaxId = 194, MktGlobalIndexMinId = 260, MktGlobalIndexGbId = 261, MktGlobalIndexItId = 262, MktGlobalIndexCnId = 263, MktGlobalIndexTwId = 264, MktGlobalIndexMyId = 265, MktGlobalIndexSgId = 266, MktGlobalIndexFrId = 267, MktGlobalIndexNlId = 268, MktGlobalIndexPtId = 269, MktGlobalIndexBeId = 270, MktGlobalIndex271Id = 271, MktGlobalIndexMaxId = 359, MktDigitalCcyMinId = 360, MktDigitalCcyMaxId = 459, MktTreasuryYieldMinId = 460, MktTreasuryYieldMaxId = 559, MaxMarketNum = 5_000,
}

Variants§

§

MktInvalidId = 0

§

MktIdMin = 1

§

MktGemboardId = 2

创业板

§

MktNasdaqboardId = 3

§

MktExtendboardId = 4

§

MktFutureId = 5

暂时人工伪造市场id

§

MktFutureNewId = 6

恒指期货夜市日市

§

MktHkStockOptionId = 7

港股股票期权的市场ID

§

MktHkIndexOptionId = 8

港股指数期权的市场ID

§

MktHkMaxId = 9

港股市场最大市场ID

§

MktUsMarketMinId = 10

§

MktUsMarketNasdaqId = 11

纳斯达克

§

MktUsMarketAmexId = 12

美交所

§

MktUsMarketPinkId = 13

§

MktUsMarketCveId = 14

§

MktUsMarketIdxeId = 15

§

MktUsMarketLonId = 16

§

MktUsMarketMutfId = 17

§

MktUsMarketOtcId = 18

§

MktUsMarketOtcmId = 19

§

MktUsMarketOtcbId = 20

§

MktUsMarketPipoId = 21

§

MktUsMarketTseId = 22

§

MktUsMarketUsId = 23

§

MktUsMarketUnknId = 24

§

MktUsMarketIdxxId = 25

§

MktUsMarketSlgrId = 26

§

MktUsMarketHkId = 27

§

MktUsMarketBbttId = 28

§

MktUsMarketBatsId = 29

§

MktAMinId = 30

上交所市场id 30,32,33,34 深交所市场id 31,35,36,37 38~40保留为A股以后可能有的交易所

§

MktASz = 31

深圳

§

MktAStib = 32

科创板(上交所)

§

MktAChiNext = 35

创业板(深交所)

§

MktAMaxId = 40

§

MktUsOptionMinId = 41

§

MktUsLateCloseOptionId = 42

延迟收市的美股期权(收盘时间在 16:15)

§

MktUsOptionMaxId = 45

§

MktStId = 50

港股通

§

MktNtId = 51

A股通

§

MktUsFutureMinId = 60

NYMEX交易所(60~69) CL、HO、NG、QM、RB、QL、QG、PA、PL:60

COMEX交易所(70~79) GC、SI、QO、MGC、QI、HG、QC:70

CBOT交易所(80~89) ZS、ZC、ZM、ZL、ZW、ZO:80 YM: 81 ZT、ZF、ZN、ZB、TN、UB: 82 XK、XC、XW: 83 ZR: 84

CME交易所:(90~99) 6B、6J、6S、6A、6C、6N、BTC: 90 NQ、ES、RTY、NIY:91 GF、HE、LE:92

CBOE交易所:(100~109) VX、XBT:100

§

MktUsFutureNymexMax = 69

§

MktUsFutureComexMin = 70

§

MktUsFutureComexMax = 79

§

MktUsFutureCbotMin = 80

注:MKT_US_FUTURE_CBOT_*_ID 市场值表示统一市场不同交易时间段的期货分类,可从tradetime.ini配置中区分,该命名与上游保持一致

§

MktUsFutureCbotYm = 81

YM, 股指期货

§

MktUsFutureCbot3Id = 82

§

MktUsFutureCbot4Id = 83

§

MktUsFutureCbot5Id = 84

§

MktUsFutureCbotMax = 89

§

MktUsFutureCmeMin = 90

注:MKT_US_FUTURE_CME_*_ID 市场值表示统一市场不同交易时间段的期货分类,可从tradetime.ini配置中区分,该命名与上游保持一致

§

MktUsFutureCmeIndex = 91

CME的一批股指期货

§

MktUsFutureCme3Id = 92

§

MktUsFutureCmeMax = 99

§

MktUsFutureCboeMin = 100

§

MktUsFutureCboeMax = 109

§

MktHkFutureMinId = 110

美国期货的market_code end

§

MktHkFutureCurrencyId = 111

汇率期货

§

MktHkFutureMetalId = 112

商品期货

§

MktHkFutureStockId = 113

股票期货

§

MktHkFutureIndexId = 114

恒生指数期货

§

MktHkFuture115Id = 115

期货时间修改。 更改MSCI 台灣(美元)指數期貨及MSCI台灣淨總收益(美元)指數期貨的開市時間,开市前交易阶段:8:30–8:45 正式交易时间:8:45–16:30,17:15–3:00

§

MktHkFutureMaxId = 119

§

MktForexMinId = 120

§

MktForexIndexId = 121

外汇指数

§

MktForexMaxId = 123

§

MktPrivateFund = 124

私募基金

§

MktBondMinId = 130

§

MktBondCmeaHardId = 131

Bonds CEEMEA Hard Currency

§

MktBondCmeaLocalId = 132

Bonds CEEMEA Local Currency

§

MktBondUsGovId = 133

Bonds US Government

§

MktBondEuGovId = 134

Bonds Europe Government

§

MktBondApacHardId = 135

Bonds APAC Hard Currency

§

MktBondApacLocalId = 136

Bonds APAC Local Currency

§

MktBondLatamHardId = 137

Bonds LATAM Hard Currency

§

MktBondEuCpHyId = 138

Bonds Europe Corporate - High Yield

§

MktBondEuCpIgId = 139

Bonds Europe Corporate - Investment Grade

§

MktBondEuCpMgId = 140

Bonds Europe Corporate - Mortgage

§

MktBondUsCpIgId = 141

Bonds US Corporate - Investment Grade

§

MktBondUsCpHyId = 142

Bonds US Corporate - High Yield

§

MktBondEuGovImId = 143

Bonds Europe Government Banca IMI

§

MktBondEuCphyImId = 144

Bonds Europe Corporate - High Yield - Banca IMI

§

MktBondEuCpigImId = 145

Bonds Europe Corporate - Inv. Grade - Banca IMI

§

MktBondLatamUsdId = 146

Bonds LATAM USD Currency

§

MktBondBondsFrnId = 147

Bonds Floating Rate Notes

§

MktBondFrnOffId = 148

Bonds Floating Rate Notes Offline

§

MktBondChinabondsId = 149

China Bond Connect

§

MktBondUsFrnId = 150

Bonds US Floating Rate Notes

§

MktBondApacDualId = 151

Bonds APAC Dual Currency

§

MktBondEuDualId = 152

Bonds Dual Europe Corporate - High Yield

§

MktBondDimsumId = 153

DimSum BONDS

§

MktBondMaxId = 159

§

MktSgxFutureMinId = 160

§

MktSgxFuture161Id = 161

NK

§

MktSgxFuture162Id = 162

CN

§

MktSgxFuture163Id = 163

SGP

§

MktSgxFuture164Id = 164

ID

§

MktSgxFuture165Id = 165

UC

§

MktSgxFuture166Id = 166

INB

§

MktSgxFuture167Id = 167

IN

§

MktSgxFuture168Id = 168

IU KU US

§

MktSgxFuture169Id = 169

ACF

§

MktSgxFuture170Id = 170

FEF PXF

§

MktSgxFuture171Id = 171

TF

§

MktSgxFutureMaxId = 179

§

MktSgxMarketMinId = 180

§

MktSgxCatalistId = 181

新加坡凯利板

§

MktSgxMarketMaxId = 184

§

MktJpxFutureMinId = 185

§

MktJpxFutureMaxId = 194

§

MktGlobalIndexMinId = 260

§

MktGlobalIndexGbId = 261

§

MktGlobalIndexItId = 262

§

MktGlobalIndexCnId = 263

§

MktGlobalIndexTwId = 264

§

MktGlobalIndexMyId = 265

§

MktGlobalIndexSgId = 266

§

MktGlobalIndexFrId = 267

§

MktGlobalIndexNlId = 268

§

MktGlobalIndexPtId = 269

§

MktGlobalIndexBeId = 270

§

MktGlobalIndex271Id = 271

§

MktGlobalIndexMaxId = 359

§

MktDigitalCcyMinId = 360

数字货币

§

MktDigitalCcyMaxId = 459

§

MktTreasuryYieldMinId = 460

国债收益率

§

MktTreasuryYieldMaxId = 559

§

MaxMarketNum = 5_000

Implementations§

Source§

impl MarketId

Source

pub fn is_valid(value: i32) -> bool

Returns true if value is a variant of MarketId.

Source

pub fn from_i32(value: i32) -> Option<MarketId>

👎Deprecated: Use the TryFrom<i32> implementation instead

Converts an i32 to a MarketId, or None if value is not a valid variant.

Source§

impl MarketId

Source

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.

Source

pub fn from_str_name(value: &str) -> Option<Self>

Creates an enum from field names used in the ProtoBuf definition.

Trait Implementations§

Source§

impl Clone for MarketId

Source§

fn clone(&self) -> MarketId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MarketId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MarketId

Source§

fn default() -> MarketId

Returns the “default value” for a type. Read more
Source§

impl From<MarketId> for i32

Source§

fn from(value: MarketId) -> i32

Converts to this type from the input type.
Source§

impl Hash for MarketId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for MarketId

Source§

fn cmp(&self, other: &MarketId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for MarketId

Source§

fn eq(&self, other: &MarketId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for MarketId

Source§

fn partial_cmp(&self, other: &MarketId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<i32> for MarketId

Source§

type Error = UnknownEnumValue

The type returned in the event of a conversion error.
Source§

fn try_from(value: i32) -> Result<MarketId, UnknownEnumValue>

Performs the conversion.
Source§

impl Copy for MarketId

Source§

impl Eq for MarketId

Source§

impl StructuralPartialEq for MarketId

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more