batch

package
v1.59.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: AGPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncTimeRangedBatchQuery added in v1.33.0

type AsyncTimeRangedBatchQuery struct {
	// Type is the object type of the result
	Type interface{}

	// Limiter is the rate limiter for each query
	Limiter *rate.Limiter

	// Q is the remote query function
	Q func(startTime, endTime time.Time) (interface{}, error)

	// T function returns time of an object
	T func(obj interface{}) time.Time

	// ID returns the ID of the object
	ID func(obj interface{}) string

	// JumpIfEmpty jump the startTime + duration when the result is empty
	JumpIfEmpty time.Duration
}

func (*AsyncTimeRangedBatchQuery) Query added in v1.33.0

func (q *AsyncTimeRangedBatchQuery) Query(ctx context.Context, ch interface{}, since, until time.Time) chan error

type BinanceFuturesIncomeBatchQuery added in v1.45.0

type BinanceFuturesIncomeBatchQuery struct {
	BinanceFuturesIncomeHistoryService
}

func (*BinanceFuturesIncomeBatchQuery) Query added in v1.45.0

func (e *BinanceFuturesIncomeBatchQuery) Query(ctx context.Context, symbol string, incomeType binanceapi.FuturesIncomeType, startTime, endTime time.Time) (c chan binanceapi.FuturesIncome, errC chan error)

type BinanceFuturesIncomeHistoryService added in v1.45.0

type BinanceFuturesIncomeHistoryService interface {
	QueryFuturesIncomeHistory(ctx context.Context, symbol string, incomeType binanceapi.FuturesIncomeType, startTime, endTime *time.Time) ([]binanceapi.FuturesIncome, error)
}

type ClosedOrderBatchQuery added in v1.13.0

type ClosedOrderBatchQuery struct {
	types.ExchangeTradeHistoryService
}

func (*ClosedOrderBatchQuery) Query added in v1.13.0

func (q *ClosedOrderBatchQuery) Query(ctx context.Context, symbol string, startTime, endTime time.Time, lastOrderID uint64, opts ...Option) (c chan types.Order, errC chan error)

type DepositBatchQuery added in v1.33.2

type DepositBatchQuery struct {
	types.ExchangeTransferService
}

func (*DepositBatchQuery) Query added in v1.33.2

func (e *DepositBatchQuery) Query(ctx context.Context, asset string, startTime, endTime time.Time) (c chan types.Deposit, errC chan error)

type KLineBatchQuery added in v1.13.0

type KLineBatchQuery struct {
	types.Exchange
}

func (*KLineBatchQuery) Query added in v1.13.0

func (e *KLineBatchQuery) Query(ctx context.Context, symbol string, interval types.Interval, startTime, endTime time.Time) (c chan types.KLine, errC chan error)

type MarginInterestBatchQuery added in v1.33.0

type MarginInterestBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginInterestBatchQuery) Query added in v1.33.0

func (e *MarginInterestBatchQuery) Query(ctx context.Context, asset string, startTime, endTime time.Time) (c chan types.MarginInterest, errC chan error)

type MarginLiquidationBatchQuery added in v1.33.0

type MarginLiquidationBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginLiquidationBatchQuery) Query added in v1.33.0

func (e *MarginLiquidationBatchQuery) Query(ctx context.Context, startTime, endTime time.Time) (c chan types.MarginLiquidation, errC chan error)

type MarginLoanBatchQuery added in v1.33.0

type MarginLoanBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginLoanBatchQuery) Query added in v1.33.0

func (e *MarginLoanBatchQuery) Query(ctx context.Context, asset string, startTime, endTime time.Time) (c chan types.MarginLoan, errC chan error)

type MarginRepayBatchQuery added in v1.33.0

type MarginRepayBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginRepayBatchQuery) Query added in v1.33.0

func (e *MarginRepayBatchQuery) Query(ctx context.Context, asset string, startTime, endTime time.Time) (c chan types.MarginRepay, errC chan error)

type Option added in v1.53.0

type Option func(query *AsyncTimeRangedBatchQuery)

func JumpIfEmpty added in v1.53.0

func JumpIfEmpty(duration time.Duration) Option

JumpIfEmpty jump the startTime + duration when the result is empty

type RewardBatchQuery added in v1.13.0

type RewardBatchQuery struct {
	Service types.ExchangeRewardService
}

func (*RewardBatchQuery) Query added in v1.13.0

func (q *RewardBatchQuery) Query(ctx context.Context, startTime, endTime time.Time) (c chan types.Reward, errC chan error)

type TradeBatchQuery added in v1.13.0

type TradeBatchQuery struct {
	types.ExchangeTradeHistoryService
}

func (TradeBatchQuery) Query added in v1.13.0

func (e TradeBatchQuery) Query(ctx context.Context, symbol string, options *types.TradeQueryOptions, opts ...Option) (c chan types.Trade, errC chan error)

type WithdrawBatchQuery added in v1.33.0

type WithdrawBatchQuery struct {
	types.ExchangeTransferService
}

func (*WithdrawBatchQuery) Query added in v1.33.0

func (e *WithdrawBatchQuery) Query(ctx context.Context, asset string, startTime, endTime time.Time) (c chan types.Withdraw, errC chan error)

Jump to

Keyboard shortcuts

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