Market
Defines the _Market class.
- class mexc_api.spot.endpoints._market._Market(api: Api)
Defines all Market endpoints.
- agg_trades(symbol: str, start_ms: int | None = None, end_ms: int | None = None, limit: int | None = None) list
Returns the aggregate trades of symbol.
- avg_price(symbol: str) dict
Returns the average price of a symbol.
- default_symbols() list[str]
Returns all symbols.
- exchange_info(symbol: str | None = None, symbols: list[str] | None = None) dict
Returns the rules and symbol info of the given symbol(s). All symbols will be returned when no parameter is given.
- klines(symbol: str, interval: Interval, start_ms: int | None = None, end_ms: int | None = None, limit: int | None = None) list
Returns the klines of a symbol on the given interval between the optional start and end timestamps.
- order_book(symbol: str, limit: int | None = None) dict
Returns the bids and asks of symbol.
- server_time() int
Returns the server time.
- test() None
Tests connectivity to the Rest API.
- ticker_24h(symbol: str | None = None) list
Returns ticker data from the last 24 hours. Data for all symbols will be sent if symbol was not given.
- ticker_book_price(symbol: str | None = None) list
Returns the best price/qty on the order book for a symbol. Data for all symbols will be sent if symbol was not given.
- ticker_price(symbol: str | None = None) list
Returns the ticker price of a symbol. Prices of all symbols will be send if symbol was not given.
- trades(symbol: str, limit: int | None = None) list
Returns the the recent of symbol.