Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- func TrimLowerString(original string) string
- func TrimUpperString(original string) string
- type Candle
- type ErrorResponse
- type Exchange
- func (e *Exchange) CancelOrders(ctx context.Context, orders ...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) 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) 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) ([]types.Trade, error)
- func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (types.OrderSlice, error)
- func (e *Exchange) Transfer(ctx context.Context, coin string, size float64, destination string) (string, error)
- type HistoricalPricesResponse
- type PlaceOrderPayload
- type Stream
- type TransferPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TrimLowerString ¶ added in v1.14.0
func TrimUpperString ¶ added in v1.14.0
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { *util.Response IsSuccess bool `json:"Success"` ErrorString string `json:"error,omitempty"` }
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Exchange ¶
type Exchange struct {
// contains filtered or unexported fields
}
func NewExchange ¶
func (*Exchange) CancelOrders ¶
func (*Exchange) Name ¶
func (e *Exchange) Name() types.ExchangeName
func (*Exchange) PlatformFeeCurrency ¶
func (*Exchange) QueryAccount ¶
func (*Exchange) QueryAccountBalances ¶
func (*Exchange) QueryClosedOrders ¶
func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64) (orders []types.Order, err error)
symbol, since and until are all optional. FTX can only query by order created time, not updated time. FTX doesn't support lastOrderID, so we will query by the time range first, and filter by the lastOrderID.
func (*Exchange) QueryDepositHistory ¶
func (*Exchange) QueryKLines ¶
func (*Exchange) QueryMarkets ¶
func (*Exchange) QueryOpenOrders ¶
func (*Exchange) QueryTicker ¶ added in v1.13.0
func (*Exchange) QueryTickers ¶ added in v1.13.0
func (*Exchange) QueryTrades ¶
func (*Exchange) SubmitOrders ¶
func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (types.OrderSlice, error)
type HistoricalPricesResponse ¶ added in v1.15.3
type HistoricalPricesResponse struct { Success bool `json:"success"` Result []Candle `json:"result"` }
{ "success": true, "result": [ { "close": 11055.25, "high": 11089.0, "low": 11043.5, "open": 11059.25, "startTime": "2019-06-24T17:15:00+00:00", "volume": 464193.95725 } ] }
type PlaceOrderPayload ¶ added in v1.14.0
type PlaceOrderPayload struct { Market string Side string Price float64 Type string Size float64 ReduceOnly bool IOC bool PostOnly bool ClientID string }
{ "market": "XRP-PERP", "side": "sell", "price": 0.306525, "type": "limit", "size": 31431.0, "reduceOnly": false, "ioc": false, "postOnly": false, "clientId": null }
type Stream ¶ added in v1.13.0
type Stream struct { *types.StandardStream // contains filtered or unexported fields }
func (*Stream) SetPublicOnly ¶ added in v1.13.0
func (s *Stream) SetPublicOnly()
Click to show internal directories.
Click to hide internal directories.