Documentation
¶
Index ¶
- Constants
- type Bittrex
- func (b *Bittrex) CancelOrder(UUID string) error
- func (b *Bittrex) GetBalance(currencies ...string) ([]JSONBalance, error)
- func (b *Bittrex) GetCurrencies() ([]JSONCurrency, error)
- func (b *Bittrex) GetDepositAddress(currency string) (JSONDepositAddress, error)
- func (b *Bittrex) GetDepositHistory(currencies ...string) ([]JSONAccountHistory, error)
- func (b *Bittrex) GetMarketHistory(market string) ([]JSONMarketHistory, error)
- func (b *Bittrex) GetMarketSummary(markets ...string) ([]JSONMarketSummary, error)
- func (b *Bittrex) GetMarkets() ([]JSONMarket, error)
- func (b *Bittrex) GetOrder(UUID string) (JSONOrderUUID, error)
- func (b *Bittrex) GetOrderBook(market string, orderType OrderType) (JSONOrderBook, error)
- func (b *Bittrex) GetOrderHistory(markets ...string) ([]JSONOrderHistory, error)
- func (b *Bittrex) GetOrders(market string) ([]JSONOrder, error)
- func (b *Bittrex) GetTicker(market string) (JSONTicker, error)
- func (b *Bittrex) GetWithdrawHistory(currencies ...string) ([]JSONAccountHistory, error)
- func (b *Bittrex) PlaceBuyOrder(market string, quantity float64, rate float64) (JSONUUID, error)
- func (b *Bittrex) PlaceSellOrder(market string, quantity float64, rate float64) (JSONUUID, error)
- func (b *Bittrex) Request(endPoint string, authenticate bool) (json.RawMessage, error)
- func (b *Bittrex) Withdraw(currency string, quantity float64, address string, paymentID ...string) (JSONUUID, error)
- type BittrexConfig
- type JSONAccountHistory
- type JSONBalance
- type JSONCurrency
- type JSONDepositAddress
- type JSONMarket
- type JSONMarketHistory
- type JSONMarketSummary
- type JSONOrder
- type JSONOrderBook
- type JSONOrderBookRate
- type JSONOrderHistory
- type JSONOrderUUID
- type JSONResponseBody
- type JSONTicker
- type JSONUUID
- type OrderType
Constants ¶
const ( BASE_URL = "https://bittrex.com/api" API_VERSION = "v1.1" DEFAULT_TIMEOUT = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bittrex ¶
func NewBittrex ¶
func NewBittrex(key string, secret string, config ...BittrexConfig) *Bittrex
func (*Bittrex) CancelOrder ¶
Cancels buy or sell order by UUID
func (*Bittrex) GetBalance ¶
func (b *Bittrex) GetBalance(currencies ...string) ([]JSONBalance, error)
Retrieves balance for defined currencies, if no currencies are defined return all balances
func (*Bittrex) GetCurrencies ¶
func (b *Bittrex) GetCurrencies() ([]JSONCurrency, error)
Retreives all supported currencies with other meta data
func (*Bittrex) GetDepositAddress ¶
func (b *Bittrex) GetDepositAddress(currency string) (JSONDepositAddress, error)
Retrieves or generates an address for a specific currency. If one does not exist, the call will fail and return ADDRESS_GENERATING until one is available.
func (*Bittrex) GetDepositHistory ¶
func (b *Bittrex) GetDepositHistory(currencies ...string) ([]JSONAccountHistory, error)
Retrives deposit history for defined currencies, if no currencies are defined retrives for all currencies
func (*Bittrex) GetMarketHistory ¶
func (b *Bittrex) GetMarketHistory(market string) ([]JSONMarketHistory, error)
Retrives the latest trades for a specific market
func (*Bittrex) GetMarketSummary ¶
func (b *Bittrex) GetMarketSummary(markets ...string) ([]JSONMarketSummary, error)
Retrives last 24 hour summary of defined markets. If no markets are passed retrives summaries for all markets
func (*Bittrex) GetMarkets ¶
func (b *Bittrex) GetMarkets() ([]JSONMarket, error)
Retreives all open and available trading markets with other meta data
func (*Bittrex) GetOrder ¶
func (b *Bittrex) GetOrder(UUID string) (JSONOrderUUID, error)
Retrives an order
func (*Bittrex) GetOrderBook ¶
func (b *Bittrex) GetOrderBook(market string, orderType OrderType) (JSONOrderBook, error)
Retrives the order book for a given market (buy, sell, or both)
func (*Bittrex) GetOrderHistory ¶
func (b *Bittrex) GetOrderHistory(markets ...string) ([]JSONOrderHistory, error)
Retrives order history for defined markets, if no markets are defined retrives for all markets
func (*Bittrex) GetTicker ¶
func (b *Bittrex) GetTicker(market string) (JSONTicker, error)
Retreives current tick values for defined market
func (*Bittrex) GetWithdrawHistory ¶
func (b *Bittrex) GetWithdrawHistory(currencies ...string) ([]JSONAccountHistory, error)
Retrives withdrawl history for defined currencies, if no currencies are defined retrives for all currencies
func (*Bittrex) PlaceBuyOrder ¶
Places buy limit order for one market
func (*Bittrex) PlaceSellOrder ¶
Places sell limit order for a specific market
type BittrexConfig ¶
type JSONAccountHistory ¶
type JSONBalance ¶
type JSONCurrency ¶
type JSONCurrency struct { Currency string CurrencyLong string MinConfirmation int TxFee float64 IsActive bool CoinType string BaseAddress string }
JSONCurrency : JSON currency result structure
type JSONDepositAddress ¶
type JSONMarket ¶
type JSONMarket struct { MarketCurrency string BaseCurrency string MarketCurrencyLong string BaseCurrencyLong string MinTradeSize float64 MarketName string IsActive bool Created string }
JSONMarket : JSON market result structure
type JSONMarketHistory ¶
type JSONMarketSummary ¶
type JSONMarketSummary struct { MarketName string High float64 Low float64 Volume float64 Last float64 BaseVolume float64 TimeStamp string Bid float64 Ask float64 OpenBuyOrders int OpenSellOrders int PrevDay float64 Created string DisplayMarketName string }
JSONMarketSummary : JSON market summary result structure
type JSONOrder ¶
type JSONOrder struct { UUID string `json:"uuid"` OrderUUID string `json:"OrderUuid"` Exchange string OrderType string Quantity float64 QuantityRemaning float64 Limit float64 CommissionPaid float64 Price float64 PricePerUnit float64 Opened string CancelInitiated bool ImmediateOrCancel bool IsConditional bool Condition string ConditionTarget string // contains filtered or unexported fields }
type JSONOrderBook ¶
type JSONOrderBook struct { Buy []JSONOrderBookRate `json:"buy,omitempty"` Sell []JSONOrderBookRate `json:"sell,omitempty"` }
JSONOrderBook : JSON orderbook structure (buy, sell)
type JSONOrderBookRate ¶
JSONOrderBookRate : JSON orderbook result structure
type JSONOrderHistory ¶
type JSONOrderHistory struct { OrderUUID string `json:"OrderUuid"` Exchange string TimeStamp string OrderType string Quantity float64 QuantityRemaining float64 Limit float64 Commission float64 Price float64 PricePerUnit float64 ImmediateOrCancel bool IsConditional bool Condition string ConditionTarget string }
type JSONOrderUUID ¶
type JSONOrderUUID struct { AccountID string OrderUUID string `json:"OrderUuid"` Exchange string Type string Quantity float64 QuantityRemaining float64 Limit float64 Reserved float64 ReserveRemaining float64 CommissionReserver float64 CommissionReserveRemaining float64 CommissionPaid float64 Price float64 PricePerUnit float64 Opened string Closed string IsOpen bool Sentinel string CancelInitiated bool ImmediateOrCancel bool IsConditional bool Condition string ConditionTarget string }
type JSONResponseBody ¶
type JSONResponseBody struct { Success bool `json:"success"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
JSONResponseBody : JSON high level template for Bittrex API
type JSONTicker ¶
JSONTicker : JSON ticker result structure