futures.market
Public methods exposed through client.futures.market.
candles
Return contract K-line/candlestick series for a symbol and optional time window.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
interval
|
Literal['Min1', 'Min5', 'Min15', 'Min30', 'Min60', 'Hour4', 'Hour8', 'Day1', 'Week1', 'Month1'] | None
|
K-line interval: Min1, Min5, Min15, Min30, Min60, Hour4, Hour8, Day1, Week1, or Month1. |
None
|
start
|
Timestamp | None
|
Start timestamp in seconds. |
None
|
end
|
Timestamp | None
|
End timestamp in seconds. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
CandlesResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/candles.py
contract_info
Return contract metadata, optionally filtered to one futures contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str | None
|
Optional contract symbol filter, for example BTC_USDT. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
ContractInfoResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/contract_info.py
deals
Return recent transaction/deal data for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
limit
|
int | None
|
Number of recent deals to return; maximum is 100 and default is 100. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
DealsResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/deals.py
depth
Return a contract order book depth snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
limit
|
int | None
|
Depth tier/level count to return. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
DepthResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/depth.py
depth_commits
Return the latest N depth snapshots/commits for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
limit
|
int
|
Number of latest depth commits to return. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
DepthCommitsResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/depth_commits.py
fair_price
Return the current fair price for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
FairPriceResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/fair_price.py
fair_price_candles
Return fair-price K-line/candlestick series for a symbol and optional time window.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
interval
|
Literal['Min1', 'Min5', 'Min15', 'Min30', 'Min60', 'Hour4', 'Hour8', 'Day1', 'Week1', 'Month1'] | None
|
K-line interval: Min1, Min5, Min15, Min30, Min60, Hour4, Hour8, Day1, Week1, or Month1. |
None
|
start
|
Timestamp | None
|
Start timestamp in seconds. |
None
|
end
|
Timestamp | None
|
End timestamp in seconds. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
FairPriceCandlesResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/fair_price_candles.py
funding_rate
Return the current funding-rate state for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
FundingRateResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/funding_rate.py
funding_rate_history
Return paginated funding-rate history for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
page_num
|
int
|
Current page number; default is 1. |
required |
page_size
|
int
|
Page size; default is 20 and maximum is 1000. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
FundingRateHistoryResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/funding_rate_history.py
funding_rate_history_paged
Yield pages from funding_rate_history until the response reports the final page.
Source code in pkg/src/mexc/futures/market/funding_rate_history.py
index_price
Return the current index price for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
IndexPriceResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/index_price.py
index_price_candles
Return index-price K-line/candlestick series for a symbol and optional time window.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
interval
|
Literal['Min1', 'Min5', 'Min15', 'Min30', 'Min60', 'Hour4', 'Hour8', 'Day1', 'Week1', 'Month1'] | None
|
K-line interval: Min1, Min5, Min15, Min30, Min60, Hour4, Hour8, Day1, Week1, or Month1. |
None
|
start
|
Timestamp | None
|
Start timestamp in seconds. |
None
|
end
|
Timestamp | None
|
End timestamp in seconds. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
IndexPriceCandlesResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/index_price_candles.py
ping
Return the current MEXC futures server time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
PingResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/ping.py
risk_reverse
Return all contract risk fund balances.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
RiskReverseResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/risk_reverse.py
risk_reverse_history
Return paginated risk fund balance history for a contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Contract symbol, for example BTC_USDT. |
required |
page_num
|
int
|
Current page number; default is 1. |
required |
page_size
|
int
|
Page size; default is 20 and maximum is 100. |
required |
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
RiskReverseHistoryResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/risk_reverse_history.py
risk_reverse_history_paged
Yield pages from risk_reverse_history until the response reports the final page.
Source code in pkg/src/mexc/futures/market/risk_reverse_history.py
support_currencies
Return currencies supported for futures transfers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
SupportCurrenciesResponse
|
The validated endpoint response. |
References
Source code in pkg/src/mexc/futures/market/support_currencies.py
ticker
Return ticker/trend data, optionally filtered to one futures contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str | None
|
Optional contract symbol filter, for example BTC_USDT. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
TickerResponse
|
The validated endpoint response. |