Skip to main content

Module constant

Module constant 

Source
Expand description

一般交易常量枚举。

Python 原稿:enkeep_trade/enkeep_trade/trader/constant.py 逐名逐值复刻。 线值决策见 crate 文档第 3 条:英文令牌为线上值,FromStr 容中文旧值。

Structs§

EnumParseError
枚举解析失败(Python 侧是抛 ValueError,Rust 用错误结构表达)。

Enums§

Asset
资产大类(constant.py:43);细分形态由 InstrumentType 正交表达。
Currency
币种(constant.py:184)。
Direction
订单/成交/持仓方向(constant.py:8)。
Exchange
交易所(constant.py:122,全量 50 变体复刻 + 0.2.6 的 UNKNOWN)。
InstrumentType
合约形态(constant.py:69);与 Asset 正交组合。
Interval
K 线间隔(constant.py:195);秒值见 Interval::seconds。
Offset
订单/成交的开平属性(constant.py:18)。
OptionType
期权类型(constant.py:113)。
OrderType
委托类型(constant.py:100)。
Status
订单状态(constant.py:30);活跃态判定见 ACTIVE_STATUSES。

Constants§

ACTIVE_STATUSES
订单处于活跃态的状态集合(object.py:21)。