Documentation ¶
Index ¶
- type Balance
- type Balances
- type Bittrex
- func (b *Bittrex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error)
- func (b *Bittrex) CancelExistingOrder(uuid string) (Balances, error)
- func (b *Bittrex) CancelOrder(order *order.Cancel) error
- func (b *Bittrex) FetchAccountInfo() (account.Holdings, error)
- func (b *Bittrex) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bittrex) FetchTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bittrex) FetchTradablePairs(asset asset.Item) ([]string, error)
- func (b *Bittrex) GetAccountBalanceByCurrency(currency string) (Balance, error)
- func (b *Bittrex) GetAccountBalances() (Balances, error)
- func (b *Bittrex) GetActiveOrders(req *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *Bittrex) GetCryptoDepositAddress(currency string) (DepositAddress, error)
- func (b *Bittrex) GetCurrencies() (Currency, error)
- func (b *Bittrex) GetDefaultConfig() (*config.ExchangeConfig, error)
- func (b *Bittrex) GetDepositAddress(cryptocurrency currency.Code, _ string) (string, error)
- func (b *Bittrex) GetDepositHistory(currency string) (DepositHistory, error)
- func (b *Bittrex) GetExchangeHistory(p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]exchange.TradeHistory, error)
- func (b *Bittrex) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bittrex) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bittrex) GetFundingHistory() ([]exchange.FundHistory, error)
- func (b *Bittrex) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, error)
- func (b *Bittrex) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, 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(req *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *Bittrex) GetOrderHistoryById(getOrdersRequest string) ([]order.Detail, error)
- func (b *Bittrex) GetOrderHistoryForCurrency(currencyPair string) (Order, error)
- func (b *Bittrex) GetOrderInfo(orderID string) (order.Detail, error)
- func (b *Bittrex) GetOrderbook(currencyPair string) (OrderBooks, error)
- func (b *Bittrex) GetTicker(currencyPair string) (Ticker, error)
- func (b *Bittrex) GetWithdrawalFee(c currency.Code) (float64, error)
- func (b *Bittrex) GetWithdrawalHistory(currency string) (WithdrawalHistory, error)
- func (b *Bittrex) ModifyOrder(action *order.Modify) (string, 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) SendHTTPRequest(path string, result interface{}) error
- func (b *Bittrex) SetDefaults()
- func (b *Bittrex) Setup(exch *config.ExchangeConfig) error
- func (b *Bittrex) Start(wg *sync.WaitGroup)
- func (b *Bittrex) SubmitOrder(s *order.Submit) (order.SubmitResponse, error)
- func (b *Bittrex) UpdateAccountInfo() (account.Holdings, error)
- func (b *Bittrex) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bittrex) UpdateTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bittrex) UpdateTradablePairs(forceUpdate bool) error
- func (b *Bittrex) ValidateCredentials() error
- func (b *Bittrex) Withdraw(currency, paymentID, address string, quantity float64) (UUID, error)
- func (b *Bittrex) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bittrex) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bittrex) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- type Currency
- type DepositAddress
- type DepositHistory
- 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 { Success bool `json:"success"` Message string `json:"message"` Result 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"` } `json:"result"` }
Balance holds the balance from your account for a specified currency
type Balances ¶
type Balances struct { Success bool `json:"success"` Message string `json:"message"` Result []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"` } `json:"result"` }
Balances holds the balance from your account for a specified currency
type Bittrex ¶
Bittrex is the overaching type across the bittrex methods
func (*Bittrex) CancelAllOrders ¶
CancelAllOrders cancels all orders associated with a currency pair
func (*Bittrex) CancelExistingOrder ¶
CancelExistingOrder is used to cancel a buy or sell order.
func (*Bittrex) CancelOrder ¶
CancelOrder cancels an order by its corresponding ID number
func (*Bittrex) FetchAccountInfo ¶
FetchAccountInfo retrieves balances for all enabled currencies
func (*Bittrex) FetchOrderbook ¶
FetchOrderbook returns the orderbook for a currency pair
func (*Bittrex) FetchTicker ¶
FetchTicker returns the ticker for a currency pair
func (*Bittrex) FetchTradablePairs ¶
FetchTradablePairs returns a list of the exchanges tradable pairs
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) GetActiveOrders ¶
GetActiveOrders retrieves any orders that are active/open
func (*Bittrex) GetCryptoDepositAddress ¶
func (b *Bittrex) GetCryptoDepositAddress(currency string) (DepositAddress, error)
GetCryptoDepositAddress 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) GetCurrencies ¶
GetCurrencies is used to get all supported currencies at Bittrex
func (*Bittrex) GetDefaultConfig ¶
func (b *Bittrex) GetDefaultConfig() (*config.ExchangeConfig, error)
GetDefaultConfig returns a default exchange config
func (*Bittrex) GetDepositAddress ¶
GetDepositAddress returns a deposit address for a specified currency
func (*Bittrex) GetDepositHistory ¶
func (b *Bittrex) GetDepositHistory(currency string) (DepositHistory, error)
GetDepositHistory is used to retrieve your deposit history. If currency is is omitted it will return the entire deposit history
func (*Bittrex) GetExchangeHistory ¶
func (b *Bittrex) GetExchangeHistory(p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]exchange.TradeHistory, error)
GetExchangeHistory returns historic trade data within the timeframe provided.
func (*Bittrex) GetFee ¶
func (b *Bittrex) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFee returns an estimate of fee based on type of transaction
func (*Bittrex) GetFeeByType ¶
func (b *Bittrex) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFeeByType returns an estimate of fee based on type of transaction
func (*Bittrex) GetFundingHistory ¶
func (b *Bittrex) GetFundingHistory() ([]exchange.FundHistory, error)
GetFundingHistory returns funding history, deposits and withdrawals
func (*Bittrex) GetHistoricCandles ¶
func (b *Bittrex) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error)
GetHistoricCandles returns candles between a time period for a set time interval
func (*Bittrex) GetHistoricCandlesExtended ¶
func (b *Bittrex) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error)
GetHistoricCandlesExtended returns candles between a time period for a set time interval
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 retrieves account order information Can Limit response to specific order status
func (*Bittrex) GetOrderHistoryById ¶
GetOrderHistoryById retrieves specified closed order information Can Limit response to specific order status
func (*Bittrex) GetOrderHistoryForCurrency ¶
GetOrderHistoryForCurrency is used to retrieve your order history. If currencyPair omitted it will return the entire order History.
func (*Bittrex) GetOrderInfo ¶
GetOrderInfo returns information on a current open order
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) GetTicker ¶
GetTicker sends a public get request and returns current ticker information on the supplied currency. Example currency input param "btc-ltc".
func (*Bittrex) GetWithdrawalFee ¶
GetWithdrawalFee returns the fee for withdrawing from the exchange
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) ModifyOrder ¶
ModifyOrder will allow of changing orderbook placement and limit to market conversion
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) SendHTTPRequest ¶
SendHTTPRequest sends an unauthenticated HTTP request
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) error
Setup method sets current configuration details if enabled
func (*Bittrex) SubmitOrder ¶
SubmitOrder submits a new order
func (*Bittrex) UpdateAccountInfo ¶
UpdateAccountInfo Retrieves balances for all enabled currencies for the Bittrex exchange
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
func (*Bittrex) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*Bittrex) ValidateCredentials ¶
ValidateCredentials validates current credentials used for wrapper functionality
func (*Bittrex) Withdraw ¶
Withdraw is used to withdraw funds from your account. note: Please account for transaction fee.
func (*Bittrex) WithdrawCryptocurrencyFunds ¶
func (b *Bittrex) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bittrex) WithdrawFiatFunds ¶
func (b *Bittrex) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bittrex) WithdrawFiatFundsToInternationalBank ¶
func (b *Bittrex) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is submitted
type Currency ¶
type Currency struct { Success bool `json:"success"` Message string `json:"message"` Result []struct { Currency string `json:"Currency"` CurrencyLong string `json:"CurrencyLong"` MinConfirmation int64 `json:"MinConfirmation"` TxFee float64 `json:"TxFee"` IsActive bool `json:"IsActive"` CoinType string `json:"CoinType"` BaseAddress string `json:"BaseAddress"` } `json:"result"` }
Currency holds supported currency metadata
type DepositAddress ¶
type DepositAddress struct { Success bool `json:"success"` Message string `json:"message"` Result struct { Currency string `json:"Currency"` Address string `json:"Address"` } `json:"result"` }
DepositAddress holds a generated address to send specific coins to the exchange
type DepositHistory ¶
type DepositHistory struct { Success bool `json:"success"` Message string `json:"message"` Result []struct { ID int64 `json:"Id"` Amount float64 `json:"Amount"` Currency string `json:"Currency"` Confirmations int64 `json:"Confirmations"` LastUpdated string `json:"LastUpdated"` TxID string `json:"TxId"` CryptoAddress string `json:"CryptoAddress"` } `json:"result"` }
DepositHistory holds the Deposit history data
type Market ¶
type Market struct { Success bool `json:"success"` Message string `json:"message"` Result []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"` } `json:"result"` }
Market holds current market metadata
type MarketHistory ¶
type MarketHistory struct { Success bool `json:"success"` Message string `json:"message"` Result []struct { ID int64 `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"` } `json:"result"` }
MarketHistory holds an executed trade's data for a market ie "BTC-LTC"
type MarketSummary ¶
type MarketSummary struct { Success bool `json:"success"` Message string `json:"message"` Result []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 int64 `json:"OpenBuyOrders"` OpenSellOrders int64 `json:"OpenSellOrders"` PrevDay float64 `json:"PrevDay"` Created string `json:"Created"` DisplayMarketName string `json:"DisplayMarketName"` } `json:"result"` }
MarketSummary holds last 24 hour metadata of an active exchange
type Order ¶
type Order struct { Success bool `json:"success"` Message string `json:"message"` Result []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"` // Below Used in OrderHistory TimeStamp string `json:"TimeStamp"` Commission float64 `json:"Commission"` } `json:"result"` }
Order holds the full order information associated with the UUID supplied
type OrderBooks ¶
type OrderBooks struct { Success bool `json:"success"` Message string `json:"message"` Result struct { Buy []OrderBook `json:"buy"` Sell []OrderBook `json:"sell"` } `json:"result"` }
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 Ticker ¶
type Ticker struct { Success bool `json:"success"` Message string `json:"message"` Result struct { Bid float64 `json:"Bid"` Ask float64 `json:"Ask"` Last float64 `json:"Last"` } `json:"result"` }
Ticker holds basic ticker information
type UUID ¶
type UUID struct { Success bool `json:"success"` Message string `json:"message"` Result struct { ID string `json:"uuid"` } `json:"result"` }
UUID contains the universal unique identifier for one or multiple transactions on the exchange
type WithdrawalHistory ¶
type WithdrawalHistory struct { Success bool `json:"success"` Message string `json:"message"` Result []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"` } `json:"result"` }
WithdrawalHistory holds the Withdrawal history data