Documentation ¶
Index ¶
- 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 Exchange
- func (bfx *Exchange) ActiveCredits() (error, []LendOrder)
- func (bfx *Exchange) ActiveLendOrders() (error, []LendOrder)
- func (bfx *Exchange) CancelLendOrder(id int) (error, *LendOrder)
- func (exchange *Exchange) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (bfx *Exchange) GetAccount() (*Account, error)
- func (exchange *Exchange) GetAssets(currency CurrencyPair) (*Assets, error)
- func (bfx *Exchange) GetDepositWalletBalance() (*Account, error)
- func (exchange *Exchange) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)
- func (exchange *Exchange) GetExchangeName() string
- func (exchange *Exchange) GetKlineRecords(currencyPair CurrencyPair, period KlinePeriod, size int, ...) ([]Kline, error)
- func (bfx *Exchange) GetLendBook(currency Currency) (error, *LendBook)
- func (bfx *Exchange) GetLendOrderStatus(id int) (error, *LendOrder)
- func (bfx *Exchange) GetLendTickers() ([]LendTicker, error)
- func (bfx *Exchange) GetMarginInfos() ([]MarginInfo, error)
- func (bfx *Exchange) GetMarginTradingWalletBalance() (*Account, error)
- func (exchange *Exchange) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) GetOrderHistorys(currencyPair CurrencyPair, optional ...OptionalParameter) ([]Order, error)
- func (exchange *Exchange) GetTicker(currencyPair CurrencyPair) (*Ticker, error)
- func (exchange *Exchange) GetTradeHistory(currency CurrencyPair, optional ...OptionalParameter) ([]Trade, error)
- func (exchange *Exchange) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (exchange *Exchange) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (exchange *Exchange) GetWalletBalances() (map[string]*Account, error)
- func (exchange *Exchange) LimitBuy(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (exchange *Exchange) LimitSell(amount, price string, currencyPair CurrencyPair, ...) (*Order, error)
- func (bfx *Exchange) MarginLimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Exchange) MarginLimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Exchange) MarginMarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Exchange) MarginMarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Exchange) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
- func (bfx *Exchange) NewLendOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Exchange) NewLoanOrder(currency Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Exchange) OffersHistory(limit int) (error, []LendOrder)
- func (exchange *Exchange) StopBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (exchange *Exchange) StopSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bfx *Exchange) Transfer(amount float64, currency Currency, fromWallet, toWallet string) error
- 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 BitfinexWs ¶ added in v1.2.6
func NewWs ¶ added in v1.2.6
func NewWs() *BitfinexWs
func (*BitfinexWs) SetCallbacks ¶ added in v1.2.6
func (bws *BitfinexWs) SetCallbacks(tickerCallback func(*Ticker), tradeCallback func(*Trade), candleCallback func(*Kline))
func (*BitfinexWs) SubscribeCandle ¶ added in v1.2.6
func (bws *BitfinexWs) SubscribeCandle(pair CurrencyPair, klinePeriod KlinePeriod) error
func (*BitfinexWs) SubscribeTicker ¶ added in v1.2.6
func (bws *BitfinexWs) SubscribeTicker(pair CurrencyPair) error
func (*BitfinexWs) SubscribeTrade ¶ added in v1.2.6
func (bws *BitfinexWs) SubscribeTrade(pair CurrencyPair) error
type EventMap ¶ added in v1.2.6
type EventMap map[int64]SubscribeEvent
type Exchange ¶ added in v1.3.9
type Exchange struct {
// contains filtered or unexported fields
}
func (*Exchange) ActiveCredits ¶ added in v1.3.9
func (*Exchange) ActiveLendOrders ¶ added in v1.3.9
func (*Exchange) CancelLendOrder ¶ added in v1.3.9
func (*Exchange) CancelOrder ¶ added in v1.3.9
func (*Exchange) GetAccount ¶ added in v1.3.9
defalut only return exchange wallet balance
func (*Exchange) GetDepositWalletBalance ¶ added in v1.3.9
func (*Exchange) GetExchangeName ¶ added in v1.3.9
func (*Exchange) GetKlineRecords ¶ added in v1.3.9
func (*Exchange) GetLendBook ¶ added in v1.3.9
func (*Exchange) GetLendOrderStatus ¶ added in v1.3.9
func (*Exchange) GetLendTickers ¶ added in v1.3.9
func (bfx *Exchange) GetLendTickers() ([]LendTicker, error)
func (*Exchange) GetMarginInfos ¶ added in v1.3.9
func (bfx *Exchange) GetMarginInfos() ([]MarginInfo, error)
func (*Exchange) GetMarginTradingWalletBalance ¶ added in v1.3.9
func (*Exchange) GetOneOrder ¶ added in v1.3.9
func (*Exchange) GetOrderHistorys ¶ added in v1.3.9
func (*Exchange) GetTradeHistory ¶ added in v1.3.9
func (*Exchange) GetUnfinishOrders ¶ added in v1.3.9
func (*Exchange) GetWalletBalances ¶ added in v1.3.9
func (*Exchange) MarginLimitBuy ¶ added in v1.3.9
func (*Exchange) MarginLimitSell ¶ added in v1.3.9
func (*Exchange) MarginMarketBuy ¶ added in v1.3.9
func (*Exchange) MarginMarketSell ¶ added in v1.3.9
func (*Exchange) MarketSell ¶ added in v1.3.9
func (*Exchange) MytradesFunding ¶ added in v1.3.9
func (bfx *Exchange) MytradesFunding(currency Currency, limit int) (error, []TradeFunding)
func (*Exchange) NewLendOrder ¶ added in v1.3.9
func (*Exchange) NewLoanOrder ¶ added in v1.3.9
func (*Exchange) OffersHistory ¶ added in v1.3.9
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.2.6
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.