Documentation
¶
Index ¶
- type Balance
- type Bittrex
- func (b *Bittrex) CancelOrder(uuid string) ([]Balance, error)
- func (b *Bittrex) GetAccountBalanceByCurrency(currency string) (Balance, error)
- func (b *Bittrex) GetAccountBalances() ([]Balance, error)
- func (b *Bittrex) GetCurrencies() ([]Currency, error)
- func (b *Bittrex) GetDepositAddress(currency string) (DepositAddress, error)
- func (b *Bittrex) GetDepositHistory(currency string) ([]WithdrawalHistory, error)
- func (b *Bittrex) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (b *Bittrex) GetMarketHistory(currencyPair string) ([]MarketHistory, error)
- func (b *Bittrex) GetMarketSummaries() ([]MarketSummary, error)
- func (b *Bittrex) GetMarketSummary(currencyPair string) ([]MarketSummary, error)
- func (b *Bittrex) GetMarkets() ([]Market, error)
- func (b *Bittrex) GetOpenOrders(currencyPair string) ([]Order, error)
- func (b *Bittrex) GetOrder(uuid string) (Order, error)
- func (b *Bittrex) GetOrderHistory(currencyPair string) ([]Order, error)
- func (b *Bittrex) GetOrderbook(currencyPair string) (OrderBooks, error)
- func (b *Bittrex) GetOrderbookEx(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (b *Bittrex) GetTicker(currencyPair string) (Ticker, error)
- func (b *Bittrex) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (b *Bittrex) GetWithdrawalHistory(currency string) ([]WithdrawalHistory, error)
- func (b *Bittrex) HTTPRequest(path string, auth bool, values url.Values, v interface{}) error
- func (b *Bittrex) PlaceBuyLimit(currencyPair string, quantity, rate float64) ([]UUID, error)
- func (b *Bittrex) PlaceSellLimit(currencyPair string, quantity, rate float64) ([]UUID, error)
- func (b *Bittrex) Run()
- func (b *Bittrex) SendAuthenticatedHTTPRequest(path string, values url.Values, result interface{}) (err error)
- func (b *Bittrex) SetDefaults()
- func (b *Bittrex) Setup(exch config.ExchangeConfig)
- func (b *Bittrex) Start()
- func (b *Bittrex) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (b *Bittrex) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (b *Bittrex) Withdraw(currency, paymentID, address string, quantity float64) (UUID, error)
- type Currency
- type DepositAddress
- type Market
- type MarketHistory
- type MarketSummary
- type Order
- type OrderBook
- type OrderBooks
- type Response
- type Ticker
- type UUID
- type WithdrawalHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Balance struct { Currency string `json:"Currency"` Balance float64 `json:"Balance"` Available float64 `json:"Available"` Pending float64 `json:"Pending"` CryptoAddress string `json:"CryptoAddress"` Requested bool `json:"Requested"` UUID string `json:"Uuid"` }
Balance holds the balance from your account for a specified currency
type Bittrex ¶
type Bittrex struct {
exchange.Base
}
Bittrex is the overaching type across the bittrex methods
func (*Bittrex) CancelOrder ¶
CancelOrder is used to cancel a buy or sell order.
func (*Bittrex) GetAccountBalanceByCurrency ¶
GetAccountBalanceByCurrency is used to retrieve the balance from your account for a specific currency. ie. "btc" or "ltc"
func (*Bittrex) GetAccountBalances ¶
GetAccountBalances is used to retrieve all balances from your account
func (*Bittrex) GetCurrencies ¶
GetCurrencies is used to get all supported currencies at Bittrex
func (*Bittrex) GetDepositAddress ¶
func (b *Bittrex) GetDepositAddress(currency string) (DepositAddress, error)
GetDepositAddress is used to retrieve or generate 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(currency string) ([]WithdrawalHistory, error)
GetDepositHistory is used to retrieve your deposit history. If currency is is omitted it will return the entire deposit history
func (*Bittrex) GetExchangeAccountInfo ¶
GetExchangeAccountInfo Retrieves balances for all enabled currencies for the Bittrex exchange
func (*Bittrex) GetMarketHistory ¶
func (b *Bittrex) GetMarketHistory(currencyPair string) ([]MarketHistory, error)
GetMarketHistory retrieves the latest trades that have occurred for a specific market
func (*Bittrex) GetMarketSummaries ¶
func (b *Bittrex) GetMarketSummaries() ([]MarketSummary, error)
GetMarketSummaries is used to get the last 24 hour summary of all active exchanges
func (*Bittrex) GetMarketSummary ¶
func (b *Bittrex) GetMarketSummary(currencyPair string) ([]MarketSummary, error)
GetMarketSummary is used to get the last 24 hour summary of all active exchanges by currency pair (btc-ltc).
func (*Bittrex) GetMarkets ¶
GetMarkets is used to get the open and available trading markets at Bittrex along with other meta data.
func (*Bittrex) GetOpenOrders ¶
GetOpenOrders returns all orders that you currently have opened. A specific market can be requested for example "btc-ltc"
func (*Bittrex) GetOrderHistory ¶
GetOrderHistory is used to retrieve your order history. If currencyPair omitted it will return the entire order History.
func (*Bittrex) GetOrderbook ¶
func (b *Bittrex) GetOrderbook(currencyPair string) (OrderBooks, error)
GetOrderbook method returns current order book information by currency, type & depth. "Currency Pair" ie btc-ltc "Category" either "buy", "sell" or "both"; for ease of use and reduced complexity this function is set to "both" "Depth" max depth is 50 but you can literally set it any integer you want and it returns full depth. So depth default is 50.
func (*Bittrex) GetOrderbookEx ¶
GetOrderbookEx returns the orderbook for a currency pair
func (*Bittrex) GetTicker ¶
GetTicker sends a public get request and returns current ticker information on the supplied currency. Example currency input param "btc-ltc".
func (*Bittrex) GetTickerPrice ¶
GetTickerPrice returns the ticker for a currency pair
func (*Bittrex) GetWithdrawalHistory ¶
func (b *Bittrex) GetWithdrawalHistory(currency string) ([]WithdrawalHistory, error)
GetWithdrawalHistory is used to retrieve your withdrawal history. If currency omitted it will return the entire history
func (*Bittrex) HTTPRequest ¶
HTTPRequest is a generalised http request function.
func (*Bittrex) PlaceBuyLimit ¶
PlaceBuyLimit is used to place a buy order in a specific market. Use buylimit to place limit orders. Make sure you have the proper permissions set on your API keys for this call to work. "Currency" ie "btc-ltc" "Quantity" is the amount to purchase "Rate" is the rate at which to purchase
func (*Bittrex) PlaceSellLimit ¶
PlaceSellLimit is used to place a sell order in a specific market. Use selllimit to place limit orders. Make sure you have the proper permissions set on your API keys for this call to work. "Currency" ie "btc-ltc" "Quantity" is the amount to purchase "Rate" is the rate at which to purchase
func (*Bittrex) SendAuthenticatedHTTPRequest ¶
func (b *Bittrex) SendAuthenticatedHTTPRequest(path string, values url.Values, result interface{}) (err error)
SendAuthenticatedHTTPRequest sends an authenticated http request to a desired path
func (*Bittrex) SetDefaults ¶
func (b *Bittrex) SetDefaults()
SetDefaults method assignes the default values for Bittrex
func (*Bittrex) Setup ¶
func (b *Bittrex) Setup(exch config.ExchangeConfig)
Setup method sets current configuration details if enabled
func (*Bittrex) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Bittrex) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
type Currency ¶
type Currency struct { Currency string `json:"Currency"` CurrencyLong string `json:"CurrencyLong"` MinConfirmation int `json:"MinConfirmation"` TxFee float64 `json:"TxFee"` IsActive bool `json:"IsActive"` CoinType string `json:"CoinType"` BaseAddress string `json:"BaseAddress"` }
Currency holds supported currency metadata
type DepositAddress ¶
DepositAddress holds a generated address to send specific coins to the exchange
type Market ¶
type Market struct { MarketCurrency string `json:"MarketCurrency"` BaseCurrency string `json:"BaseCurrency"` MarketCurrencyLong string `json:"MarketCurrencyLong"` BaseCurrencyLong string `json:"BaseCurrencyLong"` MinTradeSize float64 `json:"MinTradeSize"` MarketName string `json:"MarketName"` IsActive bool `json:"IsActive"` Created string `json:"Created"` }
Market holds current market metadata
type MarketHistory ¶
type MarketHistory struct { ID int `json:"Id"` Timestamp string `json:"TimeStamp"` Quantity float64 `json:"Quantity"` Price float64 `json:"Price"` Total float64 `json:"Total"` FillType string `json:"FillType"` OrderType string `json:"OrderType"` }
MarketHistory holds an executed trade's data for a market ie "BTC-LTC"
type MarketSummary ¶
type MarketSummary struct { MarketName string `json:"MarketName"` High float64 `json:"High"` Low float64 `json:"Low"` Volume float64 `json:"Volume"` Last float64 `json:"Last"` BaseVolume float64 `json:"BaseVolume"` TimeStamp string `json:"TimeStamp"` Bid float64 `json:"Bid"` Ask float64 `json:"Ask"` OpenBuyOrders int `json:"OpenBuyOrders"` OpenSellOrders int `json:"OpenSellOrders"` PrevDay float64 `json:"PrevDay"` Created string `json:"Created"` DisplayMarketName string `json:"DisplayMarketName"` }
MarketSummary holds last 24 hour metadata of an active exchange
type Order ¶
type Order struct { AccountID string `json:"AccountId"` OrderUUID string `json:"OrderUuid"` Exchange string `json:"Exchange"` Type string `json:"Type"` Quantity float64 `json:"Quantity"` QuantityRemaining float64 `json:"QuantityRemaining"` Limit float64 `json:"Limit"` Reserved float64 `json:"Reserved"` ReserveRemaining float64 `json:"ReserveRemaining"` CommissionReserved float64 `json:"CommissionReserved"` CommissionReserveRemaining float64 `json:"CommissionReserveRemaining"` CommissionPaid float64 `json:"CommissionPaid"` Price float64 `json:"Price"` PricePerUnit float64 `json:"PricePerUnit"` Opened string `json:"Opened"` Closed string `json:"Closed"` IsOpen bool `json:"IsOpen"` Sentinel string `json:"Sentinel"` CancelInitiated bool `json:"CancelInitiated"` ImmediateOrCancel bool `json:"ImmediateOrCancel"` IsConditional bool `json:"IsConditional"` Condition string `json:"Condition"` ConditionTarget string `json:"ConditionTarget"` }
Order holds the full order information associated with the UUID supplied
type OrderBooks ¶
OrderBooks holds an array of buy & sell orders held on the exchange
type Response ¶
type Response struct { Success bool `json:"success"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
Response is the generalised response type for Bittrex
type UUID ¶
type UUID struct {
ID string `json:"uuid"`
}
UUID contains the universal unique identifier for one or multiple transactions on the exchange
type WithdrawalHistory ¶
type WithdrawalHistory struct { PaymentUUID string `json:"PaymentUuid"` Currency string `json:"Currency"` Amount float64 `json:"Amount"` Address string `json:"Address"` Opened string `json:"Opened"` Authorized bool `json:"Authorized"` PendingPayment bool `json:"PendingPayment"` TxCost float64 `json:"TxCost"` TxID string `json:"TxId"` Canceled bool `json:"Canceled"` InvalidAddress bool `json:"InvalidAddress"` }
WithdrawalHistory holds the Withdrawal history data