Documentation ¶
Index ¶
- Constants
- Variables
- type BookEntry
- type Client
- func (client *Client) ArchivedOrders(symbol1, symbol2 string) ([]Order, error)
- func (client *Client) ArchivedOrdersAll() ([]Order, error)
- func (client *Client) CancelOrder(id string) error
- func (client *Client) CurrencyLimits() ([]Pair, error)
- func (client *Client) OpenOrders(symbol1, symbol2 string) ([]Order, error)
- func (client *Client) OpenOrdersAll() ([]Order, error)
- func (client *Client) OrderBook(symbol1, symbol2 string) (*OrderBook, error)
- func (client *Client) PlaceMarketOrder(symbol1, symbol2 string, side Side, amount float64) (*Order, error)
- func (client *Client) PlaceOrder(symbol1, symbol2 string, side Side, amount, price float64) (*Order, error)
- func (client *Client) Ticker(symbol1, symbol2 string) (*Ticker, error)
- type Order
- type OrderBook
- type Orders
- type Pair
- type Side
- type Ticker
Constants ¶
View Source
const ( Endpoint = "https://cex.io/api/" RequestsPerSecond = 1 // limited to 600 requests per 10 minutes )
Variables ¶
View Source
var ( BeforeRequest func(path string) error = nil AfterRequest func() = nil )
View Source
var SideString = map[Side]string{ SIDE_UNKNOWN: "", BUY: "buy", SELL: "sell", }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { URL string Key string Secret string UserName string // contains filtered or unexported fields }
func (*Client) ArchivedOrders ¶
func (*Client) ArchivedOrdersAll ¶
func (*Client) CancelOrder ¶
func (*Client) CurrencyLimits ¶
func (*Client) OpenOrders ¶
func (*Client) OpenOrdersAll ¶
func (*Client) PlaceMarketOrder ¶
func (*Client) PlaceOrder ¶
type Order ¶
type Pair ¶
type Pair struct { MaxLotSize float64 `json:"maxLotSize"` MinLotSize float64 `json:"minLotSize"` MaxPrice float64 `json:"maxPrice,string"` MinPrice float64 `json:"minPrice,string"` Symbol1 string `json:"symbol1"` // 1st listed currency of this market pair Symbol2 string `json:"symbol2"` // 2nd listed currency of this market pair }
Click to show internal directories.
Click to hide internal directories.