Documentation ¶
Index ¶
- Constants
- type AccountField
- type AccountFieldLite
- type AlarmInfo
- type Contract
- type CtpPositions
- type ErrInfoField
- type FuturesInfo
- type HL
- type InstrumentStatus
- type Kline
- type Kline2
- type Kline4DB
- type Kline4DetailUI
- type Kline4UI
- type KlineCache
- type KlineKey
- type LastPrice
- type MdMessage
- type OpenHighLow
- type OrderBase
- type OrderErrField
- type OrderField
- type OrderLast
- type Quote
- type QuoteCache
- type QuoteLite
- type ReplayData
- type ReplayInfo
- type ReplaySubscribeKline
- type RiskMessage
- type RiskOrderVolume
- type RiskPosition
- type RspInfoField
- type StaConfig
- type StrategyAggInfo
- type StrategyBaseInfo
- type StrategyBaseLite
- type Tick
- type Tick2
- type Tick4DB
- type Tick4DetailUI
- type TradeField
- type TradedOrder
- type TradedOrder4UI
- type TradedReport
Constants ¶
View Source
const ( STOP = 0 LOADING = 1 RUNNING = 2 REPLAY = 3 )
* * @Description: 策略状态 * @return unc
View Source
const ( DIRECTIONBUY = "BUY" DIRECTIONSELL = "SELL" )
定义订单相关结构 *
- @Description: 交易买卖方向
View Source
const ( OFFSETOPEN = "OPEN" OFFSETCLOSE = "CLOSE" OFFSETCLOSETODAY = "CLOSETODAY" OFFSETCLOSEYESTERDAY = "CLOSEYESTERDAY" )
*
- @Description: 交易开平仓
View Source
const ( PRICELIMIT = "LIMIT" PRICEMARKET = "MARKET" )
*
- @Description: 限价/市价
View Source
const ( RISKPASSFLAG = "RISKPASS" RISKPARTFLAG = "RISKPART" RISKZEROFLAG = "RISKZERO" )
*
- @Description: 风控标识
View Source
const ( ALARMINFO = "INFO" ALARMWARN = "WARN" ALARMERROR = "ERROR" ALARMFATAL = "FATAL" )
*
- @Description: 告警级别
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountField ¶
type AccountField struct { // 上次质押金额 PreMortgage float64 `json:"PreMortgage"` // 上次存款额 PreDeposit float64 `json:"PreDeposit"` // 上次结算准备金 PreBalance float64 `json:"PreBalance"` // 上次占用的保证金 PreMargin float64 `json:"PreMargin"` // 利息基数 InterestBase float64 `json:"InterestBase"` // 利息收入 Interest float64 `json:"Interest"` // 入金金额 Deposit float64 `json:"Deposit"` // 出金金额 Withdraw float64 `json:"Withdraw"` // 冻结的保证金 FrozenMargin float64 `json:"FrozenMargin"` // 冻结的资金 FrozenCash float64 `json:"FrozenCash"` // 冻结的手续费 FrozenCommission float64 `json:"FrozenCommission"` // 当前保证金总额 CurrMargin float64 `json:"CurrMargin"` // 资金差额 CashIn float64 `json:"CashIn"` // 手续费 Commission float64 `json:"Commission"` // 平仓盈亏 CloseProfit float64 `json:"CloseProfit"` // 持仓盈亏 PositionProfit float64 `json:"PositionProfit"` // 期货结算准备金 Balance float64 `json:"Balance"` // 可用资金 Available float64 `json:"Available"` // 可取资金 WithdrawQuota float64 `json:"WithdrawQuota"` // 基本准备金 Reserve float64 `json:"Reserve"` // 信用额度 Credit float64 `json:"Credit"` // 质押金额 Mortgage float64 `json:"Mortgage"` // 交易所保证金 ExchangeMargin float64 `json:"ExchangeMargin"` // 投资者交割保证金 DeliveryMargin float64 `json:"DeliveryMargin"` // 交易所交割保证金 ExchangeDeliveryMargin float64 `json:"ExchangeDeliveryMargin"` // 保底期货结算准备金 ReserveBalance float64 `json:"ReserveBalance"` // 币种代码 CurrencyID string `json:"CurrencyID"` // 上次货币质入金额 PreFundMortgageIn float64 `json:"PreFundMortgageIn"` // 上次货币质出金额 PreFundMortgageOut float64 `json:"PreFundMortgageOut"` // 货币质入金额 FundMortgageIn float64 `json:"FundMortgageIn"` // 货币质出金额 FundMortgageOut float64 `json:"FundMortgageOut"` // 货币质押余额 FundMortgageAvailable float64 `json:"FundMortgageAvailable"` // 可质押货币金额 MortgageableFund float64 `json:"MortgageableFund"` }
*
- @Description: 资金账户
type AccountFieldLite ¶
type AccountFieldLite struct { // 冻结的资金 FrozenCash float64 `json:"FrozenCash"` // 平仓盈亏 CloseProfit float64 `json:"CloseProfit"` // 可用资金 Available float64 `json:"Available"` // 当前保证金总额 CurrMargin float64 `json:"CurrMargin"` // 手续费 Commission float64 `json:"Commission"` // 持仓盈亏 PositionProfit float64 `json:"PositionProfit"` // 冻结的保证金 FrozenMargin float64 `json:"FrozenMargin"` // 冻结的手续费 FrozenCommission float64 `json:"FrozenCommission"` }
type AlarmInfo ¶
type AlarmInfo struct { Time string `json:"time"` Level string `json:"level"` Msg string `json:"msg"` Module string `json:"module"` }
AlarmInfo
@Description: 告警信息
type Contract ¶
type Contract struct { Symbol string `json:"symbol"` Exchange string `json:"exchange"` FutCode string `json:"fut_code"` TradeUnit string `json:"trade_unit"` PerUnit float64 `json:"per_unit"` QuoteUnit string `json:"quote_unit"` QuoteUnitDesc string `json:"quote_unit_desc"` DModeDesc string `json:"d_mode_desc"` ListDate string `json:"list_date"` DelistDate string `json:"delist_date"` DMonth string `json:"d_month"` LastDdate string `json:"last_ddate"` CreateTime int `json:"create_time"` }
*
- @Description: 合约信息
type CtpPositions ¶
type CtpPositions struct { InstrumentID string `json:"instrumentid"` ExchangeID string `json:"exchangeid"` PositionDirection string `json:"positiondirection"` PositionDate string `json:"positiondate"` Position int64 `json:"position"` YesterdayPosition int64 `json:"yesterdayposition"` TodayPosition int64 `json:"todayposition"` }
*
- @Description: CTP持仓信息
- @InstrumentID: 合约代码
- @ExchangeID: 交易所
- @PositionDirection: 持仓类型
- @Position: 交易所
- @TodayPosition: 交易所
type ErrInfoField ¶
type FuturesInfo ¶
type FuturesInfo struct { Name string `json:"name"` Code string `json:"code"` Session string `json:"session"` Exchange string `json:"exchange"` Unit int64 `json:"unit"` Minimum string `json:"minimum"` Group string `json:"group"` }
*
- @Description: 期货开收盘信息
type InstrumentStatus ¶
type InstrumentStatus struct { // 交易所代码 ExchangeID string `json:"ExchangeID"` // 合约代码 InstrumentID string `json:"InstrumentID"` // 合约交易状态 InstrumentStatus byte `json:"InstrumentStatus"` // 进入本状态时间 EnterTime string `json:"EnterTime"` }
*
- @Description: 合约状态
type Kline ¶
type Kline struct { Symbol string `json:"symbol"` Datetime int64 `json:"datetime"` Datetime_Str string `json:"datetime_str"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume int64 `json:"volume"` Open_Interest int64 `json:"open_interest"` Add_Time string `json:"add_time"` }
*
- @Description: K线结构
type Kline2 ¶
type Kline2 struct { Staname string `json:"stanme"` Symbol string `json:"symbol"` Period string `json:"period"` Kline Kline }
*
- @Description: 策略用K线结构
type Kline4DB ¶
type Kline4DB struct { Symbol string `json:"symbol"` Datetime int64 `json:"datetime"` Datetime_Str string `json:"datetime_str"` Open float64 `json:"open"` Highest float64 `json:"highest"` Lowest float64 `json:"lowest"` Close float64 `json:"close"` Volume int64 `json:"volume"` Open_Interest int64 `json:"open_interest"` Add_Time string `json:"add_time"` }
*
- @Description: 数据库用K线结构
type Kline4DetailUI ¶
type Kline4DetailUI struct { Symbol string `json:"symbol"` Datetime int64 `json:"datetime"` Datetime_Str string `json:"datetime_str"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume int64 `json:"volume"` Open_Interest int64 `json:"open_interest"` LoadingOrderIsBuyOpen bool `json:"loadingorderisbuyopen"` LoadingOrderBuyOpenPrice float64 `json:"loadingorderbuyopenprice"` LoadingOrderBuyOpenVolume int64 `json:"loadingorderbuyopenvolume"` LoadingOrderIsBuyClose bool `json:"loadingorderisbuyclose"` LoadingOrderBuyClosePrice float64 `json:"loadingorderbuycloseprice"` LoadingOrderBuyCloseVolume int64 `json:"loadingorderbuyclosevolume"` LoadingOrderIsSellOpen bool `json:"loadingorderissellopen"` LoadingOrderSellOpenPrice float64 `json:"loadingordersellopenprice"` LoadingOrderSellOpenVolume int64 `json:"loadingordersellopenvolume"` LoadingOrderIsSellClose bool `json:"loadingorderissellclose"` LoadingOrderSellClosePrice float64 `json:"loadingordersellcloseprice"` LoadingOrderSellCloseVolume int64 `json:"loadingordersellclosevolume"` TradeOrderIsBuyOpen bool `json:"tradeorderisbuyopen"` TradeOrderBuyOpenPrice float64 `json:"tradeorderbuyopenprice"` TradeOrderBuyOpenVolume int64 `json:"tradeorderbuyopenvolume"` TradeOrderIsBuyClose bool `json:"tradeorderisbuyclose"` TradeOrderBuyClosePrice float64 `json:"tradeorderbuycloseprice"` TradeOrderBuyCloseVolume int64 `json:"tradeorderbuyclosevolume"` TradeOrderIsSellOpen bool `json:"tradeorderissellopen"` TradeOrderSellOpenPrice float64 `json:"tradeordersellopenprice"` TradeOrderSellOpenVolume int64 `json:"tradeordersellopenvolume"` TradeOrderIsSellClose bool `json:"tradeorderissellclose"` TradeOrderSellClosePrice float64 `json:"tradeordersellcloseprice"` TradeOrderSellCloseVolume int64 `json:"tradeordersellclosevolume"` }
*
- @Description: 详情前端界面用数据结构
type Kline4UI ¶
type Kline4UI struct { Symbol string `json:"symbol"` Datetime int64 `json:"time"` Datetime_Str string `json:"time_str"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume int64 `json:"volume"` Open_Interest int64 `json:"open_interest"` }
*
- @Description: 回测前端界面用数据结构
type KlineKey ¶
type KlineKey struct { Symbol string `json:"symbol"` SymbolT string `json:"symbolt"` Period string `json:"period"` }
* * @Description: K线缓存主键
type LastPrice ¶
type LastPrice struct { LastPrice float64 `json:"lastprice"` UpperLimitPrice float64 `json:"upperlimitprice"` LowerLimitPrice float64 `json:"lowerlimitprice"` }
*
- @Description: 最新价结构,包含涨停价和跌停价
type MdMessage ¶
type MdMessage struct { Action string `json:"action"` ActionExt string `json:"actionext"` Data string `json:"data"` DataExt string `json:"dataext"` }
*
- @Description: 消息结构
type OrderBase ¶
type OrderBase struct { SN string `json:"sn"` StaName string `json:"staname"` Symbol string `json:"symbol"` Exchange string `json:"exchange"` Direction string `json:"direction"` Offset string `json:"offset"` OType string `json:"otype"` Status string `json:"status"` Price float64 `json:"price"` TotalVolume int64 `json:"totalvolume"` VolumeTraded int64 `json:"volumetraded"` VolumeLeft int64 `json:"volumeleft"` Datetime int64 `json:"datetime"` RiskFlag string `json:"riskflag"` }
*
- @Description: 订单基础结构
- @SN: 订单编号
- @StaName: 策略名
- @Symbol: 合约代码
- @Direction: 买卖方向
- @Offset: 开平仓
- @Price: 价格
- @Volume: 数量
type OrderErrField ¶
type OrderErrField struct { OrderField OrderField ErrInfoField ErrInfoField }
type OrderField ¶
type OrderField struct { // 合约代码 InstrumentID string `json:"InstrumentID"` // 报单引用 OrderRef string `json:"OrderRef"` // 买卖方向 Direction byte `json:"Direction"` // 组合开平标志 OffsetFlag byte `json:"OffsetFlag"` // 组合投机套保标志 HedgeFlag byte `json:"HedgeFlag"` // 价格 LimitPrice float64 `json:"LimitPrice"` // 数量 VolumeTotalOriginal int64 `json:"VolumeTotalOriginal"` // 交易所代码 ExchangeID string `json:"ExchangeID"` // 请求ID RequestID int64 `json:"RequestID"` // 报单编号 OrderSysID string `json:"OrderSysID"` // 报单状态 OrderStatus byte `json:"OrderStatus"` // 今成交数量 VolumeTraded int64 `json:"VolumeTraded"` // 剩余数量 VolumeLeft int64 `json:"VolumeLeft"` // 报单日期 InsertDate string `json:"InsertDate"` // 委托时间 InsertTime string `json:"InsertTime"` // 撤销时间 CancelTime string `json:"CancelTime"` // 前置编号 FrontID int64 `json:"FrontID"` // 状态信息 StatusMsg string `json:"StatusMsg"` // 是否本次登录后的委托 IsLocal bool `json:"IsLocal"` // 成交时间(有OnTrade更新) LastTradeTime string `json:"LastTradeTime"` }
*
- @Description: 报单结构
type OrderLast ¶
type OrderLast struct { Symbol string `json:"symbol"` Direction string `json:"direction"` Offset string `json:"offset"` Volume int64 `json:"volume"` }
*
- @Description: 最新订单数据
type Quote ¶
type Quote struct { Symbol string `json:"symbol"` SymbolT string `json:"symbolt"` Exchange string `json:"exchange"` ExchangeInst string `json:"exchange_inst"` Datetime int64 `json:"datetime"` DatetimeStr string `json:"datetime_str"` AskPrice5 float64 `json:"ask_price5,string"` AskVolume5 int64 `json:"ask_volume5,string"` AskPrice4 float64 `json:"ask_price4,string"` AskVolume4 int64 `json:"ask_volume4,string"` AskPrice3 float64 `json:"ask_price3,string"` AskVolume3 int64 `json:"ask_volume3,string"` AskPrice2 float64 `json:"ask_price2,string"` AskVolume2 int64 `json:"ask_volume2,string"` AskPrice1 float64 `json:"ask_price1,string"` AskVolume1 int64 `json:"ask_volume1,string"` BidPrice1 float64 `json:"bid_price1,string"` BidVolume1 int64 `json:"bid_volume1,string"` BidPrice2 float64 `json:"bid_price2,string"` BidVolume2 int64 `json:"bid_volume2,string"` BidPrice3 float64 `json:"bid_price3,string"` BidVolume3 int64 `json:"bid_volume3,string"` BidPrice4 float64 `json:"bid_price4,string"` BidVolume4 int64 `json:"bid_volume4,string"` BidPrice5 float64 `json:"bid_price5,string"` BidVolume5 int64 `json:"bid_volume5,string"` LastPrice float64 `json:"last_price,string"` Highest float64 `json:"highest,string"` Lowest float64 `json:"lowest,string"` Open float64 `json:"open,string"` Average float64 `json:"average,string"` Volume int64 `json:"volume,string"` Amount float64 `json:"amount,string"` Close float64 `json:"close,string"` OpenInterest int64 `json:"open_interest,string"` UpperLimit float64 `json:"upper_limit,string"` LowerLimit float64 `json:"lower_limit,string"` PreOpenInterest int64 `json:"pre_open_interest,string"` PreSettlement float64 `json:"pre_settlement,string"` PreClose float64 `json:"pre_close,string"` LocalTimestamp int64 `json:"local_timestamp"` }
*
- @Description: 行情数据结构
type ReplayData ¶
type ReplayData struct { MainTick []Tick2 SubTick []Tick2 MainKline []Kline2 SubKline []Kline2 Page int64 TotalPage int64 Begin bool Finish bool Done bool }
*
- @Description: 回测数据结构
- @Symbol: 合约代码
- @Period: 周期
- @StaName: 策略名称
- @Kline: K线数据
- @Finish: 结束状态
- @Page: 当前页号
- @TotalPage: 页总数
- @Curr: 当前合约序号
- @Total: 所有合约数量
type ReplayInfo ¶
type RiskMessage ¶
type RiskMessage struct { Symbol string `json:"symbol"` BeforeVolume int64 `json:"beforevolume"` AfterVolume int64 `json:"aftervolume"` Memo string `json:"memo"` }
*
- @Description: 风控消息
type RiskOrderVolume ¶
type RiskOrderVolume struct { Symbol string `json:"symbol"` PositionDirection string `json:"positiondirection"` OpenVolume int64 `json:"openvolume"` // 开仓 CloseVolume int64 `json:"closevolume"` // 平仓 MaxVolume int64 `json:"maxvolume"` // 最大报单量 Multiple int64 `json:"multiple"` // 合约乘数 LastPrice float64 `json:"lastprice"` // 最新价 YesterdayRiskPosition *RiskPosition // 昨仓风控持仓指针 TodayRiskPosition *RiskPosition // 今仓风控持仓指针 }
*
- @Description: 风控用报单临时寄存器
type RiskPosition ¶
type RiskPosition struct { Symbol string `json:"symbol"` PositionDirection string `json:"positiondirection"` // 持仓多空方向 PositionDate string `json:"positiondate"` // 持仓日期 Position int64 `json:"position"` // 持仓 LongFrozen int64 `json:"longfrozen"` // 多头冻结 LongFrozenAmount float64 `json:"longfrozenamount"` // 多头冻结金额 ShortFrozen int64 `json:"shortfrozen"` // 空头冻结 ShortFrozenAmount float64 `json:"shortfrozenamount"` // 空头冻结金额 UseMargin float64 `json:"usemargin"` // 占用保证金 FrozenMargin float64 `json:"frozenmargin"` // 冻结保证金 FrozenCash float64 `json:"frozencash"` // 冻结资金 FrozenCommission float64 `json:"frozencommission"` // 冻结手续费 Commission float64 `json:"commission"` // 手续费 }
*
- @Description: 风控用实际持仓寄存器
type RspInfoField ¶
type RspInfoField struct { OrderSN string `json:"OrderSN"` ErrInfoField ErrInfoField }
type StaConfig ¶
type StaConfig struct { Desc string PrintQuote bool PrintPosition bool Period string Length int Main []string Sub []string Extend map[string]interface{} }
* * @Description: 策略配置文件 * @MainQuote: 主合约Quote配置 * @SubQuote: 次合约Quote配置 * @Mainkline: 主合约Kline配置 * @subkline: 次合约Kline配置 * @MainTrade: 主交易合约代码 * @SubTrade: 次交易合约代码 * @Extend: 扩展key=value参数配置
type StrategyAggInfo ¶
type StrategyAggInfo struct { BaseInfoList []StrategyBaseInfo PositionList []CtpPositions }
type StrategyBaseInfo ¶
type StrategyBaseInfo struct { Pid int `json:"pid"` Name string `json:"name"` Desc string `json:"desc"` State int64 `json:"state"` MainQuote string `json:"mainquote"` MainQuoteLen int `json:"mainquotelen"` MainQuotePrice float64 `json:"mainquoteprice"` SubQuote string `json:"subquote"` SubQuoteLen int `json:"subquotelen"` SubQuotePrice float64 `json:"subquoteprice"` MainKlineSymbol string `json:"mainklinesymbol"` MainKlinePeriod string `json:"mainklineperiod"` MainKlineLen int `json:"mainklinelen"` MainKlinePrice float64 `json:"mainklineprice"` SubKlineSymbol string `json:"subklinesymbol"` SubKlinePeriod string `json:"subklineperiod"` SubKlineLen int `json:"subklinelen"` SubKlinePrice float64 `json:"subklineprice"` MainSymbol string `json:"mainsymbol"` MainTradePrice float64 `json:"maintradeprice"` MainVirtualPosition int64 `json:"mainvirtualposition"` MainLongOrderPosition int64 `json:"mainlongorderposition"` MainShortOrderPosition int64 `json:"mainshortorderposition"` MainLongRealPosition int64 `json:"mainlongrealposition"` MainShortRealPosition int64 `json:"mainshortrealposition"` SubSymbol string `json:"subsymbol"` SubTradePrice float64 `json:"subtradeprice"` SubVirtualPosition int64 `json:"subvirtualposition"` SubLongOrderPosition int64 `json:"sublongorderposition"` SubShortOrderPosition int64 `json:"subshortorderposition"` SubLongRealPosition int64 `json:"sublongrealposition"` SubShortRealPosition int64 `json:"subshortrealposition"` Selected bool `json:"selected"` }
*
- @Description: 策略信息
- @Name: 名称
- @State: 状态
type StrategyBaseLite ¶
type StrategyBaseLite struct { Name string `json:"name"` Sort int64 `json:"sort"` MainQuote string `json:"mainquote"` MainQuotePrice float64 `json:"mainquoteprice"` SubQuote string `json:"subquote"` SubQuotePrice float64 `json:"subquoteprice"` MainKlineSymbol string `json:"mainklinesymbol"` MainKlinePeriod string `json:"mainklineperiod"` MainKlinePrice float64 `json:"mainklineprice"` SubKlineSymbol string `json:"subklinesymbol"` SubKlinePeriod string `json:"subklineperiod"` SubKlinePrice float64 `json:"subklineprice"` MainSymbol string `json:"mainsymbol"` MainTradePrice float64 `json:"maintradeprice"` SubSymbol string `json:"subsymbol"` SubTradePrice float64 `json:"subtradeprice"` }
type Tick ¶
type Tick struct { Symbol string `json:"symbol"` Datetime int64 `json:"datetime"` DatetimeStr string `json:"datetime_str"` AskPrice5 float64 `json:"ask_price5"` AskVolume5 int64 `json:"ask_volume5"` AskPrice4 float64 `json:"ask_price4"` AskVolume4 int64 `json:"ask_volume4"` AskPrice3 float64 `json:"ask_price3"` AskVolume3 int64 `json:"ask_volume3"` AskPrice2 float64 `json:"ask_price2"` AskVolume2 int64 `json:"ask_volume2"` AskPrice1 float64 `json:"ask_price1"` AskVolume1 int64 `json:"ask_volume1"` BidPrice1 float64 `json:"bid_price1"` BidVolume1 int64 `json:"bid_volume1"` BidPrice2 float64 `json:"bid_price2"` BidVolume2 int64 `json:"bid_volume2"` BidPrice3 float64 `json:"bid_price3"` BidVolume3 int64 `json:"bid_volume3"` BidPrice4 float64 `json:"bid_price4"` BidVolume4 int64 `json:"bid_volume4"` BidPrice5 float64 `json:"bid_price5"` BidVolume5 int64 `json:"bid_volume5"` LastPrice float64 `json:"last_price"` Highest float64 `json:"highest"` Lowest float64 `json:"lowest"` Open float64 `json:"open"` Average float64 `json:"average"` Volume int64 `json:"volume"` Amount float64 `json:"amount"` Close float64 `json:"close"` OpenInterest int64 `json:"open_interest"` UpperLimit float64 `json:"upper_limit"` LowerLimit float64 `json:"lower_limit"` PreOpenInterest int64 `json:"pre_open_interest"` PreSettlement float64 `json:"pre_settlement"` PreClose float64 `json:"pre_close"` AddTime string `json:"add_time"` }
*
- @Description: Tick结构
type Tick4DB ¶
type Tick4DB struct { Symbol string `json:"symbol"` Datetime int64 `json:"datetime"` Datetime_Str string `json:"datetime_str"` Ask_Price5 float64 `json:"ask_price5"` Ask_Volume5 int64 `json:"ask_volume5"` Ask_Price4 float64 `json:"ask_price4"` Ask_Volume4 int64 `json:"ask_volume4"` Ask_Price3 float64 `json:"ask_price3"` Ask_Volume3 int64 `json:"ask_volume3"` Ask_Price2 float64 `json:"ask_price2"` Ask_Volume2 int64 `json:"ask_volume2"` Ask_Price1 float64 `json:"ask_price1"` Ask_Volume1 int64 `json:"ask_volume1"` Bid_Price1 float64 `json:"bid_price1"` Bid_Volume1 int64 `json:"bid_volume1"` Bid_Price2 float64 `json:"bid_price2"` Bid_Volume2 int64 `json:"bid_volume2"` Bid_Price3 float64 `json:"bid_price3"` Bid_Volume3 int64 `json:"bid_volume3"` Bid_Price4 float64 `json:"bid_price4"` Bid_Volume4 int64 `json:"bid_volume4"` Bid_Price5 float64 `json:"bid_price5"` Bid_Volume5 int64 `json:"bid_volume5"` Last_Price float64 `json:"last_price"` Highest float64 `json:"highest"` Lowest float64 `json:"lowest"` Open float64 `json:"open"` Average float64 `json:"average"` Volume int64 `json:"volume"` Amount float64 `json:"amount"` Close float64 `json:"close"` Open_Interest int64 `json:"open_interest"` Upper_Limit float64 `json:"upper_limit"` Lower_Limit float64 `json:"lower_limit"` Pre_Open_Interest int64 `json:"pre_open_interest"` Pre_Settlement float64 `json:"pre_settlement"` Pre_Close float64 `json:"pre_close"` Add_Time string `json:"add_time"` }
*
- @Description: Tick结构
type Tick4DetailUI ¶
type Tick4DetailUI struct { Tick Tick LoadingOrderIsBuyOpen bool `json:"loadingorderisbuyopen"` LoadingOrderBuyOpenPrice float64 `json:"loadingorderbuyopenprice"` LoadingOrderBuyOpenVolume int64 `json:"loadingorderbuyopenvolume"` LoadingOrderIsBuyClose bool `json:"loadingorderisbuyclose"` LoadingOrderBuyClosePrice float64 `json:"loadingorderbuycloseprice"` LoadingOrderBuyCloseVolume int64 `json:"loadingorderbuyclosevolume"` LoadingOrderIsSellOpen bool `json:"loadingorderissellopen"` LoadingOrderSellOpenPrice float64 `json:"loadingordersellopenprice"` LoadingOrderSellOpenVolume int64 `json:"loadingordersellopenvolume"` LoadingOrderIsSellClose bool `json:"loadingorderissellclose"` LoadingOrderSellClosePrice float64 `json:"loadingordersellcloseprice"` LoadingOrderSellCloseVolume int64 `json:"loadingordersellclosevolume"` TradeOrderIsBuyOpen bool `json:"tradeorderisbuyopen"` TradeOrderBuyOpenPrice float64 `json:"tradeorderbuyopenprice"` TradeOrderBuyOpenVolume int64 `json:"tradeorderbuyopenvolume"` TradeOrderIsBuyClose bool `json:"tradeorderisbuyclose"` TradeOrderBuyClosePrice float64 `json:"tradeorderbuycloseprice"` TradeOrderBuyCloseVolume int64 `json:"tradeorderbuyclosevolume"` TradeOrderIsSellOpen bool `json:"tradeorderissellopen"` TradeOrderSellOpenPrice float64 `json:"tradeordersellopenprice"` TradeOrderSellOpenVolume int64 `json:"tradeordersellopenvolume"` TradeOrderIsSellClose bool `json:"tradeorderissellclose"` TradeOrderSellClosePrice float64 `json:"tradeordersellcloseprice"` TradeOrderSellCloseVolume int64 `json:"tradeordersellclosevolume"` }
*
- @Description: 详情前端界面用数据结构
type TradeField ¶
type TradeField struct { // 报单引用 OrderRef string `json:"OrderRef"` // 合约代码 InstrumentID string `json:"InstrumentID"` // 交易所代码 ExchangeID string `json:"ExchangeID"` // 成交编号 TradeID string `json:"TradeID"` // 买卖方向 Direction byte `json:"Direction"` // 报单编号 OrderSysID string `json:"OrderSysID"` // 开平标志 OffsetFlag byte `json:"OffsetFlag"` // 投机套保标志 HedgeFlag byte `json:"HedgeFlag"` // 价格 Price float64 `json:"Price"` // 数量 Volume int64 `json:"Volume"` // 成交时期 TradeDate string `json:"TradeDate"` // 成交时间 TradeTime string `json:"TradeTime"` // 交易日 TradingDay string `json:"TradingDay"` }
*
- @Description: 成交结构
type TradedOrder ¶
type TradedOrder struct { StaName string `json:"staname"` SN string `json:"sn"` Symbol string `json:"symbol"` Direction string `json:"direction"` Offset string `json:"offset"` Price float64 `json:"price"` Volume int64 `json:"volume"` Datetime int64 `json:"datetime"` DatetimeStr string `json:"datetimestr"` Datetime4UI string `json:"datetime4ui"` }
*
- @Description: 成交订单
type TradedOrder4UI ¶
type TradedOrder4UI struct { StaName string `json:"staname"` Symbol string `json:"symbol"` IsBuyOpen bool `json:"isbuyopen"` BuyOpenPrice float64 `json:"buyopenprice"` BuyOpenVolume int64 `json:"buyopenvolume"` IsBuyClose bool `json:"isbuyclose"` BuyClosePrice float64 `json:"buycloseprice"` BuyCloseVolume int64 `json:"buyclosevolume"` IsSellOpen bool `json:"issellopen"` SellOpenPrice float64 `json:"sellopenprice"` SellOpenVolume int64 `json:"sellopenvolume"` IsSellClose bool `json:"issellclose"` SellClosePrice float64 `json:"sellcloseprice"` SellCloseVolume int64 `json:"sellclosevolume"` Position int64 `json:"position"` Multiplier int64 `json:"multiplier"` Budget float64 `json:"budget"` Profit float64 `json:"profit"` ProfitLine float64 `json:"profitline"` WinRate float64 `json:"winrate"` WinMoney float64 `json:"winmoney"` LoseMoney float64 `json:"losemoney"` Datetime int64 `json:"datetime"` DatetimeStr string `json:"datetimestr"` }
*
- @Description: 给前端的成交订单结构
type TradedReport ¶
type TradedReport struct { StaName string `json:"staname"` SN string `json:"sn"` Symbol string `json:"symbol"` Direction string `json:"direction"` Offset string `json:"offset"` Price float64 `json:"price"` Volume int64 `json:"volume"` Position int64 `json:"position"` Multiplier int64 `json:"multiplier"` Budget float64 `json:"budget"` Profit float64 `json:"profit"` ProfitLine float64 `json:"profitline"` WinRate float64 `json:"winrate"` WinMoney float64 `json:"winmoney"` LoseMoney float64 `json:"losemoney"` Datetime int64 `json:"datetime"` DatetimeStr string `json:"datetimestr"` Datetime4UI string `json:"datetime4ui"` }
Click to show internal directories.
Click to hide internal directories.