Documentation ¶
Index ¶
- type Bitfinex
- func (bfx *Bitfinex) ActiveCredits() (error, []LendOrder)
- func (bfx *Bitfinex) ActiveLendOrders() (error, []LendOrder)
- func (bfx *Bitfinex) CancelLendOrder(id int) (error, *LendOrder)
- func (bfx *Bitfinex) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (bfx *Bitfinex) GetAccount() (*Account, error)
- func (bfx *Bitfinex) GetDepositWalletBalance() (*Account, error)
- func (bfx *Bitfinex) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)
- func (bfx *Bitfinex) GetExchangeName() string
- func (bfx *Bitfinex) GetKlineRecords(currencyPair CurrencyPair, period KlinePeriod, size int, ...) ([]Kline, error)
- func (bfx *Bitfinex) GetLendBook(currency Currency) (error, *LendBook)
- func (bfx *Bitfinex) GetLendOrderStatus(id int) (error, *LendOrder)
- func (bfx *Bitfinex) GetLendTickers() ([]LendTicker, error)
- func (bfx *Bitfinex) GetMarginInfos() ([]MarginInfo, error)
- func (bfx *Bitfinex) GetMarginTradingWalletBalance() (*Account, error)
- func (bfx *Bitfinex) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) GetOrderHistorys(currencyPair CurrencyPair, optional ...OptionalParameter) ([]Order, error)
- func (bfx *Bitfinex) GetTicker(currencyPair CurrencyPair) (*Ticker, error)
- func (bfx *Bitfinex) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bfx *Bitfinex) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (bfx *Bitfinex) GetWalletBalances() (map[string]*Account, error)
- func (bfx *Bitfinex) LimitBuy(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (bfx *Bitfinex) LimitSell(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (bfx *Bitfinex) MarginLimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginLimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginMarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarginMarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
- func (bfx *Bitfinex) NewLendOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) NewLoanOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) OffersHistory(limit int) (error, []LendOrder)
- func (bfx *Bitfinex) StopBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) StopSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Bitfinex) Transfer(amount float64, currency Currency, fromWallet, toWallet string) error
- type BitfinexWs
- func (bws *BitfinexWs) SetCallbacks(tickerCallback func(*Ticker), tradeCallback func(*Trade), ...)
- func (bws *BitfinexWs) SubscribeCandle(pair CurrencyPair, klinePeriod KlinePeriod) error
- func (bws *BitfinexWs) SubscribeTicker(pair CurrencyPair) error
- func (bws *BitfinexWs) SubscribeTrade(pair CurrencyPair) error
- type EventMap
- type LendBook
- type LendBookItem
- type LendOrder
- type LendTicker
- type MarginInfo
- type MarginLimits
- type SubscribeEvent
- type TradeFunding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitfinex ¶
type Bitfinex struct {
// contains filtered or unexported fields
}
func (*Bitfinex) ActiveCredits ¶
func (*Bitfinex) ActiveLendOrders ¶
func (*Bitfinex) CancelOrder ¶
func (*Bitfinex) GetAccount ¶
defalut only return exchange wallet balance
func (*Bitfinex) GetDepositWalletBalance ¶
func (*Bitfinex) GetExchangeName ¶
func (*Bitfinex) GetKlineRecords ¶
func (*Bitfinex) GetLendBook ¶
func (*Bitfinex) GetLendOrderStatus ¶
func (*Bitfinex) GetLendTickers ¶
func (bfx *Bitfinex) GetLendTickers() ([]LendTicker, error)
func (*Bitfinex) GetMarginInfos ¶
func (bfx *Bitfinex) GetMarginInfos() ([]MarginInfo, error)
func (*Bitfinex) GetMarginTradingWalletBalance ¶
func (*Bitfinex) GetOneOrder ¶
func (*Bitfinex) GetOrderHistorys ¶
func (*Bitfinex) GetUnfinishOrders ¶
func (*Bitfinex) GetWalletBalances ¶
func (*Bitfinex) MarginLimitBuy ¶
func (*Bitfinex) MarginLimitSell ¶
func (*Bitfinex) MarginMarketBuy ¶
func (*Bitfinex) MarginMarketSell ¶
func (*Bitfinex) MarketSell ¶
func (*Bitfinex) MytradesFunding ¶
func (bfx *Bitfinex) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
func (*Bitfinex) NewLendOrder ¶
func (*Bitfinex) NewLoanOrder ¶
type BitfinexWs ¶ added in v1.3.3
func NewWs ¶ added in v1.3.3
func NewWs() *BitfinexWs
func (*BitfinexWs) SetCallbacks ¶ added in v1.3.3
func (bws *BitfinexWs) SetCallbacks(tickerCallback func(*Ticker), tradeCallback func(*Trade), candleCallback func(*Kline))
func (*BitfinexWs) SubscribeCandle ¶ added in v1.3.3
func (bws *BitfinexWs) SubscribeCandle(pair CurrencyPair, klinePeriod KlinePeriod) error
func (*BitfinexWs) SubscribeTicker ¶ added in v1.3.3
func (bws *BitfinexWs) SubscribeTicker(pair CurrencyPair) error
func (*BitfinexWs) SubscribeTrade ¶ added in v1.3.3
func (bws *BitfinexWs) SubscribeTrade(pair CurrencyPair) error
type EventMap ¶ added in v1.3.3
type EventMap map[int64]SubscribeEvent
type LendBook ¶
type LendBook struct { Bids []LendBookItem `json:"bids"` Asks []LendBookItem `json:"asks"` }
type LendBookItem ¶
type LendOrder ¶
type LendOrder struct { Id int `json:"id"` Currency string `json:"currency"` Rate float64 `json:"rate,string"` Period int `json:"period"` Direction string `json:"direction"` IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` Amount float64 `json:"amount,string"` ExecutedAmount float64 `json:"executed_amount,string"` RemainingAmount float64 `json:"remaining_amount,string"` OriginalAmount float64 `json:"original_amount,string"` Timestamp string `json:"timestamp"` }
type LendTicker ¶
type LendTicker struct { Ticker Coin Currency DailyChangePerc float64 }
type MarginInfo ¶
type MarginInfo struct { MarginBalance float64 `json:"margin_balance,string"` TradableBalance float64 `json:"tradable_balance,string"` UnrealizedPl float64 `json:"unrealized_pl,string"` UnrealizedSwap float64 `json:"unrealized_swap,string"` NetValue float64 `json:"net_value,string"` RequiredMargin float64 `json:"required_margin,string"` Leverage float64 `json:"leverage,string"` MarginRequirement float64 `json:"margin_requirement,string"` MarginLimits []MarginLimits `json:"margin_limits"` }
type MarginLimits ¶
type SubscribeEvent ¶ added in v1.3.3
type SubscribeEvent struct { Event string `json:"event"` SubID string `json:"subId"` Channel string `json:"channel"` ChanID int64 `json:"chanId"` Symbol string `json:"symbol"` Precision string `json:"prec,omitempty"` Frequency string `json:"freq,omitempty"` Key string `json:"key,omitempty"` Len string `json:"len,omitempty"` Pair string `json:"pair"` }
Click to show internal directories.
Click to hide internal directories.