The ExchangeInformation struct provides metadata about the exchange, including timezone, server time, rate limits, and a list of available Symbols. Each Symbol contains critical trading constraints via a filters field.
Common filters include:
PRICE_FILTER: Defines min_price, max_price, and tick_size.LOT_SIZE: Defines min_qty, max_qty, and step_size.MIN_NOTIONAL: Defines minimum order value requirements.PERCENT_PRICE: Constraints based on a multiplier of the average price.MARKET_LOT_SIZE: Similar to LOT_SIZE but specifically for market orders.
Use these filters to validate order parameters (price and quantity) before sending them to the API to avoid rejection.
// Example of the structure of ExchangeInformation
// (Conceptual representation of the data returned)
ExchangeInformation {
timezone: "UTC",
server_time: 1626118018407,
rate_limits: [...],
symbols: [
Symbol {
symbol: "BTCUSDT",
status: "TRADING",
base_asset: "BTC",
quote_asset: "USDT",
filters: [
Filters::PriceFilter { min_price: "0.01", max_price: "100000.00", tick_size: "0.01" },
Filters::LotSize { min_qty: "0.00001", max_qty: "100.0", step_size: "0.00001" }
],
..
}
],
}