#[non_exhaustive]pub enum Route {
Ping,
Time,
ExchangeInfo,
Depth {
limit: Option<u32>,
},
Trades,
AggTrades,
Klines,
AvgPrice,
Ticker24h {
all: bool,
},
Price {
all: bool,
},
BookTicker {
all: bool,
},
}Expand description
A REST route, with the parameters its weight depends on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ping
GET /api/v3/ping.
Time
GET /api/v3/time.
ExchangeInfo
GET /api/v3/exchangeInfo.
Depth
GET /api/v3/depth.
Trades
GET /api/v3/trades.
AggTrades
GET /api/v3/aggTrades.
Klines
GET /api/v3/klines.
AvgPrice
GET /api/v3/avgPrice.
Ticker24h
GET /api/v3/ticker/24hr: one symbol, or every symbol when all.
Price
GET /api/v3/ticker/price: one symbol, or every symbol when all.
BookTicker
GET /api/v3/ticker/bookTicker: one symbol, or every symbol when all.
Implementations§
Source§impl Route
impl Route
Sourcepub fn cost(self) -> Cost
pub fn cost(self) -> Cost
What the request costs, as measured from X-MBX-USED-WEIGHT-1M deltas
on 2026-11-02 (docs/specs/binance/OBSERVED.md, ## Spot, ### REST weights).
depth costs 5 without a limit and for 1 to 100 levels, 25 for 101 to
500, 50 for 501 to 1000 and 250 above, each band measured
(OBSERVED.md, ## Spot). exchangeInfo costs 20 with a symbol or without. The
one-symbol tickers and klines and avgPrice cost 2, trades 25 and
aggTrades 4, whatever their limit.