Versions in this module Expand all Collapse all v0 v0.2.5 Sep 28, 2022 Changes in this version + const API_BASE + const API_VERSION + const AUTHEXPIRED + const BALANCE + const HEARTBEAT + const ORDER + const ORDERBOOK + const TICKER + const TIME_FORMAT + const TRADE + const WS_BASE + const WS_HUB + var CANDLE_INTERVALS = map[string]bool + var ERR_ORDER_MISSING_PARAMETERS = errors.New(...) + var ERR_WITHDRAWAL_MISSING_PARAMETERS = errors.New("missing parameters. make sure (address, currency, quantity) are set") + func NewClient(apiKey, apiSecret string) (c *client) + func NewClientWithCustomHttpConfig(apiKey, apiSecret string, httpClient *http.Client) (c *client) + func NewClientWithCustomTimeout(apiKey, apiSecret string, timeout time.Duration) (c *client) + type Address struct + Address string + Currency string + type AddressParams struct + CurrencySymbol string + type AddressV3 struct + CryptoAddress string + CryptoAddressTag string + CurrencySymbol string + Status string + type Balance struct + Available decimal.Decimal + Balance decimal.Decimal + CryptoAddress string + Currency string + Pending decimal.Decimal + Requested bool + Uuid string + type BalanceD struct + BalanceD decimal.Decimal + type BalanceUpdate struct + AccountID string + Delta struct{ ... } + Sequence int + type BalanceV3 struct + Available decimal.Decimal + CurrencySymbol string + Total decimal.Decimal + UpdatedAt time.Time + type Bittrex struct + func New(apiKey, apiSecret string) *Bittrex + func NewWithCustomHttpClient(apiKey, apiSecret string, httpClient *http.Client) *Bittrex + func NewWithCustomTimeout(apiKey, apiSecret string, timeout time.Duration) *Bittrex + func (b *Bittrex) Authentication(c *signalr.Client) error + func (b *Bittrex) BuyLimit(market string, quantity, rate decimal.Decimal) (uuid string, err error) + func (b *Bittrex) CancelOrder(orderID string) (order OrderV3, err error) + func (b *Bittrex) CreateOrder(params CreateOrderParams) (order OrderV3, err error) + func (b *Bittrex) GetBalance(currency string) (balance Balance, err error) + func (b *Bittrex) GetBalances() (balances []BalanceV3, err error) + func (b *Bittrex) GetClosedDepositHistory(currency string, status DepositStatus) (deposits []DepositV3, err error) + func (b *Bittrex) GetClosedOrders(market string) (closedOrders []OrderV3, err error) + func (b *Bittrex) GetClosedWithdrawals(currency string, status WithdrawalStatus) (withdrawals []WithdrawalV3, err error) + func (b *Bittrex) GetCurrencies() (currencies []CurrencyV3, err error) + func (b *Bittrex) GetCurrency(symbol string) (currencies CurrencyV3, err error) + func (b *Bittrex) GetDepositAddress(currency string) (address AddressV3, err error) + func (b *Bittrex) GetDistribution(market string) (distribution Distribution, err error) + func (b *Bittrex) GetLatestTick(market string, interval string) ([]Candle, error) + func (b *Bittrex) GetMarketHistory(market string) (trades []TradeV3, err error) + func (b *Bittrex) GetMarketSummaries() (marketSummaries []MarketSummaryV3, err error) + func (b *Bittrex) GetMarketSummary(market string) (marketSummary MarketSummaryV3, err error) + func (b *Bittrex) GetMarkets() (markets []MarketV3, err error) + func (b *Bittrex) GetOpenDepositHistory(currency string, status DepositStatus) (deposits []DepositV3, err error) + func (b *Bittrex) GetOpenOrders(market string) (openOrders []OrderV3, err error) + func (b *Bittrex) GetOpenWithdrawals(currency string, status WithdrawalStatus) (withdrawals []WithdrawalV3, err error) + func (b *Bittrex) GetOrder(order_uuid string) (order Order2, err error) + func (b *Bittrex) GetOrderBook(market string, depth int32, cat string) (orderBook OrderBookV3, err error) + func (b *Bittrex) GetOrderBookBuySell(market string, depth int32, cat string) (orderb []OrderbV3, err error) + func (b *Bittrex) GetTicker(market string) (ticker []TickerV3, err error) + func (b *Bittrex) GetTicks(market string, interval string) ([]Candle, error) + func (b *Bittrex) GetWithdrawalByTxId(txid string) (withdrawal WithdrawalV3, err error) + func (b *Bittrex) SubscribeBalanceUpdates(dataCh chan<- BalanceUpdate) error + func (b *Bittrex) SubscribeOrderUpdates(dataCh chan<- OrderUpdate) error + func (b *Bittrex) SubscribeOrderbookUpdates(market string, orderbook chan<- OrderBook, stop chan bool) error + func (b *Bittrex) SubscribeTickerUpdates(market string, ticker chan<- Ticker) error + func (b *Bittrex) Withdraw(address, currency string, quantity decimal.Decimal, tag string) (withdraw WithdrawalV3, err error) + func (c *Bittrex) SetDebug(enable bool) + type Candle struct + BaseVolume decimal.Decimal + Close decimal.Decimal + High decimal.Decimal + Low decimal.Decimal + Open decimal.Decimal + TimeStamp CandleTime + Volume decimal.Decimal + type CandleTime struct + func (t *CandleTime) UnmarshalJSON(b []byte) error + type CreateOrderParams struct + Ceiling float64 + ClientOrderID string + Direction OrderDirection + Limit float64 + MarketSymbol string + Quantity decimal.Decimal + TimeInForce TimeInForce + Type OrderType + UseAwards string + type Currency struct + BaseAddress string + CoinType string + Currency string + CurrencyLong string + IsActive bool + MinConfirmation int + Notice string + TxFee decimal.Decimal + type CurrencyV3 struct + AssociatedTermsOfService []interface{} + BaseAddress string + CoinType string + LogoURL string + MinConfirmations int + Name string + Notice string + ProhibitedIn []interface{} + Status string + Symbol string + TxFee decimal.Decimal + type Deposit struct + Amount decimal.Decimal + Confirmations int + CryptoAddress string + Currency string + Id int64 + LastUpdated jTime + TxId string + type DepositHistoryParams struct + CurrencySymbol string + Status string + type DepositStatus string + const DEPOSIT_ALL + const DEPOSIT_COMPLETED + const DEPOSIT_INVALIDATED + const DEPOSIT_ORPHANED + const DEPOSIT_PENDING + type DepositV3 struct + CompletedAt string + Confirmations int32 + CryptoAddress string + CryptoAddressTag string + CurrencySymbol string + ID string + Quantity decimal.Decimal + Source string + Status string + TxID string + UpdatedAt string + type Distribution struct + AverageBalance decimal.Decimal + Balances decimal.Decimal + Distribution []BalanceD + type Market struct + BaseCurrency string + BaseCurrencyLong string + Created string + IsActive bool + IsRestricted bool + IsSponsored bool + LogoUrl string + MarketCurrency string + MarketCurrencyLong string + MarketName string + MinTradeSize decimal.Decimal + Notice string + type MarketSummary struct + Ask decimal.Decimal + BaseVolume decimal.Decimal + Bid decimal.Decimal + High decimal.Decimal + Last decimal.Decimal + Low decimal.Decimal + MarketName string + OpenBuyOrders int + OpenSellOrders int + PrevDay decimal.Decimal + TimeStamp string + Volume decimal.Decimal + type MarketSummaryV3 struct + High decimal.Decimal + Low decimal.Decimal + PercentChange decimal.Decimal + QuoteVolume decimal.Decimal + Symbol string + UpdatedAt time.Time + Volume decimal.Decimal + type MarketV3 struct + BaseCurrencySymbol string + CreatedAt time.Time + MinTradeSize decimal.Decimal + Notice string + Precision int32 + ProhibitedIn []string + QuoteCurrencySymbol string + Status string + Symbol string + type NewCandles struct + Ticks []Candle + type NewOrder struct + Ceiling string + ClientOrderID string + Direction string + Limit string + MarketSymbol string + Quantity string + TimeInForce string + Type string + UseAwards bool + type Order struct + CancelInitiated bool + Closed *jTime + CommissionPaid decimal.Decimal + Condition string + ConditionTarget decimal.Decimal + Exchange string + ImmediateOrCancel bool + IsConditional bool + Limit decimal.Decimal + Opened jTime + OrderType string + OrderUuid string + Price decimal.Decimal + PricePerUnit decimal.Decimal + Quantity decimal.Decimal + QuantityRemaining decimal.Decimal + Uuid *string + type Order2 struct + AccountId string + CancelInitiated bool + Closed *jTime + CommissionPaid decimal.Decimal + CommissionReserveRemaining decimal.Decimal + CommissionReserved decimal.Decimal + Condition string + ConditionTarget decimal.Decimal + Exchange string + ImmediateOrCancel bool + IsConditional bool + IsOpen bool + Limit decimal.Decimal + Opened jTime + OrderUuid string + Price decimal.Decimal + PricePerUnit decimal.Decimal + Quantity decimal.Decimal + QuantityRemaining decimal.Decimal + ReserveRemaining decimal.Decimal + Reserved decimal.Decimal + Sentinel string + Type string + type OrderBook struct + Buy []Orderb + Sell []Orderb + type OrderBookV3 struct + Ask []OrderbV3 + Bid []OrderbV3 + type OrderData struct + ID string + Type string + type OrderDirection string + const BUY + const SELL + type OrderType string + const CEILING_LIMIT + const CEILING_MARKET + const LIMIT + const MARKET + type OrderUpdate struct + AccountID string + Delta struct{ ... } + Sequence int + type OrderV3 struct + Ceiling decimal.Decimal + ClientOrderID string + ClosedAt time.Time + Commission decimal.Decimal + CreatedAt time.Time + Direction string + FillQuantity decimal.Decimal + ID string + Limit decimal.Decimal + MarketSymbol string + OrderToCancel OrderData + Proceeds decimal.Decimal + Quantity decimal.Decimal + Status string + TimeInForce string + Type string + UpdatedAt time.Time + type Orderb struct + Quantity decimal.Decimal + Rate decimal.Decimal + type OrderbV3 struct + Quantity decimal.Decimal + Rate decimal.Decimal + type OrderbookUpdate struct + AccountID string + AskDeltas []OrderbV3 + BidDeltas []OrderbV3 + Sequence int + type Responce struct + ErrorCode interface{} + Success bool + type Ticker struct + Ask decimal.Decimal + Bid decimal.Decimal + Last decimal.Decimal + type TickerV3 struct + AskRate decimal.Decimal + BidRate decimal.Decimal + LastTradeRate decimal.Decimal + Symbol string + type TimeInForce string + const BUY_NOW + const FILL_OR_KILL + const GOOD_TIL_CANCELLED + const IMMEDIATE_OR_CANCEL + const POST_ONLY_GOOD_TIL_CANCELLED + type Trade struct + FillType string + OrderType string + OrderUuid int64 + Price decimal.Decimal + Quantity decimal.Decimal + Timestamp jTime + Total decimal.Decimal + type TradeV3 struct + ExecutedAt time.Time + ID string + Quantity string + Rate string + TakerSide string + type Uuid struct + Id string + type Withdrawal struct + Address string + Amount decimal.Decimal + Authorized bool + Canceled bool + Currency string + Opened jTime + PaymentUuid string + PendingPayment bool + TxCost decimal.Decimal + TxId string + type WithdrawalHistoryParams struct + CurrencySymbol string + Status string + type WithdrawalParams struct + CryptoAddress string + CryptoAddressTag string + CurrencySymbol string + Quantity string + type WithdrawalStatus string + const ALL + const AUTHORIZED + const CANCELLED + const COMPLETED + const ERROR_INVALID_ADDRESS + const PENDING + const REQUESTED + type WithdrawalV3 struct + CompletedAt time.Time + CreatedAt time.Time + CryptoAddress string + CryptoAddressTag string + CurrencySymbol string + ID string + Quantity decimal.Decimal + Status WithdrawalStatus + TxCost decimal.Decimal + TxID string