Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameMatchedOrder = "matched_order"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List holds the elements, where each element points to the next element
func NewSinglyList ¶
func NewSinglyList() *List
NewSinglyList instantiates a new list and adds the passed values, if any, to the list
type MatchedOrder ¶
type MatchedOrder struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:雪花算法id" json:"id"` // 雪花算法id MatchID string `gorm:"column:match_id;not null;comment:撮合id" json:"match_id"` // 撮合id MatchSubID string `gorm:"column:match_sub_id;not null;comment:本次匹配的id,一次撮合会多次匹配" json:"match_sub_id"` // 本次匹配的id,一次撮合会多次匹配 SymbolID int32 `gorm:"column:symbol_id;not null;comment:交易对id" json:"symbol_id"` // 交易对id SymbolName string `gorm:"column:symbol_name;not null;comment:交易对名称" json:"symbol_name"` // 交易对名称 TakerOrderID string `gorm:"column:taker_order_id;not null;comment:taker订单id" json:"taker_order_id"` // taker订单id MakerOrderID string `gorm:"column:maker_order_id;not null;comment:maker订单id" json:"maker_order_id"` // maker订单id TakerIsBuyer int32 `gorm:"column:taker_is_buyer;not null;default:2;comment:taker是否是买单 1是 2否" json:"taker_is_buyer"` // taker是否是买单 1是 2否 Price string `gorm:"column:price;not null;comment:价格" json:"price"` // 价格 Qty string `gorm:"column:qty;not null;comment:数量(基础币)" json:"qty"` // 数量(基础币) Amount string `gorm:"column:amount;not null;comment:金额(计价币)" json:"amount"` // 金额(计价币) MatchTime int64 `gorm:"column:match_time;not null;comment:撮合时间" json:"match_time"` // 撮合时间 CreatedAt int64 `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"` // 创建时间 UpdatedAt int64 `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"` // 修改时间 }
MatchedOrder mapped from table <matched_order>
func (*MatchedOrder) TableName ¶
func (*MatchedOrder) TableName() string
TableName MatchedOrder's table name
type Ticker ¶
type Ticker struct { TimeUnix int64 //最近的一笔的数据 Volume decimal.Decimal //成交额 计价币数量 High decimal.Decimal //最高价 Low decimal.Decimal //最低价 Last24 decimal.Decimal //24小时之前 Price decimal.Decimal //当前 Amount decimal.Decimal //成交量 基础币数量 Range decimal.Decimal //变化百分比 PriceDelta decimal.Decimal //变化数量 }
func (*Ticker) CastToTickerRedisData ¶
func (t *Ticker) CastToTickerRedisData(symbolInfo *define.SymbolInfo) TickerRedisData
func (*Ticker) CastToTickerWsData ¶
func (t *Ticker) CastToTickerWsData(symbolInfo *define.SymbolInfo) ws.Ticker
type TickerRedisData ¶
type TickerRedisData struct { Amount string `json:"amount"` //成交量 TimeUnix int64 `json:"time"` //成交量 High string `json:"high"` //最高价 Low string `json:"low"` //最低价 Last24 string `json:"last24price"` //24小时之前 Price string `json:"price"` //当前 Volume string `json:"volume"` //成交额 Range string `json:"range"` //涨跌幅 Symbol string `json:"symbol"` PriceDelta string `json:"priceDelta"` //变化数量 }
TickerRedisData 用来存储的结构体
func (TickerRedisData) CastToTicker ¶
func (t TickerRedisData) CastToTicker() Ticker
Click to show internal directories.
Click to hide internal directories.