Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- Constants
- func MapSlice[T, M any](input []T, f func(T) M) []M
- type Exchange
- func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) error
- func (e *Exchange) Name() types.ExchangeName
- func (e *Exchange) NewStream() types.Stream
- func (e *Exchange) PlatformFeeCurrency() string
- func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error)
- func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error)
- func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64) (orders []types.Order, err error)
- func (e *Exchange) QueryDepth(ctx context.Context, symbol string) (snapshot types.SliceOrderBook, finalUpdateID int64, err error)
- func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval types.Interval, ...) ([]types.KLine, error)
- func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error)
- func (e *Exchange) QueryOpenOrders(ctx context.Context, symbol string) (orders []types.Order, err error)
- func (e *Exchange) QueryOrder(ctx context.Context, q types.OrderQuery) (*types.Order, error)
- func (e *Exchange) QueryOrderTrades(ctx context.Context, q types.OrderQuery) ([]types.Trade, error)
- func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error)
- func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[string]types.Ticker, error)
- func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) ([]types.Trade, error)
- func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (createdOrder *types.Order, err error)
- type Stream
- func (s *Stream) EmitBalanceUpdateEvent(e *bfxapi.BalanceUpdateEvent)
- func (s *Stream) EmitBookSnapshotEvent(e *bfxapi.BookSnapshotEvent)
- func (s *Stream) EmitBookUpdateEvent(e *bfxapi.BookUpdateEvent)
- func (s *Stream) EmitCandleEvent(e *bfxapi.CandleEvent)
- func (s *Stream) EmitCandleSnapshotEvent(e *bfxapi.CandleSnapshotEvent)
- func (s *Stream) EmitFundingBookEvent(e *bfxapi.FundingBookUpdateEvent)
- func (s *Stream) EmitFundingBookSnapshotEvent(e *bfxapi.FundingBookSnapshotEvent)
- func (s *Stream) EmitHeartBeat(e *bfxapi.HeartBeatEvent)
- func (s *Stream) EmitOrderSnapshotEvent(e *bfxapi.UserOrderSnapshotEvent)
- func (s *Stream) EmitOrderUpdateEvent(e *bfxapi.UserOrder)
- func (s *Stream) EmitPositionSnapshotEvent(e *bfxapi.UserPositionSnapshotEvent)
- func (s *Stream) EmitPositionUpdateEvent(e *bfxapi.UserPosition)
- func (s *Stream) EmitPublicFundingTradeEvent(e *bfxapi.PublicFundingTradeEvent)
- func (s *Stream) EmitPublicFundingTradeSnapshotEvent(e *bfxapi.PublicFundingTradeSnapshotEvent)
- func (s *Stream) EmitPublicTradeEvent(e *bfxapi.PublicTradeEvent)
- func (s *Stream) EmitPublicTradeSnapshotEvent(e *bfxapi.PublicTradeSnapshotEvent)
- func (s *Stream) EmitResponse(resp *bfxapi.WebSocketResponse)
- func (s *Stream) EmitStatusEvent(e *bfxapi.StatusEvent)
- func (s *Stream) EmitTickerEvent(e *bfxapi.TickerEvent)
- func (s *Stream) EmitTradeUpdateEvent(e *bfxapi.TradeUpdateEvent)
- func (s *Stream) EmitWalletSnapshotEvent(e *bfxapi.WalletSnapshotEvent)
- func (s *Stream) EmitWalletUpdateEvent(e *bfxapi.Wallet)
- func (s *Stream) OnBalanceUpdateEvent(cb func(e *bfxapi.BalanceUpdateEvent))
- func (s *Stream) OnBookSnapshotEvent(cb func(e *bfxapi.BookSnapshotEvent))
- func (s *Stream) OnBookUpdateEvent(cb func(e *bfxapi.BookUpdateEvent))
- func (s *Stream) OnCandleEvent(cb func(e *bfxapi.CandleEvent))
- func (s *Stream) OnCandleSnapshotEvent(cb func(e *bfxapi.CandleSnapshotEvent))
- func (s *Stream) OnFundingBookEvent(cb func(e *bfxapi.FundingBookUpdateEvent))
- func (s *Stream) OnFundingBookSnapshotEvent(cb func(e *bfxapi.FundingBookSnapshotEvent))
- func (s *Stream) OnHeartBeat(cb func(e *bfxapi.HeartBeatEvent))
- func (s *Stream) OnOrderSnapshotEvent(cb func(e *bfxapi.UserOrderSnapshotEvent))
- func (s *Stream) OnOrderUpdateEvent(cb func(e *bfxapi.UserOrder))
- func (s *Stream) OnPositionSnapshotEvent(cb func(e *bfxapi.UserPositionSnapshotEvent))
- func (s *Stream) OnPositionUpdateEvent(cb func(e *bfxapi.UserPosition))
- func (s *Stream) OnPublicFundingTradeEvent(cb func(e *bfxapi.PublicFundingTradeEvent))
- func (s *Stream) OnPublicFundingTradeSnapshotEvent(cb func(e *bfxapi.PublicFundingTradeSnapshotEvent))
- func (s *Stream) OnPublicTradeEvent(cb func(e *bfxapi.PublicTradeEvent))
- func (s *Stream) OnPublicTradeSnapshotEvent(cb func(e *bfxapi.PublicTradeSnapshotEvent))
- func (s *Stream) OnResponse(cb func(resp *bfxapi.WebSocketResponse))
- func (s *Stream) OnStatusEvent(cb func(e *bfxapi.StatusEvent))
- func (s *Stream) OnTickerEvent(cb func(e *bfxapi.TickerEvent))
- func (s *Stream) OnTradeUpdateEvent(cb func(e *bfxapi.TradeUpdateEvent))
- func (s *Stream) OnWalletSnapshotEvent(cb func(e *bfxapi.WalletSnapshotEvent))
- func (s *Stream) OnWalletUpdateEvent(cb func(e *bfxapi.Wallet))
Constants ¶
const ID types.ExchangeName = "bitfinex"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Exchange ¶
type Exchange struct {
// contains filtered or unexported fields
}
func (*Exchange) CancelOrders ¶
CancelOrders cancels the given orders on Bitfinex.
func (*Exchange) Name ¶
func (e *Exchange) Name() types.ExchangeName
func (*Exchange) PlatformFeeCurrency ¶
PlatformFeeCurrency returns the platform fee currency for Bitfinex.
func (*Exchange) QueryAccount ¶
func (*Exchange) QueryAccountBalances ¶
QueryAccountBalances queries account balances from Bitfinex.
func (*Exchange) QueryClosedOrders ¶
func (*Exchange) QueryDepth ¶
func (e *Exchange) QueryDepth( ctx context.Context, symbol string, ) (snapshot types.SliceOrderBook, finalUpdateID int64, err error)
QueryDepth query the order book depth of a symbol
func (*Exchange) QueryKLines ¶
func (e *Exchange) QueryKLines( ctx context.Context, symbol string, interval types.Interval, options types.KLineQueryOptions, ) ([]types.KLine, error)
QueryKLines queries historical kline/candle data from Bitfinex.
func (*Exchange) QueryMarkets ¶
QueryMarkets queries available markets from Bitfinex.
func (*Exchange) QueryOpenOrders ¶
func (e *Exchange) QueryOpenOrders(ctx context.Context, symbol string) (orders []types.Order, err error)
QueryOpenOrders queries open orders for a symbol from Bitfinex.
func (*Exchange) QueryOrder ¶
func (*Exchange) QueryOrderTrades ¶
QueryOrderTrades queries trades for a specific order using Bitfinex API.
func (*Exchange) QueryTicker ¶
QueryTicker queries ticker for a symbol from Bitfinex.
func (*Exchange) QueryTickers ¶
func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[string]types.Ticker, error)
QueryTickers queries tickers for multiple symbols from Bitfinex.
func (*Exchange) QueryTrades ¶
func (*Exchange) SubmitOrder ¶
type Stream ¶
type Stream struct {
types.StandardStream
// contains filtered or unexported fields
}
Stream represents the Bitfinex websocket stream.
func (*Stream) EmitBalanceUpdateEvent ¶
func (s *Stream) EmitBalanceUpdateEvent(e *bfxapi.BalanceUpdateEvent)
func (*Stream) EmitBookSnapshotEvent ¶
func (s *Stream) EmitBookSnapshotEvent(e *bfxapi.BookSnapshotEvent)
func (*Stream) EmitBookUpdateEvent ¶
func (s *Stream) EmitBookUpdateEvent(e *bfxapi.BookUpdateEvent)
func (*Stream) EmitCandleEvent ¶
func (s *Stream) EmitCandleEvent(e *bfxapi.CandleEvent)
func (*Stream) EmitCandleSnapshotEvent ¶
func (s *Stream) EmitCandleSnapshotEvent(e *bfxapi.CandleSnapshotEvent)
func (*Stream) EmitFundingBookEvent ¶
func (s *Stream) EmitFundingBookEvent(e *bfxapi.FundingBookUpdateEvent)
func (*Stream) EmitFundingBookSnapshotEvent ¶
func (s *Stream) EmitFundingBookSnapshotEvent(e *bfxapi.FundingBookSnapshotEvent)
func (*Stream) EmitHeartBeat ¶
func (s *Stream) EmitHeartBeat(e *bfxapi.HeartBeatEvent)
func (*Stream) EmitOrderSnapshotEvent ¶
func (s *Stream) EmitOrderSnapshotEvent(e *bfxapi.UserOrderSnapshotEvent)
func (*Stream) EmitOrderUpdateEvent ¶
func (*Stream) EmitPositionSnapshotEvent ¶
func (s *Stream) EmitPositionSnapshotEvent(e *bfxapi.UserPositionSnapshotEvent)
func (*Stream) EmitPositionUpdateEvent ¶
func (s *Stream) EmitPositionUpdateEvent(e *bfxapi.UserPosition)
func (*Stream) EmitPublicFundingTradeEvent ¶
func (s *Stream) EmitPublicFundingTradeEvent(e *bfxapi.PublicFundingTradeEvent)
func (*Stream) EmitPublicFundingTradeSnapshotEvent ¶
func (s *Stream) EmitPublicFundingTradeSnapshotEvent(e *bfxapi.PublicFundingTradeSnapshotEvent)
func (*Stream) EmitPublicTradeEvent ¶
func (s *Stream) EmitPublicTradeEvent(e *bfxapi.PublicTradeEvent)
func (*Stream) EmitPublicTradeSnapshotEvent ¶
func (s *Stream) EmitPublicTradeSnapshotEvent(e *bfxapi.PublicTradeSnapshotEvent)
func (*Stream) EmitResponse ¶
func (s *Stream) EmitResponse(resp *bfxapi.WebSocketResponse)
func (*Stream) EmitStatusEvent ¶
func (s *Stream) EmitStatusEvent(e *bfxapi.StatusEvent)
func (*Stream) EmitTickerEvent ¶
func (s *Stream) EmitTickerEvent(e *bfxapi.TickerEvent)
func (*Stream) EmitTradeUpdateEvent ¶
func (s *Stream) EmitTradeUpdateEvent(e *bfxapi.TradeUpdateEvent)
func (*Stream) EmitWalletSnapshotEvent ¶
func (s *Stream) EmitWalletSnapshotEvent(e *bfxapi.WalletSnapshotEvent)
func (*Stream) EmitWalletUpdateEvent ¶
func (*Stream) OnBalanceUpdateEvent ¶
func (s *Stream) OnBalanceUpdateEvent(cb func(e *bfxapi.BalanceUpdateEvent))
func (*Stream) OnBookSnapshotEvent ¶
func (s *Stream) OnBookSnapshotEvent(cb func(e *bfxapi.BookSnapshotEvent))
func (*Stream) OnBookUpdateEvent ¶
func (s *Stream) OnBookUpdateEvent(cb func(e *bfxapi.BookUpdateEvent))
func (*Stream) OnCandleEvent ¶
func (s *Stream) OnCandleEvent(cb func(e *bfxapi.CandleEvent))
func (*Stream) OnCandleSnapshotEvent ¶
func (s *Stream) OnCandleSnapshotEvent(cb func(e *bfxapi.CandleSnapshotEvent))
func (*Stream) OnFundingBookEvent ¶
func (s *Stream) OnFundingBookEvent(cb func(e *bfxapi.FundingBookUpdateEvent))
func (*Stream) OnFundingBookSnapshotEvent ¶
func (s *Stream) OnFundingBookSnapshotEvent(cb func(e *bfxapi.FundingBookSnapshotEvent))
func (*Stream) OnHeartBeat ¶
func (s *Stream) OnHeartBeat(cb func(e *bfxapi.HeartBeatEvent))
func (*Stream) OnOrderSnapshotEvent ¶
func (s *Stream) OnOrderSnapshotEvent(cb func(e *bfxapi.UserOrderSnapshotEvent))
func (*Stream) OnOrderUpdateEvent ¶
func (*Stream) OnPositionSnapshotEvent ¶
func (s *Stream) OnPositionSnapshotEvent(cb func(e *bfxapi.UserPositionSnapshotEvent))
func (*Stream) OnPositionUpdateEvent ¶
func (s *Stream) OnPositionUpdateEvent(cb func(e *bfxapi.UserPosition))
func (*Stream) OnPublicFundingTradeEvent ¶
func (s *Stream) OnPublicFundingTradeEvent(cb func(e *bfxapi.PublicFundingTradeEvent))
func (*Stream) OnPublicFundingTradeSnapshotEvent ¶
func (s *Stream) OnPublicFundingTradeSnapshotEvent(cb func(e *bfxapi.PublicFundingTradeSnapshotEvent))
func (*Stream) OnPublicTradeEvent ¶
func (s *Stream) OnPublicTradeEvent(cb func(e *bfxapi.PublicTradeEvent))
func (*Stream) OnPublicTradeSnapshotEvent ¶
func (s *Stream) OnPublicTradeSnapshotEvent(cb func(e *bfxapi.PublicTradeSnapshotEvent))
func (*Stream) OnResponse ¶
func (s *Stream) OnResponse(cb func(resp *bfxapi.WebSocketResponse))
func (*Stream) OnStatusEvent ¶
func (s *Stream) OnStatusEvent(cb func(e *bfxapi.StatusEvent))
func (*Stream) OnTickerEvent ¶
func (s *Stream) OnTickerEvent(cb func(e *bfxapi.TickerEvent))
func (*Stream) OnTradeUpdateEvent ¶
func (s *Stream) OnTradeUpdateEvent(cb func(e *bfxapi.TradeUpdateEvent))
func (*Stream) OnWalletSnapshotEvent ¶
func (s *Stream) OnWalletSnapshotEvent(cb func(e *bfxapi.WalletSnapshotEvent))