Versions in this module Expand all Collapse all v2 v2.4.1 Apr 2, 2024 Changes in this version + const AddAction + const DeleteAction + const Endpoint + const OrderStatusClosed + const OrderStatusOpen + const UpdateAction + type Action string + type Balance struct + Available decimal.Decimal + CurrencySymbol string + Total decimal.Decimal + type Client struct + func NewClient(httpClient *http.Client, signalrClient *signalr.Client, ...) *Client + func (c *Client) GetBalances(ctx context.Context) ([]Balance, error) + func (c *Client) GetClosedOrders(ctx context.Context, start time.Time) (*Orders, error) + func (c *Client) GetOpenOrders(ctx context.Context) (*Orders, error) + func (c *Client) GetOrderBook(ctx context.Context, marketSymbol string, depth int) (*OrderBook, error) + func (c *Client) Run(ctx context.Context) error + func (c *Client) SubscribeOpenOrders(ctx context.Context, start time.Time, ...) error + func (c *Client) SubscribeOrderBook(ctx context.Context, marketSymbol string, depth int, ...) error + type Order struct + Ceiling decimal.NullDecimal + ClientOrderID string + ClosedAt time.Time + Commission decimal.Decimal + CreatedAt time.Time + FillQuantity decimal.Decimal + ID string + Limit decimal.NullDecimal + MarketSymbol string + Option string + Proceeds decimal.Decimal + Quantity decimal.NullDecimal + Side string + Status OrderStatus + Type string + UpdatedAt time.Time + type OrderBook struct + Asks OrderBookEntries + Bids OrderBookEntries + Depth int + MarketSymbol string + Sequence int + func (b *OrderBook) Apply(delta *OrderBook) *OrderBookDelta + type OrderBookDelta struct + Asks OrderBookDeltaEntries + Bids OrderBookDeltaEntries + Depth int + MarketSymbol string + Sequence int + type OrderBookDeltaEntries []OrderBookDeltaEntry + func (e OrderBookDeltaEntries) SearchRate(rate decimal.Decimal, cmp func(l, r decimal.Decimal) bool) int + func (e OrderBookDeltaEntries) String() string + type OrderBookDeltaEntry struct + Action Action + Quantity decimal.Decimal + Rate decimal.Decimal + type OrderBookEntries []OrderBookEntry + func (e OrderBookEntries) Apply(deltas OrderBookEntries, cmp func(l, r decimal.Decimal) bool) (OrderBookEntries, OrderBookDeltaEntries) + func (e OrderBookEntries) OrderBookDeltaEntries(action Action) OrderBookDeltaEntries + func (e OrderBookEntries) SearchRate(rate decimal.Decimal, f func(l, r decimal.Decimal) bool) int + func (e OrderBookEntries) String() string + type OrderBookEntry struct + Quantity decimal.Decimal + Rate decimal.Decimal + func (e OrderBookEntry) OrderBookDiffEntry(action Action) OrderBookDeltaEntry + type OrderDelta struct + Action Action + Order *Order + Sequence int + type OrderNotFoundError struct + ID string + func (e *OrderNotFoundError) Error() string + type OrderStatus string + func (s *OrderStatus) UnmarshalJSON(data []byte) error + type Orders struct + Data []*Order + Sequence int + func (o *Orders) Apply(sequence int, order *Order) (*OrderDelta, error) + func (o *Orders) SearchOrder(order *Order) int + type SequenceError struct + Actual int + Expected int + func (e *SequenceError) Error() string + type SubscriptionError struct + Streams []string + func (e *SubscriptionError) Error() string