Versions in this module Expand all Collapse all v0 v0.2.0 Nov 4, 2021 Changes in this version + type BookResponse struct + Result BookResult + type BookResult struct + Asks [][]float64 + Bids [][]float64 + Timestamp time.Time type CommonAPI + GetBook func(ctx context.Context, instrument string, depth int) (*BookResult, error) v0.1.0 Oct 28, 2021 Changes in this version + const ExecInstPostOnly + const OrderSideBuy + const OrderSideSell + const OrderTypeLimit + const OrderTypeMarket + const OrderTypeStopLimit + const OrderTypeStopLoss + const OrderTypeTakeProfit + const OrderTypeTakeProfitLimit + const TimeInForceFillOrKill + const TimeInForceGoodTilCancelled + const TimeInForceImmediateOrCancel + func New(apiKey string, secretKey string, opts ...ClientOption) (*client, error) + type Account struct + Available float64 + Balance float64 + Currency string + Order float64 + Stake float64 + type AccountSummaryResponse struct + Result AccountSummaryResult + type AccountSummaryResult struct + Accounts []Account + type CancelAllOrdersResponse struct + type CancelOrderResponse struct + type ClientOption func(*client) error + func WithHTTPClient(httpClient *http.Client) ClientOption + func WithProductionEnvironment() ClientOption + func WithUATEnvironment() ClientOption + type CommonAPI interface + GetInstruments func(ctx context.Context) ([]Instrument, error) + GetTickers func(ctx context.Context, instrument string) ([]Ticker, error) + type CreateOrderRequest struct + ClientOID string + ExecInst ExecInst + InstrumentName string + Notional float64 + Price float64 + Quantity float64 + Side OrderSide + TimeInForce TimeInForce + TriggerPrice float64 + Type OrderType + type CreateOrderResponse struct + Result CreateOrderResult + type CreateOrderResult struct + ClientOID string + OrderID string + type CryptoDotComExchange interface + UpdateConfig func(apiKey string, secretKey string, opts ...ClientOption) error + type DerivativesTransferAPI interface + type Environment string + const EnvironmentProduction + const EnvironmentUATSandbox + type ExecInst string + type GetOpenOrdersRequest struct + InstrumentName string + Page int + PageSize int + type GetOpenOrdersResponse struct + Result GetOpenOrdersResult + type GetOpenOrdersResult struct + Count int + OrderList []Order + type GetOrderDetailResponse struct + Result GetOrderDetailResult + type GetOrderDetailResult struct + OrderInfo Order + TradeList []Trade + type GetOrderHistoryRequest struct + End time.Time + InstrumentName string + Page int + PageSize int + Start time.Time + type GetOrderHistoryResponse struct + Result GetOrderHistoryResult + type GetOrderHistoryResult struct + OrderList []Order + type GetTradesRequest struct + End time.Time + InstrumentName string + Page int + PageSize int + Start time.Time + type GetTradesResponse struct + Result GetTradesResult + type GetTradesResult struct + TradeList []Trade + type Instrument struct + BaseCurrency string + InstrumentName string + MarginTradingEnabled bool + PriceDecimals int + QuantityDecimals int + QuoteCurrency string + type InstrumentResult struct + Instruments []Instrument + type InstrumentsResponse struct + Result InstrumentResult + type LiquidityIndicator string + const LiquidityIndicatorMaker + const LiquidityIndicatorTaker + type MarginTradingAPI interface + type Order struct + AvgPrice float64 + ClientOID string + CreateTime time.Time + CumulativeQuantity float64 + CumulativeValue float64 + ExecInst ExecInst + FeeCurrency string + InstrumentName string + OrderID string + OrderType OrderType + Price float64 + Quantity float64 + Reason string + Side OrderSide + Status OrderStatus + TimeInForce TimeInForce + TriggerPrice float64 + UpdateTime time.Time + type OrderSide string + type OrderStatus string + const OrderStatusActive + const OrderStatusCancelled + const OrderStatusExpired + const OrderStatusFilled + const OrderStatusRejected + type OrderType string + type SingleTickerResponse struct + Result SingleTickerResult + type SingleTickerResult struct + Data Ticker + type SpotTradingAPI interface + CancelAllOrders func(ctx context.Context, instrumentName string) error + CancelOrder func(ctx context.Context, instrumentName string, orderID string) error + CreateOrder func(ctx context.Context, req CreateOrderRequest) (*CreateOrderResult, error) + GetAccountSummary func(ctx context.Context, currency string) ([]Account, error) + GetOpenOrders func(ctx context.Context, req GetOpenOrdersRequest) (*GetOpenOrdersResult, error) + GetOrderDetail func(ctx context.Context, orderID string) (*GetOrderDetailResult, error) + GetOrderHistory func(ctx context.Context, req GetOrderHistoryRequest) ([]Order, error) + GetTrades func(ctx context.Context, req GetTradesRequest) ([]Trade, error) + type SubAccountAPI interface + type Ticker struct + AskPrice float64 + BidPrice float64 + Instrument string + LatestTradePrice float64 + PriceChange24h float64 + PriceHigh24h float64 + PriceLow24h float64 + Timestamp float64 + Volume24H float64 + type TickerResponse struct + Result TickerResult + type TickerResult struct + Data []Ticker + type TimeInForce string + type Trade struct + ClientOrderID string + CreateTime time.Time + Fee float64 + FeeCurrency string + InstrumentName string + LiquidityIndicator LiquidityIndicator + OrderID string + Side OrderSide + TradeID string + TradedPrice float64 + TradedQuantity float64 + type Websocket interface