MEXC Spot Trade Connector
Features
crypto-mexcConnector Key✗
Order Status Request
✗
Cancel On Disconnect
✓
Commission
✓
Post Only
✗
Fast Cancel
✗
Fast Replace
Notes
Documentation
https://mxcdevelop.github.io/apidocs/spot_v3_en/#introduction
Cancel/Replace
This operation is not supported.
Order Synchronization
If the number of active orders is small (≤ 10), the connector uses the Query Order request to sync.
Otherwise, the All Orders endpoint is used.
Two parameters control this behavior:
syncOrdersThreshold— active order count threshold (default10) above which the All Orders endpoint is used. \syncSymbolsRatioThreshold— unique symbol to active order count ratio (default0.3) above which the All Orders endpoint is used.
Example:
There are 20 active orders to sync for 10 unique symbols.
In this case, the connector uses the All Orders endpoint because:
20 >= 10 (_syncOrdersThreshold_) && 10/20 > 0.3 (_syncSymbolsRatioThreshold_)
Symbology
https://api.mexc.com/api/v3/exchangeInfo
Note: If the symbol is incorrect, MEXC will respond with an "Invalid signature" error.
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| syncOrdersThreshold | 10 | The threshold (active order count) to start syncing active orders via Order Detail request rather than by Order Details one. |
| syncSymbolsRatioThreshold | 0.3 | The threshold (unique symbols to active orders ratio) to start syncing active orders via Order Detail request rather than by Order Details one. |
| recvWindow | 5000 | It is recommended to use a small recvWindow of 5000 ms or less. But very low values can lead to reject. The max cannot go beyond 60 sec. |
| websocketHeartbeatInterval | 30s | Heartbeat interval. |
Supported order attributes
| Key | Description |
|---|---|
| 18 | 6 value used for post only orders submission |
Config sample
connectors {
MEXC: ${template.connector.crypto.mexc} {
settings {
restUrl = "https://api.mexc.com"
websocketUrl = "wss://wbs.mexc.com/ws"
apiKeys: [
{
apiKey = "<API_KEY>"
apiSecret = "<API_SECRET>"
}
]
}
}
}