bybit

package
v1.51.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

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

func New

func New(key, secret string) (*Exchange, error)

func (*Exchange) CancelOrders added in v1.51.1

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

func (*Exchange) Name

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

func (*Exchange) PlatformFeeCurrency

func (e *Exchange) PlatformFeeCurrency() string

PlatformFeeCurrency returns empty string. The platform does not support "PlatformFeeCurrency" but instead charges fees using the native token.

func (*Exchange) QueryClosedOrders added in v1.51.1

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

func (*Exchange) QueryMarkets added in v1.51.1

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

func (*Exchange) QueryOpenOrders added in v1.51.1

func (e *Exchange) QueryOpenOrders(ctx context.Context, symbol string) (orders []types.Order, err error)

func (*Exchange) QueryTicker added in v1.51.1

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

func (*Exchange) QueryTickers added in v1.51.1

func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[string]types.Ticker, error)

func (*Exchange) QueryTrades added in v1.51.1

func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) (trades []types.Trade, err error)

QueryTrades queries trades by time range or trade id range. If options.StartTime is not specified, you can only query for records in the last 7 days. If you want to query for records older than 7 days, options.StartTime is required. It supports to query records up to 180 days.

If the orderId is null, fromTradeId is passed, and toTradeId is null, then the result is sorted by ticketId in ascend. Otherwise, the result is sorted by ticketId in descend.

** Here includes MakerRebate. If needed, let's discuss how to modify it to return in trade. ** ** StartTime and EndTime are inclusive. ** ** StartTime and EndTime cannot exceed 180 days. **

func (*Exchange) SubmitOrder added in v1.51.1

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

Directories

Path Synopsis
v3

Jump to

Keyboard shortcuts

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