Documentation ¶
Index ¶
- Constants
- type Action
- type Balance
- type 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
- type OrderBook
- type OrderBookDelta
- type OrderBookDeltaEntries
- type OrderBookDeltaEntry
- type OrderBookEntries
- 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
- type OrderDelta
- type OrderNotFoundError
- type OrderStatus
- type Orders
- type SequenceError
- type SubscriptionError
Constants ¶
View Source
const ( AddAction = Action("add") UpdateAction = Action("update") DeleteAction = Action("delete") )
View Source
const ( OrderStatusOpen = OrderStatus("OPEN") OrderStatusClosed = OrderStatus("CLOSED") )
View Source
const (
Endpoint = "https://api.bittrex.com/v3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetClosedOrders ¶
func (*Client) GetOrderBook ¶
func (*Client) SubscribeOpenOrders ¶
type Order ¶
type Order struct { ID string `json:"id"` ClientOrderID string `json:"clientOrderId"` MarketSymbol string `json:"marketSymbol"` Side string `json:"direction"` Type string `json:"type"` Quantity decimal.NullDecimal `json:"quantity"` Ceiling decimal.NullDecimal `json:"ceiling"` Limit decimal.NullDecimal `json:"limit"` Option string `json:"timeInForce"` FillQuantity decimal.Decimal `json:"fillQuantity"` Commission decimal.Decimal `json:"commission"` Proceeds decimal.Decimal `json:"proceeds"` Status OrderStatus `json:"status"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ClosedAt time.Time `json:"closedAt"` }
type OrderBook ¶
type OrderBook struct { MarketSymbol string Depth int Sequence int Bids OrderBookEntries Asks OrderBookEntries }
func (*OrderBook) Apply ¶
func (b *OrderBook) Apply(delta *OrderBook) *OrderBookDelta
type OrderBookDelta ¶
type OrderBookDelta struct { MarketSymbol string Depth int Sequence int Bids OrderBookDeltaEntries Asks OrderBookDeltaEntries }
type OrderBookDeltaEntries ¶
type OrderBookDeltaEntries []OrderBookDeltaEntry
func (OrderBookDeltaEntries) SearchRate ¶
func (OrderBookDeltaEntries) String ¶
func (e OrderBookDeltaEntries) String() string
type OrderBookDeltaEntry ¶
type OrderBookEntries ¶
type OrderBookEntries []OrderBookEntry
func (OrderBookEntries) Apply ¶
func (e OrderBookEntries) Apply(deltas OrderBookEntries, cmp func(l, r decimal.Decimal) bool) (OrderBookEntries, OrderBookDeltaEntries)
func (OrderBookEntries) OrderBookDeltaEntries ¶
func (e OrderBookEntries) OrderBookDeltaEntries(action Action) OrderBookDeltaEntries
func (OrderBookEntries) SearchRate ¶
func (OrderBookEntries) String ¶
func (e OrderBookEntries) String() string
type OrderBookEntry ¶
func (OrderBookEntry) OrderBookDiffEntry ¶
func (e OrderBookEntry) OrderBookDiffEntry(action Action) OrderBookDeltaEntry
type OrderDelta ¶
type OrderNotFoundError ¶
type OrderNotFoundError struct {
ID string
}
func (*OrderNotFoundError) Error ¶
func (e *OrderNotFoundError) Error() string
type OrderStatus ¶
type OrderStatus string
func (*OrderStatus) UnmarshalJSON ¶
func (s *OrderStatus) UnmarshalJSON(data []byte) error
type Orders ¶
func (*Orders) SearchOrder ¶
type SequenceError ¶
type SequenceError struct {
Expected, Actual int
}
func (*SequenceError) Error ¶
func (e *SequenceError) Error() string
type SubscriptionError ¶
type SubscriptionError struct {
Streams []string
}
func (*SubscriptionError) Error ¶
func (e *SubscriptionError) Error() string
Click to show internal directories.
Click to hide internal directories.