Documentation ¶
Index ¶
Constants ¶
View Source
const ( BASE = 10 TRADE_MOENY = "trade" BIT_SIZE_64 = 64 USDT = "usdt" SELL_MARKET = "sell-market" API_STR = "api" QUERY_TIMES = 5 OK_STR = "ok" )
View Source
const ( ORDER_INIT = 0 ORDER_START = 1 ORDER_FILLED = 2 ORDER_FIELD = 3 )
Variables ¶
View Source
var (
Traders map[string]*Trader
)
Functions ¶
func QueryOrderStatus ¶
func QueryOrderStatus(detail *TradeDetail, dbOrm orm.Ormer)
Types ¶
type TradeDetail ¶
type TradeDetail struct { Id string `orm:"pk" json:"id"` Coin string `json:"coin"` Amount float64 `orm:"digits(12);decimals(4)" json:"amount"` Price float64 `orm:"digits(18);decimals(10)" json:"price"` Sum float64 `orm:"digits(20);decimals(10)" json:"sum"` Ts int64 `json:"ts"` Status int8 `json:"status"` RealPrice string `json:"real_price"` RealAmount string `json:"real_amount"` RealSum string `json:"real_sum"` Fee string `json:"fee"` OrderId string `json:"order_id"` }
func ProcessTrade ¶
func ProcessTrade(trade *Trader) (detail TradeDetail, err constants.ApiError)
Click to show internal directories.
Click to hide internal directories.