Documentation ¶
Index ¶
- Constants
- func MD5Digest(s *string) string
- type CancelResponse
- type CancelResult
- type Client
- func (client *Client) AccountSubs() ([]*SubAccount, error)
- func (client *Client) CancelOrder(ID string) (bool, error)
- func (client *Client) CreateMarketBuyOrder(order *MarketBuyOrder) (*OrderDetails, error)
- func (client *Client) CreateOrder(order *Order) (*OrderDetails, error)
- func (client *Client) GetLatestTickers(filters *GetLatestMarketTickersFilters) ([]*MarketTicker, error)
- func (client *Client) GetMarketDepth(filters *GetMarketDepthFilters) (*MarketDepth, error)
- func (client *Client) GetOrderDetails(ID string) (*OrderDetails, error)
- func (client *Client) ListOrders(filters *ListOrdersFilters) ([]*OrderDetails, error)
- func (client *Client) ListSymbols() ([]*Symbol, error)
- type Config
- type GetLatestMarketTickersFilters
- type GetLatestMarketTickersResponse
- type GetMarketDepthFilters
- type GetMarketDepthResponse
- type GetOrderDetailsFilters
- type ListAccountSubs
- type ListOrdersFilters
- type ListSymbolsResponse
- type MarketBuyOrder
- type MarketDepth
- type MarketTicker
- type Order
- type OrderDetails
- type OrderDetailsResponse
- type OrdersDetailsResponse
- type SubAccount
- type Symbol
Constants ¶
const StatusCode = 0
StatusCode stands for the resp.Status code index
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CancelResponse ¶ added in v0.0.3
type CancelResponse struct { Code string `json:"code"` Result CancelResult `json:"data"` Message string `json:"message"` }
type CancelResult ¶ added in v0.0.3
type CancelResult struct {
Success bool `json:"result"`
}
type Client ¶
type Client struct { Config *Config BaseURL *url.URL UserAgent string // contains filtered or unexported fields }
Client stands for the NovaDAX API HTTP client
func Default ¶
func Default() *Client
Default returns a new default instance of NovaDAX API http client
func (*Client) AccountSubs ¶ added in v0.0.3
func (client *Client) AccountSubs() ([]*SubAccount, error)
AccountSubs returns current available sub accounts for NovaDAX
func (*Client) CancelOrder ¶ added in v0.0.3
func (*Client) CreateMarketBuyOrder ¶ added in v0.0.4
func (client *Client) CreateMarketBuyOrder(order *MarketBuyOrder) (*OrderDetails, error)
CreateMarketBuyOrder creates a new market buy order and return it's details
func (*Client) CreateOrder ¶ added in v0.0.3
func (client *Client) CreateOrder(order *Order) (*OrderDetails, error)
CreateOrder creates a new order and return it's details
func (*Client) GetLatestTickers ¶ added in v0.0.2
func (client *Client) GetLatestTickers(filters *GetLatestMarketTickersFilters) ([]*MarketTicker, error)
GetLatestTickers returns latest market tickers for all key pairs in NovaDAX
func (*Client) GetMarketDepth ¶ added in v0.0.5
func (client *Client) GetMarketDepth(filters *GetMarketDepthFilters) (*MarketDepth, error)
GetMarketDepth returns limit orders for a key pair in NovaDAX
func (*Client) GetOrderDetails ¶ added in v0.0.3
func (client *Client) GetOrderDetails(ID string) (*OrderDetails, error)
func (*Client) ListOrders ¶
func (client *Client) ListOrders(filters *ListOrdersFilters) ([]*OrderDetails, error)
ListOrders returns current market orders based on filters
func (*Client) ListSymbols ¶
ListSymbols returns current available symbols for NovaDAX
type GetLatestMarketTickersFilters ¶ added in v0.0.5
type GetLatestMarketTickersFilters struct {
Symbol string `json:"symbol"`
}
GetLatestMarketTickersFilters stands for the GetLatestTickers possible and required filters
type GetLatestMarketTickersResponse ¶ added in v0.0.2
type GetLatestMarketTickersResponse struct { Code string `json:"code"` MarketTickers []*MarketTicker `json:"data"` Message string `json:"message"` }
GetLatestMarketTickersResponse stands for the response structure for latest market tickers API endpoint
type GetMarketDepthFilters ¶ added in v0.0.5
GetMarketDepthFilters stands for the GetLatestTickers possible and required filters
type GetMarketDepthResponse ¶ added in v0.0.5
type GetMarketDepthResponse struct { Code string `json:"code"` MarketDepth *MarketDepth `json:"data"` Message string `json:"message"` }
GetMarketDepthResponse stands for the response structure for market depth API endpoint
type GetOrderDetailsFilters ¶ added in v0.0.3
type GetOrderDetailsFilters struct {
ID string `json:"id"`
}
type ListAccountSubs ¶ added in v0.0.3
type ListAccountSubs struct { Code string `json:"code"` SubAccounts []*SubAccount `json:"data"` Message string `json:"message"` }
ListAccountSubs stands for the response structure for sub accounts listing API endpoint
type ListOrdersFilters ¶
type ListOrdersFilters struct { Symbol string `json:"symbol"` Status string `json:"status"` FromID string `json:"fromId"` ToID string `json:"toId"` FromTimestamp int64 `json:"fromTimestamp"` ToTimestamp int64 `json:"toTimestamp"` Limit int `json:"limit"` }
ListOrdersFilters stands for the ListOrders possible and required filters
type ListSymbolsResponse ¶
ListSymbolsResponse stands for the response structure for symbol listing API endpoint
type MarketBuyOrder ¶ added in v0.0.4
type MarketBuyOrder struct { Symbol string `json:"symbol"` Type string `json:"type"` Side string `json:"side"` Price string `json:"price,omitempty"` AccountID string `json:"accountId,omitempty"` Value string `json:"value"` }
MarketBuyOrder stands for the market buy order to be sent to NovaDAX
type MarketDepth ¶ added in v0.0.5
type MarketDepth struct { Asks [][]string `json:"asks"` // 0 for price and 1 for amount Bids [][]string `json:"bids"` // 0 for price and 1 for amount Timestamp int64 `json:"timestamp"` }
MarketDepth stands for the NovaDAX API market depth resource
type MarketTicker ¶ added in v0.0.2
type MarketTicker struct { Ask string `json:"ask"` BaseVolume24h string `json:"baseVolume24h"` Bid string `json:"bid"` High24h string `json:"high24h"` LastPrice string `json:"lastPrice"` Low24h string `json:"low24h"` Open24h string `json:"open24h"` QuoteVolume24h string `json:"quoteVolume24h"` Symbol string `json:"symbol"` Timestamp int64 `json:"timestamp"` }
MarketTicker stands for the NovaDAX API market ticker resource
type Order ¶
type Order struct { Symbol string `json:"symbol"` Type string `json:"type"` Side string `json:"side"` Price string `json:"price,omitempty"` AccountID string `json:"accountId,omitempty"` Amount string `json:"amount"` }
Order stands for the common order to be sent to NovaDAX
type OrderDetails ¶ added in v0.0.3
type OrderDetails struct { ID string `json:"id"` Symbol string `json:"symbol"` Type string `json:"type"` Side string `json:"side"` Price string `json:"price"` AveragePrice string `json:"averagePrice"` Amount string `json:"amount"` FilledAmount string `json:"filledAmount"` Value string `json:"value"` FilledValue string `json:"filledValue"` FilledFee string `json:"filledFee"` Status string `json:"status"` Timestamp int64 `json:"timestamp"` }
OrderDetails stands for the order data returned by NovaDAX API
type OrderDetailsResponse ¶ added in v0.0.3
type OrderDetailsResponse struct { Code string `json:"code"` OrderDetails *OrderDetails `json:"data"` }
OrderDetailsResponse returns current orders in NovaDAX
type OrdersDetailsResponse ¶ added in v0.0.3
type OrdersDetailsResponse struct { Code string `json:"code"` OrdersDetails []*OrderDetails `json:"data"` }
OrdersDetailsResponse returns current orders in NovaDAX
type SubAccount ¶ added in v0.0.3
type SubAccount struct { SubID string `json:"subId"` State string `json:"state"` SubAccount string `json:"subAccount"` SubIdentify string `json:"subIdentify"` }
SubAccount stands for NovaDAX's sub account resource
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` BaseCurrency string `json:"baseCurrency"` QuoteCurrency string `json:"quoteCurrency"` AmountPrecision int `json:"amountPrecision"` PricePrecision int `json:"pricePrecision"` ValuePrecision int `json:"valuePrecision"` MinOrderAmount string `json:"minOrderAmount"` MinOrderValue string `json:"minOrderValue"` }
Symbol stands for NovaDAX's available symbol