optz
This commit is contained in:
84
types/req.go
Normal file
84
types/req.go
Normal file
@@ -0,0 +1,84 @@
|
||||
package types
|
||||
|
||||
// Status 状态数据结构
|
||||
type Status struct {
|
||||
Data Data `json:"data"`
|
||||
Status Config `json:"status"`
|
||||
}
|
||||
|
||||
// Data 数据部分
|
||||
type Data struct {
|
||||
Assets Assets `json:"assets"`
|
||||
Orders []Order `json:"order"`
|
||||
Positions []Position `json:"positions"`
|
||||
TickData map[string]Tick `json:"tick_data"`
|
||||
}
|
||||
|
||||
// Assets 资产信息
|
||||
type Assets struct {
|
||||
AccountID string `json:"account_id"`
|
||||
Cash float64 `json:"cash"`
|
||||
FrozenCash float64 `json:"frozen_cash"`
|
||||
MarketValue float64 `json:"market_value"`
|
||||
Profit float64 `json:"profit"`
|
||||
TotalAsset float64 `json:"total_asset"`
|
||||
}
|
||||
|
||||
// Order 订单信息
|
||||
type Order struct {
|
||||
OrderID int64 `json:"order_id"`
|
||||
OrderRemark string `json:"order_remark"`
|
||||
OrderStatus int `json:"order_status"`
|
||||
OrderTime int64 `json:"order_time"`
|
||||
Price float64 `json:"price"`
|
||||
StockCode string `json:"stock_code"`
|
||||
TradedPrice float64 `json:"traded_price"`
|
||||
TradedVolume int `json:"traded_volume"`
|
||||
Volume int `json:"volume"`
|
||||
}
|
||||
|
||||
// Position 持仓信息
|
||||
type Position struct {
|
||||
Code string `json:"code"`
|
||||
Volume int `json:"volume"`
|
||||
CanUseVolume int `json:"can_use_volume"`
|
||||
FrozenVolume int `json:"frozen_volume"`
|
||||
AvgPrice float64 `json:"avg_price"`
|
||||
OpenPrice float64 `json:"open_price"`
|
||||
CurrentPrice float64 `json:"current_price"`
|
||||
MarketValue float64 `json:"market_value"`
|
||||
Profit float64 `json:"profit"`
|
||||
ProfitRate float64 `json:"profit_rate"`
|
||||
MinProfitRate float64 `json:"min_profit_rate"`
|
||||
}
|
||||
|
||||
// Tick 行情数据
|
||||
type Tick struct {
|
||||
LastPrice float64 `json:"lastPrice"`
|
||||
Open float64 `json:"open"`
|
||||
High float64 `json:"high"`
|
||||
Low float64 `json:"low"`
|
||||
LastClose float64 `json:"lastClose"`
|
||||
Volume int64 `json:"volume"`
|
||||
Amount float64 `json:"amount"`
|
||||
PVolume int64 `json:"pvolume"`
|
||||
BidPrice []float64 `json:"bidPrice"`
|
||||
BidVol []int `json:"bidVol"`
|
||||
AskPrice []float64 `json:"askPrice"`
|
||||
AskVol []int `json:"askVol"`
|
||||
Time int64 `json:"time"`
|
||||
TimeTag string `json:"timetag"`
|
||||
StockStatus int `json:"stockStatus"`
|
||||
LastSettlementPrice float64 `json:"lastSettlementPrice"`
|
||||
SettlementPrice float64 `json:"settlementPrice"`
|
||||
OpenInt int `json:"openInt"`
|
||||
}
|
||||
|
||||
// Config 配置信息
|
||||
type Config struct {
|
||||
ConfigKey string `json:"config_key"`
|
||||
HomeName string `json:"home_name"`
|
||||
ProjectRoot string `json:"project_root"`
|
||||
QmtStatus string `json:"qmt_status"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
}
|
||||
Reference in New Issue
Block a user