Skip to main content

MEXC Spot Trade Connector

Features

crypto-mexcConnector Key
Instruments
FX
Request Types
SUBMITCANCEL
Order Types
MARKETLIMIT
Time In Force
GTC
Order ID Mapper
SEQUENCE
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 (default 10) above which the All Orders endpoint is used. \
  • syncSymbolsRatioThreshold — unique symbol to active order count ratio (default 0.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

ParameterDefault ValueDescription
syncOrdersThreshold10The threshold (active order count) to start syncing active orders via Order Detail request rather than by Order Details one.
syncSymbolsRatioThreshold0.3The threshold (unique symbols to active orders ratio) to start syncing active orders via Order Detail request rather than by Order Details one.
recvWindow5000It 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.
websocketHeartbeatInterval30sHeartbeat interval.

Supported order attributes

KeyDescription
186 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>"
}
]
}
}
}