Account

Defines the _Account class.

class mexc_api.spot.endpoints._account._Account(api: Api)

Defines all Account endpoints.

batch_order() dict

Creates multiple orders.

cancel_open_orders(symbol: str) list

Cancels all open orders.

cancel_order(symbol: str, order_id: str | None = None, client_order_id: str | None = None) dict

Cancels an order based on the order id or client order id.

create_listen_key() str

Returns a listen key

delete_listen_key(listen_key: str) None

deletes a listen key.

enable_mx_deduct(is_enabled: bool) dict

Enables mx deduct.

get_account_info() dict

Returns the account info.

get_all_listen_keys() dict

Returns a listen key.

get_mx_deduct() dict

Returns the mx deduct status.

get_open_orders(symbol: str) list

Returns all open orders for a symbol.

get_order(symbol: str, order_id: str | None = None, client_order_id: str | None = None) dict

Returns an order for a symbol based on the order id or client order id.

get_orders(symbol: str, start_ms: int | None = None, end_ms: int | None = None, limit: int | None = None) list

Returns all orders for a symbol within the optional start and end timestamps.

get_trades(symbol: str, start_ms: int | None = None, end_ms: int | None = None, limit: int | None = None) list

Returns all trades for a symbol within the optional start and end timestamps.

keep_alive_listen_key(listen_key: str) None

Keeps the listen key alive.

new_order(symbol: str, side: Side, order_type: OrderType, quantity: str | None = None, quote_order_quantity: str | None = None, price: str | None = None, client_order_id: str | None = None) dict

Creates a new order.

test_new_order(symbol: str, side: Side, order_type: OrderType, quantity: str | None = None, quote_order_quantity: str | None = None, price: str | None = None, client_order_id: str | None = None) dict

Creates a test order.