Documentation ¶
Index ¶
- Constants
- type Api
- func (api *Api) GetOrderBook(symbol string) (orderbook *OrderBook, err error)
- func (api *Api) GetTicker(symbol string) (ticker *Ticker, err error)
- func (api *Api) GetTrades(symbol string) (trades []Trade, err error)
- func (api *Api) GetTradesParams(symbol string, interval string) (trades []Trade, err error)
- func (api *Api) SubscribeOrderBook(symb string, dataChan chan<- OrderBook, stopChan <-chan struct{}) error
- type Order
- type OrderBook
- type Ticker
- type Trade
- type WsClient
- type WsEvent
Constants ¶
View Source
const (
// API_URL is a url of the api v2 endpoint
API_URL = "https://www.bitstamp.net/api/v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
Api is a Bitstamp client.
func NewFromConfig ¶
NewFromConfig creates a new api object given a config file. The config file must be json formated to inlude User and Password
func (*Api) GetOrderBook ¶
GetOrderBook returns order book for the given symbol.
func (*Api) GetTradesParams ¶
GetTradesParams returns the list of last trades.
interval - The time interval from which we want the transactions to be returned. Possible values are minute, hour (default) or day.
type Ticker ¶
type Ticker struct { Last float64 `json:",string"` High float64 `json:",string"` Low float64 `json:",string"` Ask float64 `json:",string"` Bid float64 `json:",string"` }
Ticker is a tick representation.
type WsClient ¶ added in v0.3.0
type WsClient struct { Stream chan *WsEvent Errors chan error // contains filtered or unexported fields }
func NewWsClient ¶ added in v0.3.0
func (*WsClient) Unsubscribe ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.