Documentation
¶
Index ¶
- Constants
- type GDAX
- func (g *GDAX) CancelOrder(orderID string) error
- func (g *GDAX) GetAccount(account string) (GDAXAccountResponse, error)
- func (g *GDAX) GetAccountHistory(accountID string) ([]GDAXAccountLedgerResponse, error)
- func (g *GDAX) GetAccounts() ([]GDAXAccountResponse, error)
- func (g *GDAX) GetCurrencies() ([]GDAXCurrency, error)
- func (e *GDAX) GetExchangeAccountInfo() (exchange.ExchangeAccountInfo, error)
- func (g *GDAX) GetFee(maker bool) float64
- func (g *GDAX) GetFills(params url.Values) ([]GDAXFillResponse, error)
- func (g *GDAX) GetHistoricRates(symbol string, start, end, granularity int64) ([]GDAXHistory, error)
- func (g *GDAX) GetHolds(accountID string) ([]GDAXAccountHolds, error)
- func (g *GDAX) GetOrder(orderID string) (GDAXOrderResponse, error)
- func (g *GDAX) GetOrderbook(symbol string, level int) (interface{}, error)
- func (g *GDAX) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)
- func (g *GDAX) GetOrders(params url.Values) ([]GDAXOrdersResponse, error)
- func (g *GDAX) GetProducts() ([]GDAXProduct, error)
- func (g *GDAX) GetReport(reportType, startDate, endDate string) (GDAXReportResponse, error)
- func (g *GDAX) GetReportStatus(reportID string) (GDAXReportResponse, error)
- func (g *GDAX) GetStats(symbol string) (GDAXStats, error)
- func (g *GDAX) GetTicker(symbol string) (GDAXTicker, error)
- func (g *GDAX) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)
- func (g *GDAX) GetTrades(symbol string) ([]GDAXTrade, error)
- func (g *GDAX) PlaceOrder(clientRef string, price, amount float64, side string, productID, stp string) (string, error)
- func (g *GDAX) Run()
- func (g *GDAX) SendAuthenticatedHTTPRequest(method, path string, params map[string]interface{}, result interface{}) (err error)
- func (g *GDAX) SetDefaults()
- func (g *GDAX) Setup(exch config.ExchangeConfig)
- func (g *GDAX) Start()
- func (g *GDAX) Transfer(transferType string, amount float64, accountID string) error
- func (g *GDAX) WebsocketClient()
- func (g *GDAX) WebsocketSubscribe(product string, conn *websocket.Conn) error
- type GDAXAccountHolds
- type GDAXAccountLedgerResponse
- type GDAXAccountResponse
- type GDAXCurrency
- type GDAXFillResponse
- type GDAXHistory
- type GDAXOrderL1L2
- type GDAXOrderL3
- type GDAXOrderResponse
- type GDAXOrderbookL1L2
- type GDAXOrderbookL3
- type GDAXOrderbookResponse
- type GDAXOrdersResponse
- type GDAXProduct
- type GDAXReportResponse
- type GDAXStats
- type GDAXTicker
- type GDAXTrade
- type GDAXWebsocketChange
- type GDAXWebsocketDone
- type GDAXWebsocketMatch
- type GDAXWebsocketOpen
- type GDAXWebsocketReceived
- type GDAXWebsocketSubscribe
Constants ¶
View Source
const ( GDAX_API_URL = "https://api.gdax.com/" GDAX_API_VERISON = "0" GDAX_PRODUCTS = "products" GDAX_ORDERBOOK = "book" GDAX_TICKER = "ticker" GDAX_TRADES = "trades" GDAX_HISTORY = "candles" GDAX_STATS = "stats" GDAX_CURRENCIES = "currencies" GDAX_ACCOUNTS = "accounts" GDAX_LEDGER = "ledger" GDAX_HOLDS = "holds" GDAX_ORDERS = "orders" GDAX_FILLS = "fills" GDAX_TRANSFERS = "transfers" GDAX_REPORTS = "reports" )
View Source
const (
GDAX_WEBSOCKET_URL = "wss://ws-feed.gdax.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GDAX ¶
type GDAX struct {
exchange.ExchangeBase
}
func (*GDAX) CancelOrder ¶
func (*GDAX) GetAccount ¶
func (g *GDAX) GetAccount(account string) (GDAXAccountResponse, error)
func (*GDAX) GetAccountHistory ¶
func (g *GDAX) GetAccountHistory(accountID string) ([]GDAXAccountLedgerResponse, error)
func (*GDAX) GetAccounts ¶
func (g *GDAX) GetAccounts() ([]GDAXAccountResponse, error)
func (*GDAX) GetCurrencies ¶
func (g *GDAX) GetCurrencies() ([]GDAXCurrency, error)
func (*GDAX) GetExchangeAccountInfo ¶
GetExchangeAccountInfo : Retrieves balances for all enabled currencies for the GDAX exchange
func (*GDAX) GetHistoricRates ¶
func (g *GDAX) GetHistoricRates(symbol string, start, end, granularity int64) ([]GDAXHistory, error)
func (*GDAX) GetOrderbook ¶
func (*GDAX) GetOrderbookEx ¶
func (g *GDAX) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)
func (*GDAX) GetProducts ¶
func (g *GDAX) GetProducts() ([]GDAXProduct, error)
func (*GDAX) GetReport ¶
func (g *GDAX) GetReport(reportType, startDate, endDate string) (GDAXReportResponse, error)
func (*GDAX) GetReportStatus ¶
func (g *GDAX) GetReportStatus(reportID string) (GDAXReportResponse, error)
func (*GDAX) GetTickerPrice ¶
func (g *GDAX) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)
func (*GDAX) PlaceOrder ¶
func (*GDAX) SendAuthenticatedHTTPRequest ¶
func (*GDAX) SetDefaults ¶
func (g *GDAX) SetDefaults()
func (*GDAX) Setup ¶
func (g *GDAX) Setup(exch config.ExchangeConfig)
func (*GDAX) WebsocketClient ¶
func (g *GDAX) WebsocketClient()
type GDAXAccountHolds ¶
type GDAXAccountResponse ¶
type GDAXCurrency ¶
type GDAXFillResponse ¶
type GDAXFillResponse struct { TradeID int `json:"trade_id"` ProductID string `json:"product_id"` Price float64 `json:"price,string"` Size float64 `json:"size,string"` OrderID string `json:"order_id"` CreatedAt string `json:"created_at"` Liquidity string `json:"liquidity"` Fee float64 `json:"fee,string"` Settled bool `json:"settled"` Side string `json:"side"` }
type GDAXHistory ¶
type GDAXOrderL1L2 ¶
type GDAXOrderL3 ¶
type GDAXOrderResponse ¶
type GDAXOrderResponse struct { ID string `json:"id"` Size float64 `json:"size,string"` Price float64 `json:"price,string"` DoneReason string `json:"done_reason"` Status string `json:"status"` Settled bool `json:"settled"` FilledSize float64 `json:"filled_size,string"` ProductID string `json:"product_id"` FillFees float64 `json:"fill_fees,string"` Side string `json:"side"` CreatedAt string `json:"created_at"` DoneAt string `json:"done_at"` }
type GDAXOrderbookL1L2 ¶
type GDAXOrderbookL1L2 struct { Sequence int64 `json:"sequence"` Bids []GDAXOrderL1L2 `json:"asks"` Asks []GDAXOrderL1L2 `json:"asks"` }
type GDAXOrderbookL3 ¶
type GDAXOrderbookL3 struct { Sequence int64 `json:"sequence"` Bids []GDAXOrderL3 `json:"asks"` Asks []GDAXOrderL3 `json:"asks"` }
type GDAXOrderbookResponse ¶
type GDAXOrderbookResponse struct { Sequence int64 `json:"sequence"` Bids [][]interface{} `json:"bids"` Asks [][]interface{} `json:"asks"` }
type GDAXOrdersResponse ¶
type GDAXOrdersResponse struct { ID string `json:"id"` Size float64 `json:"size,string"` Price float64 `json:"price,string"` ProductID string `json:"product_id"` Status string `json:"status"` FilledSize float64 `json:"filled_size,string"` FillFees float64 `json:"fill_fees,string"` Settled bool `json:"settled"` Side string `json:"side"` CreatedAt string `json:"created_at"` }
type GDAXProduct ¶
type GDAXProduct struct { ID string `json:"id"` BaseCurrency string `json:"base_currency"` QuoteCurrency string `json:"quote_currency"` BaseMinSize float64 `json:"base_min_size,string"` BaseMaxSize int64 `json:"base_max_size,string"` QuoteIncrement float64 `json:"quote_increment,string"` DisplayName string `json:"string"` }
type GDAXReportResponse ¶
type GDAXReportResponse struct { ID string `json:"id"` Type string `json:"type"` Status string `json:"status"` CreatedAt string `json:"created_at"` CompletedAt string `json:"completed_at"` ExpiresAt string `json:"expires_at"` FileURL string `json:"file_url"` Params struct { StartDate string `json:"start_date"` EndDate string `json:"end_date"` } `json:"params"` }
type GDAXTicker ¶
type GDAXWebsocketChange ¶
type GDAXWebsocketDone ¶
type GDAXWebsocketMatch ¶
type GDAXWebsocketMatch struct { Type string `json:"type"` TradeID int `json:"trade_id"` Sequence int `json:"sequence"` MakerOrderID string `json:"maker_order_id"` TakerOrderID string `json:"taker_order_id"` Time string `json:"time"` Size float64 `json:"size,string"` Price float64 `json:"price,string"` Side string `json:"side"` }
type GDAXWebsocketOpen ¶
type GDAXWebsocketReceived ¶
type GDAXWebsocketSubscribe ¶
Click to show internal directories.
Click to hide internal directories.