Skip to main content

FAQ

Windows Quoting

Examples in this documentation follow macOS and Linux shell syntax. Both Windows shells strip the quotes shown here:

mexc spot trade place --data '{"symbol":"BTC_USDT"}'

Three approaches are available. The first is recommended because the syntax is consistent across systems:

# Write to a file
mexc spot trade place --data "@body.json"

# PowerShell escaping
mexc spot trade place --data '{\"symbol\":\"BTC_USDT\"}'

# Command Prompt escaping
mexc spot trade place --data "{\"symbol\":\"BTC_USDT\"}"

If you do not handle quoting, the CLI reports that the shell removed the quotes and suggests using a file instead.

File Encoding

Windows Notepad saves files as ANSI by default. Choose UTF-8 under Save As. Editors such as VS Code use UTF-8 by default.

Upgrade and Uninstall

mexc update --check              # Check for a new version
mexc update # Upgrade
mexc skills update # Run after upgrade to sync agent skill documents
npm uninstall -g @mexc-ai/cli # Uninstall

Data Directory

On macOS and Linux, data is stored in ~/.mexc. On Windows, it is stored in C:\Users\YourUsername\.mexc. This directory holds accounts and configuration. Deleting it removes all saved keys and requires reconfiguration.

Error Handling

Run mexc doctor first. Errors from individual commands are returned as JSON; the hint field explains how to fix them:

{
"error": {
"type": "validation",
"subtype": "invalid_argument",
"message": "--symbol value \"NOTACOIN\" does not match the required pattern",
"param": "--symbol",
"hint": "Trading pair in BASE_QUOTE form, e.g. BTC_USDT — required unless symbolId is given"
}
}

Follow the hint; do not retry with different syntax. Retrying order commands may cause duplicate orders.

When reporting an issue, provide the full error JSON, the output of mexc --version, and the output of mexc doctor.