Documentation ¶
Index ¶
- Constants
- type Account
- type AccountVolume
- type Address
- type AddressList
- type Balance
- type BalanceList
- type BittrexClient
- func (b *BittrexClient) GetAccount() (result Account, err error)
- func (b *BittrexClient) GetAccountVolume() (result AccountVolume, err error)
- func (b *BittrexClient) GetAddress(symbol string) (result Address, err error)
- func (b *BittrexClient) GetAddresses() (result AddressList, err error)
- func (b *BittrexClient) GetBalance(symbol string) (result Balance, err error)
- func (b *BittrexClient) GetBalances() (result BalanceList, err error)
- func (b *BittrexClient) GetConditionalOrder(id string) (result ConditionalOrder, err error)
- func (b *BittrexClient) GetCurrencies() (result CurrencyList, err error)
- func (b *BittrexClient) GetCurrency(symbol string) (result Currency, err error)
- func (b *BittrexClient) GetHistoricalCandles(symbol, period string, year, month, day int) (result CandleList, err error)
- func (b *BittrexClient) GetMarket(symbol string) (result Market, err error)
- func (b *BittrexClient) GetMarketOrderbook(symbol string) (result MarketOrderbook, err error)
- func (b *BittrexClient) GetMarketSummary(symbol string) (result MarketSummary, err error)
- func (b *BittrexClient) GetMarketSummaryList() (result MarketSummaryList, err error)
- func (b *BittrexClient) GetMarketTicker(symbol string) (result MarketTicker, err error)
- func (b *BittrexClient) GetMarketTickerList() (result MarketTickerList, err error)
- func (b *BittrexClient) GetMarketTrades(symbol string) (result MarketTrades, err error)
- func (b *BittrexClient) GetMarkets() (result MarketList, err error)
- func (b *BittrexClient) GetRecentCandles(symbol, period string) (result CandleList, err error)
- func (b *BittrexClient) Ping() (result PingResponse, err error)
- type Candle
- type CandleList
- type ConditionalOrder
- type Currency
- type CurrencyList
- type Market
- type MarketList
- type MarketOrderbook
- type MarketSummary
- type MarketSummaryList
- type MarketTicker
- type MarketTickerList
- type MarketTrades
- type NewCancelConditionalOrder
- type NewOrder
- type OrderBookEntry
- type PingResponse
- type Trade
Constants ¶
View Source
const ( MinuteOne = "MINUTE_1" MinuteFive = "MINUTE_5" HourOne = "HOUR_1" DayOne = "DAY_1" HistoricalDayOne = "MINUTE_1" HistoricalMonthOne = "HOUR_1" HistoricalYearOne = "DAY_1" )
By weird design, recent intervals and historical intervals use the same string enum, but have different effects.. Bittrex?
View Source
const ( OPERAND_LTE = "LTE" OPERAND_GTE = "GTE" STATUS_OPEN = "OPEN" STATUS_COMPLETED = "COMPLETED" STATUS_CANCELLED = "CANCELLED" STATUS_FAILED = "FAILED" DIRECTION_BUY = "BUY" DIRECTION_SELL = "SELL" TYPE_LIMIT = "LIMIT" TYPE_MARKET = "MARKET" TYPE_CEILING_LIMIT = "CEILING_LIMIT" TYPE_CEILING_MARKET = "CEILING_MARKET" PERIOD_GOOD_TILL_CANCELLED = "GOOD_TILL_CANCELLED" PERIOD_IMMEDIATE_OR_CANCEL = "IMMEDIATE_OR_CANCEL" PERIOD_FILL_OR_KILL = "FILL_OR_KILL" PERIOD_POST_ONLY_GOOD_TIL_CANCELLED = "POST_ONLY_GOOD_TIL_CANCELLED" PERIOD_BUY_NOW = "BUY_NOW" )
===== Order Enums =====
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { SubaccountId string `json:"subaccountId"` AccountId string `json:"accountId"` }
===== Account =====
type AccountVolume ¶
type Address ¶
type Address struct { Status string `json:"status"` CurrencySymbol string `json:"currencySymbol"` CryptoAddress string `json:"cryptoAddress"` CryptoAddressTag string `json:"cryptoAddressTag"` }
===== Addresses =====
type AddressList ¶
type AddressList []Address
type Balance ¶
type Balance struct { CurrencySymbol string `json:"currencySymbol"` Total decimal.Decimal `json:"total"` Available decimal.Decimal `json:"available"` UpdatedAt string `json:"updatedAt"` }
===== Balances =====
type BalanceList ¶
type BalanceList []Balance
type BittrexClient ¶
type BittrexClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(apiKey, apiSecret string) *BittrexClient
func (*BittrexClient) GetAccount ¶
func (b *BittrexClient) GetAccount() (result Account, err error)
func (*BittrexClient) GetAccountVolume ¶
func (b *BittrexClient) GetAccountVolume() (result AccountVolume, err error)
func (*BittrexClient) GetAddress ¶
func (b *BittrexClient) GetAddress(symbol string) (result Address, err error)
func (*BittrexClient) GetAddresses ¶
func (b *BittrexClient) GetAddresses() (result AddressList, err error)
func (*BittrexClient) GetBalance ¶
func (b *BittrexClient) GetBalance(symbol string) (result Balance, err error)
func (*BittrexClient) GetBalances ¶
func (b *BittrexClient) GetBalances() (result BalanceList, err error)
func (*BittrexClient) GetConditionalOrder ¶
func (b *BittrexClient) GetConditionalOrder(id string) (result ConditionalOrder, err error)
func (*BittrexClient) GetCurrencies ¶
func (b *BittrexClient) GetCurrencies() (result CurrencyList, err error)
func (*BittrexClient) GetCurrency ¶
func (b *BittrexClient) GetCurrency(symbol string) (result Currency, err error)
func (*BittrexClient) GetHistoricalCandles ¶
func (b *BittrexClient) GetHistoricalCandles(symbol, period string, year, month, day int) (result CandleList, err error)
TODO validate date specifications & throw our own nice error here Date fields are expected to be 1-indexed.
func (*BittrexClient) GetMarket ¶
func (b *BittrexClient) GetMarket(symbol string) (result Market, err error)
func (*BittrexClient) GetMarketOrderbook ¶
func (b *BittrexClient) GetMarketOrderbook(symbol string) (result MarketOrderbook, err error)
TODO add depth parameter
func (*BittrexClient) GetMarketSummary ¶
func (b *BittrexClient) GetMarketSummary(symbol string) (result MarketSummary, err error)
func (*BittrexClient) GetMarketSummaryList ¶
func (b *BittrexClient) GetMarketSummaryList() (result MarketSummaryList, err error)
func (*BittrexClient) GetMarketTicker ¶
func (b *BittrexClient) GetMarketTicker(symbol string) (result MarketTicker, err error)
func (*BittrexClient) GetMarketTickerList ¶
func (b *BittrexClient) GetMarketTickerList() (result MarketTickerList, err error)
func (*BittrexClient) GetMarketTrades ¶
func (b *BittrexClient) GetMarketTrades(symbol string) (result MarketTrades, err error)
func (*BittrexClient) GetMarkets ¶
func (b *BittrexClient) GetMarkets() (result MarketList, err error)
func (*BittrexClient) GetRecentCandles ¶
func (b *BittrexClient) GetRecentCandles(symbol, period string) (result CandleList, err error)
func (*BittrexClient) Ping ¶
func (b *BittrexClient) Ping() (result PingResponse, err error)
type CandleList ¶
type CandleList []Candle
type ConditionalOrder ¶
type ConditionalOrder struct { Id string `json:"id"` MarketSymbol string `json:"marketSymbol"` Operand string `json:"operand"` TriggerPrice decimal.Decimal `json:"triggerPrice"` TrailingStopPercent decimal.Decimal `json:"trailingStopPercent"` CreatedOrderId string `json:"createdOrderId"` OrderToCreate NewOrder `json:"orderToCreate"` OrderToCancel NewCancelConditionalOrder `json:"newCancelConditionalOrder"` ClientConditionalOrderId string `json:"clientConditionalOrderId"` Status string `json:"status"` OrderCreationErrorCode string `json:"orderCreationErrorCode"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` ClosedAt string `json:"closedAt"` }
===== Conditional Orders =====
type Currency ¶
type Currency struct { Symbol string `json:"symbol"` Name string `json:"name"` CoinType string `json:"coinType"` Status string `json:"status"` MinConfirmations int32 `json:"minConfirmations"` Notice string `json:"notice"` TxFee decimal.Decimal `json:"txFee"` LogoUrl string `json:"logoUrl"` ProhibitedIn []string `json:"prohibitedIn"` }
type CurrencyList ¶
type CurrencyList []Currency
type Market ¶
type Market struct { Symbol string `json:"symbol"` BaseCurrencySymbol string `json:"baseCurrencySymbol"` QuoteCurrencySymbol string `json:"quoteCurrencySymbol"` MinTradeSize decimal.Decimal `json:"minTradeSize"` Precision int32 `json:"precision"` Status string `json:"status"` CreatedAt string `json:"createdAt"` Notice string `json:"notice"` ProhibitedIn []string `json:"prohibitedIn"` }
===== Markets =====
type MarketList ¶
type MarketList []Market
type MarketOrderbook ¶
type MarketOrderbook struct { Bid []OrderBookEntry `json:"bid"` Ask []OrderBookEntry `json:"ask"` }
type MarketSummary ¶
type MarketSummary struct { Symbol string `json:"symbol"` High decimal.Decimal `json:"high"` Low decimal.Decimal `json:"low"` Volume decimal.Decimal `json:"volume"` QuoteVolume decimal.Decimal `json:"quoteVolume"` PercentChange decimal.Decimal `json:"percentChange"` UpdatedAt string `json:"updatedAt"` }
type MarketSummaryList ¶
type MarketSummaryList []MarketSummary
type MarketTicker ¶
type MarketTickerList ¶
type MarketTickerList []MarketTicker
type MarketTrades ¶
type MarketTrades []Trade
type NewOrder ¶
type NewOrder struct { MarketSymbol string `json:"marketSymbol"` Direction string `json:"direction"` Type string `json:"type"` Quantity decimal.Decimal `json:"quantity"` Ceiling decimal.Decimal `json:"ceiling"` Limit decimal.Decimal `json:"limit"` TimeInForce string `json:"timeInForce"` ClientOrderId string `json:"clientOrderId"` UseAwards bool `json:"useAwards"` }
type OrderBookEntry ¶
type PingResponse ¶
type PingResponse struct {
ServerTime int64 `json:"serverTime"`
}
===== Ping =====
Source Files ¶
Click to show internal directories.
Click to hide internal directories.