Documentation
¶
Index ¶
Constants ¶
View Source
const ( OrderMapping = `` /* 1511-byte string literal not displayed */ TradeTxMapping = `` /* 2806-byte string literal not displayed */ AssetMapping = `` /* 210-byte string literal not displayed */ )
mapping
View Source
const ( StatusCreated = "created" StatusRevoked = "revoked" StatusDone = "done" )
status
View Source
const ( TxSellMarketX = "sell_market" TxSellLimitX = "sell_limit" TxSellRevokeX = "sell_revoke" TxBuyMarketX = "buy_market" TxBuyLimitX = "buy_limit" TxBuyRevokeX = "buy_revoke" )
tx type
View Source
const ( TradeDBX = "trade" TradeTxDBX = "trade_tx" TradeAssetDBX = "trade_asset" DefaultType = "_doc" )
db
Variables ¶
This section is empty.
Functions ¶
func NewConvert ¶
func NewConvert(paraTitle, symbol string, supports []string) db.ExecConvert
NewConvert NewConvert
Types ¶
type Asset ¶
type Asset struct {
AssetSymbol string `json:"asset_symbol"`
AssetExec string `json:"asset_exec"`
PriceSymbol string `json:"price_symbol"`
PriceExec string `json:"price_exec"`
}
Asset in trade
type Order ¶
type Order struct {
*db.Block
AssetSymbol string `json:"asset_symbol"`
AssetExec string `json:"asset_exec"`
Owner string `json:"owner"`
AmountPerBoardlot int64 `json:"boardlot_amount"`
MinBoardlot int64 `json:"min_boardlot"`
PricePerBoardlot int64 `json:"boardlot_price"`
TotalBoardlot int64 `json:"total_boardlot"`
TradedBoardlot int64 `json:"traded_boardlot"`
IsSellOrder bool `json:"is_sell"`
IsFinished bool `json:"is_finished"`
Status string `json:"status"`
BuyID string `json:"buy_id"`
SellID string `json:"sell_id"`
PriceSymbol string `json:"price_symbol"`
PriceExec string `json:"price_exec"`
}
Order Order
type Tx ¶
type Tx struct {
*db.Block
TxType string `json:"tx_type"`
Success bool `json:"success"`
// option
SellMarket *pty.TradeForSellMarket `json:"sell_market,omitempty"`
SellLimit *pty.TradeForSell `json:"sell_limit,omitempt"`
SellRevoke *pty.TradeForRevokeSell `json:"sell_revoke,omitempty"`
BuyMarket *pty.TradeForBuy `json:"buy_market,omitempty"`
BuyLimit *pty.TradeForBuyLimit `json:"buy_limit,omitempty"`
BuyRevoke *pty.TradeForRevokeBuy `json:"buy_revoke,omitempty"`
}
Tx trade tx
Click to show internal directories.
Click to hide internal directories.