pub enum SpotApi {
Show 38 variants
TestConnectivity,
CheckServerTime,
ExchangeInformation,
OrderBook,
RecentTrades,
HistoricalTrades,
AggregatedTrades,
KLines,
UiKLines,
AveragePrice,
Ticker24hr,
Ticker24hrMultiple,
PriceTicker,
PriceTickerMultiple,
OrderBookTicker,
OrderBookTickerMultiple,
RollingWindowTicker,
RollingWindowTickerMultiple,
TestNewOrder,
NewOrder,
GetOrder,
CancelOrder,
CancelReplaceOrder,
GetOpenOrders,
GetOpenOrdersAllSymbols,
CancelOpenOrders,
GetAllOrders,
NewOco,
GetOco,
CancelOco,
GetAllOco,
GetOpenOco,
AccountInformation,
AccountTrades,
OrderCountUsage,
StartUserDataStream,
KeepAliveUserDataStream,
CloseUserDataStream,
}
Expand description
Set of possible HTTP methods. Every variant corresponds to a single API call (combination of path and HTTP verb).
Variants§
TestConnectivity
Test connectivity to the Rest API.
CheckServerTime
Test connectivity to the Rest API and get the current server time.
ExchangeInformation
Current exchange trading rules and symbol information.
OrderBook
Get the order book.
RecentTrades
Get recent trades list.
HistoricalTrades
Get older market trades.
AggregatedTrades
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
KLines
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
UiKLines
The request is similar to KLines having the same parameters and response. Returns modified kline data, optimized for presentation of candlestick charts.
AveragePrice
Current average price for a symbol.
Ticker24hr
24 hour rolling window price change statistics for a single symbol.
Ticker24hrMultiple
24 hour rolling window price change statistics for multiple symbols. Careful when accessing this with no symbol.
PriceTicker
Latest price for a single symbol.
PriceTickerMultiple
Latest price for multiple symbols.
OrderBookTicker
Best price/qty on the order book for a single symbol.
OrderBookTickerMultiple
Best price/qty on the order book for multiple symbols.
RollingWindowTicker
Rolling window price change statistics.
Note: This endpoint is different from the 24 hour ticker endpoint. The window used to compute statistics will be no more than 59999ms from the requested windowSize. openTime always starts on a minute, while the closeTime is the current time of the request. As such, the effective window will be up to 59999ms wider than windowSize.
E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC
),
and the windowSize is 1d
then the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC
)
RollingWindowTickerMultiple
Rolling window price change statistics for multiple symbols.
TestNewOrder
Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.
NewOrder
Send in a new order.
See detailed documentation at https://binance-docs.github.io/apidocs/spot/en/#new-order-trade
GetOrder
Check an order’s status.
CancelOrder
Cancel an active order.
CancelReplaceOrder
Cancels an existing order and places a new order on the same symbol.
Filters
and Order Count
are evaluated before
the processing of the cancellation and order placement occurs.
A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED
),
will still increase the order count by 1.
Similar to NewOrder, additional mandatory parameters are determined by type. Response format varies depending on whether the processing of the message succeeded, partially succeeded, or failed.
GetOpenOrders
Get all open orders on a single symbol.
GetOpenOrdersAllSymbols
Get all open orders for multiple symbols. Careful when accessing this as it has too much weight.
CancelOpenOrders
Cancels all active orders on a symbol.
GetAllOrders
Get all account orders; active, canceled, or filled.
NewOco
Send in a new OCO (One-Cancels-the-Other) order.
GetOco
Retrieves a specific OCO based on provided optional parameters.
CancelOco
Cancel an entire Order List.
GetAllOco
Retrieves all OCO based on provided optional parameters.
GetOpenOco
Query Open OCO.
AccountInformation
Get current account information.
AccountTrades
Get trades for a specific account and symbol.
OrderCountUsage
Displays the user’s current order count usage for all intervals.
StartUserDataStream
Start a new user data stream. The stream will close after 60 minutes
unless a keepalive is sent. If the account has an active listenKey
,
that listenKey
will be returned and its validity will be extended for 60 minutes.
KeepAliveUserDataStream
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It’s recommended to send a ping about every 30 minutes.
CloseUserDataStream
Close out a user data stream.