deribit

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	*exchanges.BaseAdapter
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(ctx context.Context, opts Options) (*Adapter, error)

func (*Adapter) CancelAllOrders

func (a *Adapter) CancelAllOrders(context.Context, string) error

func (*Adapter) CancelOrder

func (a *Adapter) CancelOrder(context.Context, string, string) error

func (*Adapter) CancelOrderWS

func (a *Adapter) CancelOrderWS(context.Context, string, string) error

func (*Adapter) Close

func (a *Adapter) Close() error

func (*Adapter) ExtractSymbol

func (a *Adapter) ExtractSymbol(symbol string) string

func (*Adapter) FetchAccount

func (a *Adapter) FetchAccount(context.Context) (*exchanges.Account, error)

func (*Adapter) FetchAllFundingRates

func (a *Adapter) FetchAllFundingRates(ctx context.Context) ([]exchanges.FundingRate, error)

func (*Adapter) FetchBalance

func (a *Adapter) FetchBalance(context.Context) (decimal.Decimal, error)

func (*Adapter) FetchFeeRate

func (a *Adapter) FetchFeeRate(context.Context, string) (*exchanges.FeeRate, error)

func (*Adapter) FetchFundingRate

func (a *Adapter) FetchFundingRate(ctx context.Context, symbol string) (*exchanges.FundingRate, error)

func (*Adapter) FetchKlines

func (a *Adapter) FetchKlines(ctx context.Context, symbol string, interval exchanges.Interval, opts *exchanges.KlineOpts) ([]exchanges.Kline, error)

func (*Adapter) FetchOpenInterest

func (a *Adapter) FetchOpenInterest(context.Context, string) (*exchanges.OpenInterest, error)

func (*Adapter) FetchOpenOrders

func (a *Adapter) FetchOpenOrders(context.Context, string) ([]exchanges.Order, error)

func (*Adapter) FetchOrderBook

func (a *Adapter) FetchOrderBook(ctx context.Context, symbol string, limit int) (*exchanges.OrderBook, error)

func (*Adapter) FetchOrderByID

func (a *Adapter) FetchOrderByID(context.Context, string, string) (*exchanges.Order, error)

func (*Adapter) FetchOrders

func (a *Adapter) FetchOrders(context.Context, string) ([]exchanges.Order, error)

func (*Adapter) FetchPositions

func (a *Adapter) FetchPositions(context.Context) ([]exchanges.Position, error)

func (*Adapter) FetchSymbolDetails

func (a *Adapter) FetchSymbolDetails(ctx context.Context, symbol string) (*exchanges.SymbolDetails, error)

func (*Adapter) FetchTicker

func (a *Adapter) FetchTicker(ctx context.Context, symbol string) (*exchanges.Ticker, error)

func (*Adapter) FetchTrades

func (a *Adapter) FetchTrades(ctx context.Context, symbol string, limit int) ([]exchanges.Trade, error)

func (*Adapter) FormatSymbol

func (a *Adapter) FormatSymbol(symbol string) string

func (*Adapter) ModifyOrderWS

func (*Adapter) PlaceOrder

func (*Adapter) PlaceOrderWS

func (a *Adapter) PlaceOrderWS(context.Context, *exchanges.OrderParams) error

func (*Adapter) SetLeverage

func (a *Adapter) SetLeverage(context.Context, string, int) error

func (*Adapter) StopWatchFills

func (a *Adapter) StopWatchFills(context.Context) error

func (*Adapter) StopWatchKlines

func (a *Adapter) StopWatchKlines(context.Context, string, exchanges.Interval) error

func (*Adapter) StopWatchOrderBook

func (a *Adapter) StopWatchOrderBook(context.Context, string) error

func (*Adapter) StopWatchOrders

func (a *Adapter) StopWatchOrders(context.Context) error

func (*Adapter) StopWatchPositions

func (a *Adapter) StopWatchPositions(context.Context) error

func (*Adapter) StopWatchTicker

func (a *Adapter) StopWatchTicker(context.Context, string) error

func (*Adapter) StopWatchTrades

func (a *Adapter) StopWatchTrades(context.Context, string) error

func (*Adapter) WatchFills

func (*Adapter) WatchOrderBook

func (*Adapter) WatchOrders

func (*Adapter) WatchPositions

func (*Adapter) WatchTicker

func (*Adapter) WatchTrades

type OptionAdapter

type OptionAdapter struct {
	*exchanges.BaseAdapter
	// contains filtered or unexported fields
}

func NewOptionAdapter

func NewOptionAdapter(ctx context.Context, opts Options) (*OptionAdapter, error)

