Documentation ¶
Index ¶
Constants ¶
View Source
const (
Spot = "SPOT"
)
const values for orderbook package
Variables ¶
View Source
var (
Orderbooks []Orderbook
)
Vars for the orderbook package
Functions ¶
func BaseCurrencyExists ¶
BaseCurrencyExists checks to see if the base currency of the orderbook map exists
Types ¶
type Base ¶
type Base struct { Pair currency.Pair `json:"pair"` Bids []Item `json:"bids"` Asks []Item `json:"asks"` LastUpdated time.Time `json:"lastUpdated"` AssetType string `json:"assetType"` ExchangeName string `json:"exchangeName"` }
Base holds the fields for the orderbook base
func Get ¶
Get checks and returns the orderbook given an exchange name and currency pair if it exists
func (*Base) Process ¶
Process processes incoming orderbooks, creating or updating the orderbook list
func (*Base) TotalAsksAmount ¶
TotalAsksAmount returns the total amount of asks and the total orderbook asks value
func (*Base) TotalBidsAmount ¶
TotalBidsAmount returns the total amount of bids and the total orderbook bids value
type Orderbook ¶
type Orderbook struct { Orderbook map[*currency.Item]map[*currency.Item]map[string]Base ExchangeName string }
Orderbook holds the orderbook information for a currency pair and type
func CreateNewOrderbook ¶
CreateNewOrderbook creates a new orderbook
func GetByExchange ¶
GetByExchange returns an exchange orderbook
Click to show internal directories.
Click to hide internal directories.