Documentation ¶
Index ¶
- type InsufficientVolumeError
- type Limit
- type Match
- type Order
- type OrderType
- type Orderbook
- type OrderbookNotFoundError
- type Side
- type TradingPair
- type TradingPlatform
- func (platform *TradingPlatform) AddNewMarket(pair TradingPair) *Orderbook
- func (platform *TradingPlatform) GetOrderBook(pair TradingPair) (*Orderbook, error)
- func (platform *TradingPlatform) PlaceLimitOrder(pair TradingPair, price float64, order *Order) error
- func (platform *TradingPlatform) PlaceMarketOrder(pair TradingPair, order *Order) ([]Match, error)
- func (platform *TradingPlatform) Reset()
- func (platform *TradingPlatform) SeedData()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsufficientVolumeError ¶
type InsufficientVolumeError struct {
// contains filtered or unexported fields
}
func (*InsufficientVolumeError) Error ¶
func (e *InsufficientVolumeError) Error() string
func (*InsufficientVolumeError) HTTPCode ¶
func (e *InsufficientVolumeError) HTTPCode() int
type Order ¶
type Orderbook ¶
type Orderbook struct { Market *TradingPair `json:"market"` Asks []*Limit `json:"asks"` Bids []*Limit `json:"bids"` // contains filtered or unexported fields }
type OrderbookNotFoundError ¶
type OrderbookNotFoundError struct {
// contains filtered or unexported fields
}
func (*OrderbookNotFoundError) Error ¶
func (e *OrderbookNotFoundError) Error() string
func (*OrderbookNotFoundError) HTTPCode ¶
func (e *OrderbookNotFoundError) HTTPCode() int
type TradingPair ¶
func NewTradingPair ¶
func NewTradingPair(base string, quote string) TradingPair
func (*TradingPair) ToString ¶
func (pair *TradingPair) ToString() string
type TradingPlatform ¶
type TradingPlatform struct { Accounts *accounting.Accounts Orderbooks map[TradingPair]*Orderbook `json:"orderbooks"` // contains filtered or unexported fields }
func NewTradingPlatform ¶
func NewTradingPlatform() *TradingPlatform
func (*TradingPlatform) AddNewMarket ¶
func (platform *TradingPlatform) AddNewMarket(pair TradingPair) *Orderbook
func (*TradingPlatform) GetOrderBook ¶
func (platform *TradingPlatform) GetOrderBook(pair TradingPair) (*Orderbook, error)
func (*TradingPlatform) PlaceLimitOrder ¶
func (platform *TradingPlatform) PlaceLimitOrder(pair TradingPair, price float64, order *Order) error
func (*TradingPlatform) PlaceMarketOrder ¶
func (platform *TradingPlatform) PlaceMarketOrder(pair TradingPair, order *Order) ([]Match, error)
func (*TradingPlatform) Reset ¶
func (platform *TradingPlatform) Reset()
func (*TradingPlatform) SeedData ¶
func (platform *TradingPlatform) SeedData()
Click to show internal directories.
Click to hide internal directories.