Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusDisable status = 0 StatusEnable status = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pairs ¶
type Pairs struct { Id int `xorm:"pk autoincr int" json:"-"` Symbol string `xorm:"varchar(100) notnull unique(symbol)" json:"symbol"` Name string `xorm:"varchar(250) notnull" json:"name"` TargetSymbolId int `xorm:"default(0) unique(symbol_base)" json:"target_symbol_id"` //交易物品 StandardSymbolId int `xorm:"default(0) unique(symbol_base)" json:"standard_symbol_id"` //支付货币 PricePrec int `xorm:"default(2)" json:"price_prec"` QtyPrec int `xorm:"default(0)" json:"qty_prec"` AllowMinQty types.NumberStr `xorm:"decimal(40,20) notnull" json:"allow_min_qty"` AllowMaxQty types.NumberStr `xorm:"decimal(40,20) notnull" json:"allow_max_qty"` AllowMinAmount types.NumberStr `xorm:"decimal(40,20) notnull" json:"allow_min_amount"` AllowMaxAmount types.NumberStr `xorm:"decimal(40,20) notnull" json:"allow_max_amount"` FeeRate types.NumberStr `xorm:"decimal(40,20) notnull default(0)" json:"fee_rate"` Status status `xorm:"default(0) notnull" json:"-"` CreateTime time.Time `xorm:"timestamp created" json:"-"` UpdateTime time.Time `xorm:"timestamp updated" json:"-"` Target Symbol `xorm:"-" json:"target"` Standard Symbol `xorm:"-" json:"standard"` }
func GetPairBySymbol ¶
func (*Pairs) FormatAmount ¶
type Symbol ¶
type Symbol struct { Id int `xorm:"pk autoincr int" json:"id"` Symbol string `xorm:"varchar(100) notnull unique(symbol)" json:"symbol"` Name string `xorm:"varchar(250) notnull" json:"name"` ShowPrec int `xorm:"default(0)" json:"show_prec"` MinPrecision int `xorm:"default(0)" json:"min_precision"` Standard bool `xorm:"default(0)" json:"standard"` //是否为本位币 Status status `xorm:"default(0) notnull" json:"-"` CreateTime time.Time `xorm:"timestamp created" json:"-"` UpdateTime time.Time `xorm:"timestamp updated" json:"-"` }
func GetSymbolInfo ¶
func GetSymbolInfoBySymbol ¶
func (*Symbol) FormatNumber ¶
Click to show internal directories.
Click to hide internal directories.