func (*OptionAdapter) CancelAllOrders

func (a *OptionAdapter) CancelAllOrders(ctx context.Context, symbol string) error

func (*OptionAdapter) CancelOrder

func (a *OptionAdapter) CancelOrder(ctx context.Context, orderID, symbol string) error

func (*OptionAdapter) CancelOrderWS

func (a *OptionAdapter) CancelOrderWS(context.Context, string, string) error

func (*OptionAdapter) Close

func (a *OptionAdapter) Close() error

func (*OptionAdapter) ExtractSymbol

func (a *OptionAdapter) ExtractSymbol(symbol string) string

func (*OptionAdapter) FetchAccount

func (a *OptionAdapter) FetchAccount(context.Context) (*exchanges.Account, error)

func (*OptionAdapter) FetchBalance

func (a *OptionAdapter) FetchBalance(context.Context) (decimal.Decimal, error)

func (*OptionAdapter) FetchFeeRate

func (a *OptionAdapter) FetchFeeRate(context.Context, string) (*exchanges.FeeRate, error)

func (*OptionAdapter) FetchKlines

func (a *OptionAdapter) FetchKlines(ctx context.Context, symbol string, interval exchanges.Interval, opts *exchanges.KlineOpts) ([]exchanges.Kline, error)

func (*OptionAdapter) FetchOpenOrders

func (a *OptionAdapter) FetchOpenOrders(ctx context.Context, symbol string) ([]exchanges.Order, error)

func (*OptionAdapter) FetchOptionContract

func (a *OptionAdapter) FetchOptionContract(ctx context.Context, contractSymbol string) (*exchanges.OptionContract, error)

func (*OptionAdapter) FetchOrderBook

func (a *OptionAdapter) FetchOrderBook(ctx context.Context, symbol string, limit int) (*exchanges.OrderBook, error)

func (*OptionAdapter) FetchOrderByID

func (a *OptionAdapter) FetchOrderByID(ctx context.Context, orderID, symbol string) (*exchanges.Order, error)

func (*OptionAdapter) FetchOrders

func (a *OptionAdapter) FetchOrders(ctx context.Context, symbol string) ([]exchanges.Order, error)

func (*OptionAdapter) FetchSymbolDetails

func (a *OptionAdapter) FetchSymbolDetails(ctx context.Context, symbol string) (*exchanges.SymbolDetails, error)

func (*OptionAdapter) FetchTicker

func (a *OptionAdapter) FetchTicker(ctx context.Context, symbol string) (*exchanges.Ticker, error)

func (*OptionAdapter) FetchTrades

func (a *OptionAdapter) FetchTrades(ctx context.Context, symbol string, limit int) ([]exchanges.Trade, error)

func (*OptionAdapter) FormatSymbol

func (a *OptionAdapter) FormatSymbol(symbol string) string

func (*OptionAdapter) ListOptionContracts

func (a *OptionAdapter) ListOptionContracts(ctx context.Context, underlying string) ([]exchanges.OptionContract, error)

func (*OptionAdapter) PlaceOrder

func (a *OptionAdapter) PlaceOrder(ctx context.Context, params *exchanges.OrderParams) (*exchanges.Order, error)

func (*OptionAdapter) PlaceOrderWS

func (*OptionAdapter) StopWatchFills

func (a *OptionAdapter) StopWatchFills(context.Context) error

func (*OptionAdapter) StopWatchKlines

func (a *OptionAdapter) StopWatchKlines(context.Context, string, exchanges.Interval) error

func (*OptionAdapter) StopWatchOrderBook

func (a *OptionAdapter) StopWatchOrderBook(context.Context, string) error

func (*OptionAdapter) StopWatchOrders

func (a *OptionAdapter) StopWatchOrders(context.Context) error

func (*OptionAdapter) StopWatchPositions

func (a *OptionAdapter) StopWatchPositions(context.Context) error

func (*OptionAdapter) StopWatchTicker

func (a *OptionAdapter) StopWatchTicker(context.Context, string) error

func (*OptionAdapter) StopWatchTrades

func (a *OptionAdapter) StopWatchTrades(context.Context, string) error

func (*OptionAdapter) WatchFills

func (*OptionAdapter) WatchKlines

func (*OptionAdapter) WatchOrderBook

func (*OptionAdapter) WatchOrders

func (*OptionAdapter) WatchPositions

func (*OptionAdapter) WatchTicker

func (*OptionAdapter) WatchTrades

type Options

type Options struct {
	APIKey    string
	SecretKey string
	Currency  string
	Logger    exchanges.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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