Documentation ¶
Index ¶
- func GenerateGroupID(s string) uint32
- func NewClientOrderID(originalID string, tags ...string) (clientOrderID string)
- type Exchange
- func (e *Exchange) CancelAllOrders(ctx context.Context) ([]types.Order, error)
- func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err2 error)
- func (e *Exchange) CancelOrdersByGroupID(ctx context.Context, groupID uint32) ([]types.Order, error)
- func (e *Exchange) CancelOrdersBySymbol(ctx context.Context, symbol string) ([]types.Order, error)
- func (e *Exchange) Name() types.ExchangeName
- func (e *Exchange) NewStream() types.Stream
- func (e *Exchange) PlatformFeeCurrency() string
- func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error)
- func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error)
- func (e *Exchange) QueryAveragePrice(ctx context.Context, symbol string) (float64, error)
- func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64) (orders []types.Order, err error)
- func (e *Exchange) QueryDepositHistory(ctx context.Context, asset string, since, until time.Time) (allDeposits []types.Deposit, err error)
- func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval types.Interval, ...) ([]types.KLine, 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) QueryRewards(ctx context.Context, startTime time.Time) ([]types.Reward, error)
- func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error)
- func (e *Exchange) QueryTickers(ctx context.Context, symbol ...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) QueryWithdrawHistory(ctx context.Context, asset string, since, until time.Time) (allWithdraws []types.Withdraw, err error)
- func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (createdOrders types.OrderSlice, err error)
- func (e *Exchange) Withdrawal(ctx context.Context, asset string, amount fixedpoint.Value, address string, ...) error
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateGroupID ¶ added in v1.15.0
func NewClientOrderID ¶ added in v1.17.0
Types ¶
type Exchange ¶
type Exchange struct {
// contains filtered or unexported fields
}
func (*Exchange) CancelAllOrders ¶ added in v1.5.0
func (*Exchange) CancelOrders ¶
func (*Exchange) CancelOrdersByGroupID ¶ added in v1.5.0
func (*Exchange) CancelOrdersBySymbol ¶ added in v1.5.0
func (*Exchange) Name ¶
func (e *Exchange) Name() types.ExchangeName
func (*Exchange) PlatformFeeCurrency ¶
PlatformFeeCurrency
func (*Exchange) QueryAccount ¶
func (*Exchange) QueryAccountBalances ¶
func (*Exchange) QueryAveragePrice ¶
func (*Exchange) QueryClosedOrders ¶
func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64) (orders []types.Order, err error)
lastOrderID is not supported on MAX
func (*Exchange) QueryDepositHistory ¶
func (*Exchange) QueryKLines ¶
func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval types.Interval, options types.KLineQueryOptions) ([]types.KLine, error)
QueryKLines returns the klines from the MAX exchange API. The KLine API of the MAX exchange uses inclusive time range
https://max-api.maicoin.com/api/v2/k?market=btctwd&limit=10&period=1×tamp=1620202440 The above query will return a kline that starts with 1620202440 (unix timestamp) without endTime. We need to calculate the endTime by ourself.
func (*Exchange) QueryMarkets ¶
func (*Exchange) QueryOpenOrders ¶
func (*Exchange) QueryRewards ¶ added in v1.13.0
func (*Exchange) QueryTicker ¶ added in v1.11.1
func (*Exchange) QueryTickers ¶ added in v1.11.0
func (*Exchange) QueryTrades ¶
func (*Exchange) QueryWithdrawHistory ¶
func (*Exchange) SubmitOrders ¶
func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (createdOrders types.OrderSlice, err error)
func (*Exchange) Withdrawal ¶ added in v1.16.0
func (e *Exchange) Withdrawal(ctx context.Context, asset string, amount fixedpoint.Value, address string, options *types.WithdrawalOptions) error
type Stream ¶
type Stream struct { types.StandardStream // contains filtered or unexported fields }
func (*Stream) SetPublicOnly ¶ added in v1.5.0
func (s *Stream) SetPublicOnly()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.