spot.streams
Public methods exposed through client.spot.streams.
Constructors
new
Source code in pkg/src/mexc/spot/streams/__init__.py
Listen Keys
create
keepalive
close
Market
book_ticker
Subscribe to best bid/ask updates for a spot symbol.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Spot symbol, for example |
required |
aggregation
|
Aggregation
|
Update aggregation interval. |
'100ms'
|
References
Source code in pkg/src/mexc/spot/streams/market/book_ticker.py
book_ticker_batch
Subscribe to batch best bid/ask updates for a spot symbol.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Spot symbol, for example |
required |
References
Source code in pkg/src/mexc/spot/streams/market/book_ticker_batch.py
candles
Subscribe to klines (candles) for a given symbol.
symbol: The symbol being traded, e.g.BTCUSDT.interval: The interval of the klines (default: 1m).
Source code in pkg/src/mexc/spot/streams/market/candles.py
depth
Subscribe to the order book for a given symbol.
symbol: The symbol being traded, e.g.BTCUSDT.level: The level of the order book (default: 5).
Source code in pkg/src/mexc/spot/streams/market/depth.py
depth_updates
Subscribe to aggregated spot order-book delta updates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Spot symbol, for example |
required |
aggregation
|
Aggregation
|
Update aggregation interval. |
'10ms'
|
Source code in pkg/src/mexc/spot/streams/market/depth_updates.py
trades
Subscribe to aggregated spot trade updates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Spot symbol, for example |
required |
aggregation
|
Aggregation
|
Update aggregation interval. |
'100ms'
|
References
Source code in pkg/src/mexc/spot/streams/market/trades.py
User
account
Subscribe to spot account balance updates.
References
Source code in pkg/src/mexc/spot/streams/user/account.py
trades
Subscribe to your trades.
Source code in pkg/src/mexc/spot/streams/user/my_trades.py
orders
Subscribe to spot order updates.