Documentation ¶
Index ¶
- Constants
- func GetBuyOrders(symbol string) *list.List
- func GetSellOrders(symbol string) *list.List
- func GetStockMap() map[string]*Stock
- func OrderOne(symbol string, buy bool) (*list.List, *list.Element)
- func PopOrder(symbol string, buy bool)
- func PopOrderOne(symbol string)
- func PushInMarket(o *Order)
- func PushOrder(o *Order)
- func PushStock(s *Stock)
- func WithDraw(symbol string, serial string, buy bool) int
- type Order
- func (o *Order) AmountSum() int
- func (o *Order) CallPrice() float64
- func (o *Order) CallPriceString() string
- func (o *Order) Deal(amount int) *Order
- func (o *Order) DealPrice(p float64)
- func (o *Order) End() *Order
- func (o *Order) GetAmount() int
- func (o *Order) GetNext() *Order
- func (o *Order) GetPrice() float64
- func (o *Order) GetSerial() string
- func (o *Order) GetSymbol() string
- func (o *Order) GetTimestamp() time.Time
- func (o *Order) GetType() string
- func (o *Order) SetNext(next *Order)
- type Stock
- type Trade
Constants ¶
View Source
const ( ORDER_TYPE_BUY = "buy_market" //市价买 ORDER_TYPE_SELL = "sell_market" //市价卖 ORDER_TYPE_ASK = "buy" //限价买 ORDER_TYPE_BID = "sell" //限价卖 )
View Source
const ( ORDER_STATUS_NEW = "Created" ORDER_STATUS_DONE = "Exchanged" ORDER_STATUS_DONE_PART = "PartExchanged" ORDER_STATUS_WITHDRAW = "Withdrawed" ORDER_STATUS_WITHDRAW_REST = "RestWithdrawed" )
Variables ¶
This section is empty.
Functions ¶
func GetBuyOrders ¶
func GetSellOrders ¶
func GetStockMap ¶
func PopOrderOne ¶
func PopOrderOne(symbol string)
func PushInMarket ¶
func PushInMarket(o *Order)
Types ¶
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) CallPriceString ¶
func (*Order) GetTimestamp ¶
Click to show internal directories.
Click to hide internal directories.