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 common.TradingPair) (bool, error)
- func (bfx *Bitfinex) GetAccount() (*common.Account, error)
- func (bfx *Bitfinex) GetDepositWalletBalance() (*common.Account, error)
- func (bfx *Bitfinex) GetDepth(size int, currencyPair common.TradingPair) (*common.Depth, error)
- func (bfx *Bitfinex) GetExchangeName() string
- func (bfx *Bitfinex) GetKlineRecords(currencyPair common.TradingPair, klinePeriod, size, since int) ([]common.Kline, error)
- func (bfx *Bitfinex) GetLendBook(currency common.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() (*common.Account, error)
- func (bfx *Bitfinex) GetOneOrder(orderId string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) GetOrderHistorys(currencyPair common.TradingPair, currentPage, pageSize int) ([]common.Order, error)
- func (bfx *Bitfinex) GetTicker(currencyPair common.TradingPair) (*common.Ticker, error)
- func (bfx *Bitfinex) GetTrades(currencyPair common.TradingPair, since int64) ([]common.Trade, error)
- func (bfx *Bitfinex) GetUnfinishOrders(currencyPair common.TradingPair) ([]common.Order, error)
- func (bfx *Bitfinex) GetWalletBalances() (map[string]*common.Account, error)
- func (bfx *Bitfinex) LimitBuy(amount, price string, currencyPair common.TradingPair, ...) (*common.Order, error)
- func (bfx *Bitfinex) LimitSell(amount, price string, currencyPair common.TradingPair, ...) (*common.Order, error)
- func (bfx *Bitfinex) MarginLimitBuy(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MarginLimitSell(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MarginMarketBuy(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MarginMarketSell(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MarketBuy(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MarketSell(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) MytradesFunding(currency common.Currency, limit int) (error, []TradeFunding)
- func (bfx *Bitfinex) NewLendOrder(currency common.Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) NewLoanOrder(currency common.Currency, amount, rate string, period int) (error, *LendOrder)
- func (bfx *Bitfinex) OffersHistory(limit int) (error, []LendOrder)
- func (bfx *Bitfinex) StopBuy(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) StopSell(amount, price string, currencyPair common.TradingPair) (*common.Order, error)
- func (bfx *Bitfinex) Transfer(amount float64, currency common.Currency, fromWallet, toWallet string) error
- type BitfinexWs
- func (bws *BitfinexWs) SetCallbacks(tickerCallback func(*common.Ticker), tradeCallback func(*common.Trade), ...)
- func (bws *BitfinexWs) SubscribeCandle(pair common.TradingPair, klinePeriod common.KlinePeriod) error
- func (bws *BitfinexWs) SubscribeTicker(pair common.TradingPair) error
- func (bws *BitfinexWs) SubscribeTrade(pair common.TradingPair) 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) LimitBuy ¶
func (bfx *Bitfinex) LimitBuy(amount, price string, currencyPair common.TradingPair, opt ...common.LimitOrderOptionalParameter) (*common.Order, error)
func (*Bitfinex) LimitSell ¶
func (bfx *Bitfinex) LimitSell(amount, price string, currencyPair common.TradingPair, opt ...common.LimitOrderOptionalParameter) (*common.Order, error)
func (*Bitfinex) MarginLimitBuy ¶
func (*Bitfinex) MarginLimitSell ¶
func (*Bitfinex) MarginMarketBuy ¶
func (*Bitfinex) MarginMarketSell ¶
func (*Bitfinex) MarketSell ¶
func (*Bitfinex) MytradesFunding ¶
func (*Bitfinex) NewLendOrder ¶
func (*Bitfinex) NewLoanOrder ¶
type BitfinexWs ¶
func NewWs ¶
func NewWs() *BitfinexWs
func (*BitfinexWs) SetCallbacks ¶
func (*BitfinexWs) SubscribeCandle ¶
func (bws *BitfinexWs) SubscribeCandle(pair common.TradingPair, klinePeriod common.KlinePeriod) error
func (*BitfinexWs) SubscribeTicker ¶
func (bws *BitfinexWs) SubscribeTicker(pair common.TradingPair) error
func (*BitfinexWs) SubscribeTrade ¶
func (bws *BitfinexWs) SubscribeTrade(pair common.TradingPair) error
type EventMap ¶
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 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 ¶
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.