Documentation ¶
Index ¶
- Variables
- func FormatSymbol(base, quote string) string
- func IsError(response []byte) (bool, string)
- func ParseSymbol(symbol string) (string, string, error)
- type BookEntry
- type Client
- func (client *Client) CancelOrder(symbol string, orderID int64) error
- func (client *Client) Order(symbol string, side OrderSide, orderType OrderType, quantity, price float64, ...) (*NewOrder, error)
- func (client *Client) OrderBook(symbol string) (*OrderBook, error)
- func (client *Client) Orders(symbol string, status OrderStatus) ([]Order, error)
- func (client *Client) Summary() (Summary, error)
- func (client *Client) Symbols() ([]Symbol, error)
- func (client *Client) Ticker(symbol string) (*Ticker, error)
- type Error
- type NewOrder
- type Order
- type OrderBook
- type OrderSide
- type OrderStatus
- type OrderType
- type Orders
- type Summary
- type Symbol
- type Symbols
- type Ticker
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatSymbol ¶
Types ¶
type Client ¶
type Client struct { URL string // contains filtered or unexported fields }
type Order ¶
type Order struct { Symbol string `json:"symbol"` Status OrderStatus `json:"status"` Side OrderSide `json:"side"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` OrderID int64 `json:"order_id"` ApplicationID string `json:"application_id"` OrderTag string `json:"order_tag"` Price float64 `json:"price"` Type OrderType `json:"type"` Quantity float64 `json:"quantity"` Amount interface{} `json:"amount"` Executed float64 `json:"executed"` TotalFee float64 `json:"total_fee"` AverageExecutedPrice float64 `json:"average_executed_price"` }
func (*Order) ExecutedAt ¶ added in v0.0.180
func (*Order) QuantityMinusFee ¶ added in v0.0.180
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusNew OrderStatus = "NEW" OrderStatusCancelled OrderStatus = "CANCELLED" OrderStatusPartialFilled OrderStatus = "PARTIAL_FILLED" OrderStatusFilled OrderStatus = "FILLED" OrderStatusRejected OrderStatus = "REJECTED" OrderStatusIncomplete OrderStatus = "INCOMPLETE" OrderStatusCompleted OrderStatus = "COMPLETED" )
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` QuoteMin float64 `json:"quote_min"` QuoteMax float64 `json:"quote_max"` QuoteTick float64 `json:"quote_tick"` BaseMin float64 `json:"base_min"` BaseMax float64 `json:"base_max"` BaseTick float64 `json:"base_tick"` MinNotional float64 `json:"min_notional"` PriceRange float64 `json:"price_range"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` }
type Ticker ¶
type Ticker struct { Symbol string `json:"trading_pairs"` LastPrice float64 `json:"last_price"` LowestAsk float64 `json:"lowest_ask"` HighestBid float64 `json:"highest_bid"` BaseVolume float64 `json:"base_volume"` QuoteVolume float64 `json:"quote_volume"` PriceChangePercent24h float64 `json:"price_change_percent_24h"` HighestPrice24h float64 `json:"highest_price_24h"` LowestPrice24h float64 `json:"lowest_price_24h"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.