Documentation
¶
Index ¶
- type Exchange
- func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (errs error)
- func (e *Exchange) Name() types.ExchangeName
- func (e *Exchange) PlatformFeeCurrency() string
- func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since, util time.Time, lastOrderID uint64) (orders []types.Order, err error)
- func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error)
- func (e *Exchange) QueryOpenOrders(ctx context.Context, symbol string) (orders []types.Order, err error)
- func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error)
- func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[string]types.Ticker, error)
- func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) (trades []types.Trade, err error)
- func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (*types.Order, error)
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 (*Exchange) CancelOrders ¶ added in v1.51.1
func (*Exchange) Name ¶
func (e *Exchange) Name() types.ExchangeName
func (*Exchange) PlatformFeeCurrency ¶
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 (*Exchange) QueryMarkets ¶ added in v1.51.1
func (*Exchange) QueryOpenOrders ¶ added in v1.51.1
func (*Exchange) QueryTicker ¶ added in v1.51.1
func (*Exchange) QueryTickers ¶ added in v1.51.1
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. **