batch

package
v0.0.0-...-c0411a1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncTimeRangedBatchQuery

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

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

type BinanceFuturesIncomeBatchQuery

type BinanceFuturesIncomeBatchQuery struct {
	BinanceFuturesIncomeHistoryService
}

func (*BinanceFuturesIncomeBatchQuery) Query

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

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

type ClosedOrderBatchQuery

type ClosedOrderBatchQuery struct {
	types.ExchangeTradeHistoryService
}

func (*ClosedOrderBatchQuery) Query

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

type DepositBatchQuery struct {
	types.ExchangeTransferService
}

func (*DepositBatchQuery) Query

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

type KLineBatchQuery

type KLineBatchQuery struct {
	types.Exchange
}

func (*KLineBatchQuery) Query

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

type MarginInterestBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginInterestBatchQuery) Query

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

type MarginLiquidationBatchQuery

type MarginLiquidationBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginLiquidationBatchQuery) Query

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

type MarginLoanBatchQuery

type MarginLoanBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginLoanBatchQuery) Query

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

type MarginRepayBatchQuery

type MarginRepayBatchQuery struct {
	types.MarginHistoryService
}

func (*MarginRepayBatchQuery) Query

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

type Option

type Option func(query *AsyncTimeRangedBatchQuery)

func JumpIfEmpty

func JumpIfEmpty(duration time.Duration) Option

JumpIfEmpty jump the startTime + duration when the result is empty

type RewardBatchQuery

type RewardBatchQuery struct {
	Service types.ExchangeRewardService
}

func (*RewardBatchQuery) Query

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

type TradeBatchQuery

type TradeBatchQuery struct {
	types.ExchangeTradeHistoryService
}

func (TradeBatchQuery) Query

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

type WithdrawBatchQuery

type WithdrawBatchQuery struct {
	types.ExchangeTransferService
}

func (*WithdrawBatchQuery) Query

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