bitfinex

package
v1.64.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Index

Constants

View Source
const ID types.ExchangeName = "bitfinex"

Variables

This section is empty.

Functions

func MapSlice

func MapSlice[T, M any](input []T, f func(T) M) []M

Types

type Exchange

type Exchange struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey, apiSecret string) *Exchange

func (*Exchange) CancelOrders

func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) error

CancelOrders cancels the given orders on Bitfinex.

func (*Exchange) Name

func (e *Exchange) Name() types.ExchangeName

func (*Exchange) NewStream

func (e *Exchange) NewStream() types.Stream

NewStream ...

func (*Exchange) PlatformFeeCurrency

func (e *Exchange) PlatformFeeCurrency() string

PlatformFeeCurrency returns the platform fee currency for Bitfinex.

func (*Exchange) QueryAccount

func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error)

func (*Exchange) QueryAccountBalances

func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error)

QueryAccountBalances queries account balances from Bitfinex.

func (*Exchange) QueryClosedOrders

func (e *Exchange) QueryClosedOrders(
	ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64,
) (orders []types.Order, err error)

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

func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error)

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 (e *Exchange) QueryOrder(ctx context.Context, q types.OrderQuery) (*types.Order, error)

func (*Exchange) QueryOrderTrades

func (e *Exchange) QueryOrderTrades(ctx context.Context, q types.OrderQuery) ([]types.Trade, error)

QueryOrderTrades queries trades for a specific order using Bitfinex API.

func (*Exchange) QueryTicker

func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error)

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 (e *Exchange) QueryTrades(
	ctx context.Context, symbol string, options *types.TradeQueryOptions,
) ([]types.Trade, error)

func (*Exchange) SubmitOrder

func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (createdOrder *types.Order, err error)

type Stream

type Stream struct {
	types.StandardStream
	// contains filtered or unexported fields
}

Stream represents the Bitfinex websocket stream.

func NewStream

func NewStream(ex *Exchange) *Stream

NewStream creates a new Bitfinex 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 (s *Stream) EmitOrderUpdateEvent(e *bfxapi.UserOrder)

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 (s *Stream) EmitWalletUpdateEvent(e *bfxapi.Wallet)

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 (s *Stream) OnOrderUpdateEvent(cb func(e *bfxapi.UserOrder))

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))

func (*Stream) OnWalletUpdateEvent

func (s *Stream) OnWalletUpdateEvent(cb func(e *bfxapi.Wallet))

Directories

Path Synopsis
Package bfxapi implements Bitfinex API integration.
Package bfxapi implements Bitfinex API integration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL