Documentation ¶
Index ¶
- func AggregateTradesQuantity(trades []types.Trade) fixedpoint.Value
- func AggregateTradesQuoteQuantity(trades []types.Trade) fixedpoint.Value
- func CollectOpenOrders(ctx context.Context, ex types.Exchange, symbols ...string) ([]types.Order, error)
- func CollectOrderGroupIds(orders []types.Order) (groupIds []uint32)
- func CollectOrderSymbols(orders []types.Order) (symbols []string)
- func CollectTradeFee(trades []types.Trade) map[string]fixedpoint.Value
- func UniversalCancelAllOrders(ctx context.Context, exchange types.Exchange, symbol string, ...) error
- type CancelAllOrdersByGroupIDService
- type CancelAllOrdersBySymbolService
- type CancelAllOrdersService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateTradesQuantity ¶
func AggregateTradesQuantity(trades []types.Trade) fixedpoint.Value
AggregateTradesQuantity sums up the quantity from the given trades totalQuantity = SUM(trade1.Quantity, trade2.Quantity, ...)
func AggregateTradesQuoteQuantity ¶ added in v1.57.0
func AggregateTradesQuoteQuantity(trades []types.Trade) fixedpoint.Value
AggregateTradesQuoteQuantity aggregates the quote quantity from the given trade slice
func CollectOpenOrders ¶ added in v1.58.0
func CollectOrderGroupIds ¶ added in v1.58.0
func CollectOrderSymbols ¶ added in v1.58.0
func CollectTradeFee ¶
func CollectTradeFee(trades []types.Trade) map[string]fixedpoint.Value
CollectTradeFee collects the fee from the given trade slice
func UniversalCancelAllOrders ¶ added in v1.58.0
func UniversalCancelAllOrders(ctx context.Context, exchange types.Exchange, symbol string, openOrders []types.Order) error
UniversalCancelAllOrders checks if the exchange instance supports the best order cancel strategy it tries the first interface CancelAllOrdersService that does not need any existing order information or symbol information.
if CancelAllOrdersService is not supported, then it tries CancelAllOrdersBySymbolService which needs at least one symbol for the cancel api request.
Types ¶
type CancelAllOrdersByGroupIDService ¶ added in v1.58.0
type CancelAllOrdersBySymbolService ¶ added in v1.58.0
Click to show internal directories.
Click to hide internal directories.