Documentation
¶
Index ¶
- func NewAccountStream(ctx context.Context, apiKey, apiSecret string, opts ...AccountStreamOpt) error
- func NewAggregatedOrderbookUpdatesStream(ctx context.Context, apiKey, apiSecret string, pairs []string, ...) error
- func NewMarketSummaryUpdatesStream(ctx context.Context, apiKey, apiSecret string, pairs []string, ...) error
- func NewTradeBucketStream(ctx context.Context, apiKey, apiSecret string, pairs []string, ...) error
- func NewTradeStream(ctx context.Context, apiKey, apiSecret string, pairs []string, ...) error
- type AccountStreamOpt
- type AggregatedOrderbookUpdate
- type BalanceUpdate
- type Currency
- type CurrencyPair
- type MarketSummaryUpdate
- type NewTrade
- type NewTradeBucket
- type OpenOrderUpdate
- type OrderStatusType
- type OrderStatusUpdate
- type OrderType
- type OrderbookEntry
- type Side
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountStream ¶
func NewAccountStream(ctx context.Context, apiKey, apiSecret string, opts ...AccountStreamOpt) error
func NewTradeBucketStream ¶
Types ¶
type AccountStreamOpt ¶
type AccountStreamOpt func(*accountStreamOpts)
func OnAny ¶
func OnAny(fn func(responseType string, bl []byte)) AccountStreamOpt
func OnBalanceUpdate ¶
func OnBalanceUpdate(fn func(BalanceUpdate)) AccountStreamOpt
func OnOpenOrdersUpdate ¶
func OnOpenOrdersUpdate(fn func([]OpenOrderUpdate)) AccountStreamOpt
func OnOrderStatusUpdate ¶
func OnOrderStatusUpdate(fn func(OrderStatusUpdate)) AccountStreamOpt
type AggregatedOrderbookUpdate ¶
type AggregatedOrderbookUpdate struct { Pair string `json:"currencyPairSymbol"` Asks []OrderbookEntry `json:"Asks"` Bids []OrderbookEntry `json:"Bids"` LastChange time.Time `json:"LastChange"` }
type BalanceUpdate ¶
type Currency ¶
type Currency struct { ID int `json:"id"` Symbol string `json:"symbol"` DecimalPlaces int `json:"decimalPlaces"` IsActive bool `json:"isActive"` ShortName string `json:"shortName"` LongName string `json:"longName"` CurrencyDecimalPlaces int `json:"currencyDecimalPlaces"` SupportedWithdrawDecimalPlaces int `json:"supportedWithdrawDecimalPlaces"` }
type CurrencyPair ¶
type CurrencyPair struct { ID int `json:"id"` Symbol string `json:"symbol"` BaseCurrency Currency `json:"baseCurrency"` QuoteCurrency Currency `json:"quoteCurrency"` ShortName string `json:"shortName"` Exchange string `json:"exchange"` Active bool `json:"active"` MinBaseAmount decimal.Decimal `json:"minBaseAmount"` MaxBaseAmount decimal.Decimal `json:"maxBaseAmount"` MinQuoteAmount decimal.Decimal `json:"minQuoteAmount"` MaxQuoteAmount decimal.Decimal `json:"maxQuoteAmount"` }
type MarketSummaryUpdate ¶
type MarketSummaryUpdate struct { Pair string `json:"currencyPairSymbol"` Ask decimal.Decimal `json:"askPrice"` Bid decimal.Decimal `json:"bidPrice"` Last decimal.Decimal `json:"lastTradedPrice"` Close decimal.Decimal `json:"previousClosePrice"` BaseVolume decimal.Decimal `json:"baseVolume"` QuoteVolume decimal.Decimal `json:"quoteVolume"` High decimal.Decimal `json:"highPrice"` Low decimal.Decimal `json:"lowPrice"` Created time.Time `json:"created"` Change decimal.Decimal `json:"changeFromPrevious"` }
type NewTradeBucket ¶
type NewTradeBucket struct { Pair string `json:"currencyPair"` Period int `json:"bucketPeriodInSeconds"` Start time.Time `json:"startTime"` Open decimal.Decimal `json:"open"` High decimal.Decimal `json:"high"` Low decimal.Decimal `json:"low"` Close decimal.Decimal `json:"close"` Volume decimal.Decimal `json:"volume"` }
type OpenOrderUpdate ¶
type OpenOrderUpdate struct { OrderID string `json:"orderId"` Side Side `json:"side"` Quantity decimal.Decimal `json:"quantity"` Price decimal.Decimal `json:"price"` CurrencyPair string `json:"currencyPair"` CreatedAt time.Time `json:"createdAt"` OriginalQuantity decimal.Decimal `json:"originalQuantity"` FilledPercentage decimal.Decimal `json:"filledPercentage"` CustomerOrderID string `json:"customerOrderId"` }
type OrderStatusType ¶
type OrderStatusType string
const OrderStatusTypeCancelled OrderStatusType = "Cancelled"
const OrderStatusTypeFailed OrderStatusType = "Failed"
const OrderStatusTypeFilled OrderStatusType = "Filled"
const OrderStatusTypeInstantOrderCompleted OrderStatusType = "Instant Order Completed"
const OrderStatusTypeInstantOrderReserveFailed OrderStatusType = "Instant Order Balance Reserve Failed"
const OrderStatusTypeInstantOrderReserved OrderStatusType = "Instant Order Balance Reserved"
const OrderStatusTypePartiallyFilled OrderStatusType = "Partially Filled"
const OrderStatusTypePlaced OrderStatusType = "Placed"
type OrderStatusUpdate ¶
type OrderStatusUpdate struct { OrderID string `json:"orderId"` OrderStatusType OrderStatusType `json:"orderStatusType"` CurrencyPair string `json:"currencyPair"` OriginalPrice decimal.Decimal `json:"originalPrice"` RemainingQuantity decimal.Decimal `json:"remainingQuantity"` OriginalQuantity decimal.Decimal `json:"originalQuantity"` OrderSide Side `json:"orderSide"` OrderType OrderType `json:"orderType"` FailedReason string `json:"failedReason"` OrderUpdatedAt time.Time `json:"orderUpdatedAt"` OrderCreatedAt time.Time `json:"orderCreatedAt"` CustomerOrderID string `json:"customerOrderId"` }
type OrderbookEntry ¶
Click to show internal directories.
Click to hide internal directories.