REST · WebSocket · Webhooks · v5

MEXC Copy Trading API

MEXC futures copy trading: the leaderboard's tabs, profiles, performance, open positions with live PnL, and closed positions. In the same JSON format as every other Kopyon source.

7 routesStream and webhooksFree tier 10,000 req/mo
GET /v5/mexc-copy-trading/openPositionsreal sample
curl -H "X-API-KEY: $KOPYON_KEY" \
"https://api.kopyon.com/v5/mexc-copy-trading/openPositions?traderId=71631996"
{
"data": {
"positions": [
{
"symbol": "ZECUSDT",
"side": "LONG",
"size": 5.85,
"entryPrice": 1152.6349401709401,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1522241795",
"margin": 69.447439296,
"openedAt": 1792247574643,
"markPrice": 1083.8,
"unrealizedPnl": -402.6844,
"pnlCurrency": "USDT",
"roi": -5.7984052988,
"fundingPnl": -1.5883691235,
"tradingFee": 1.84857768,
"sourceDetails": {}
},
{
"symbol": "ETHUSDT",
"side": "LONG",
"size": 19.32,
"entryPrice": 2412.3640890269153,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1521877206",
"margin": 475.830031456,
"openedAt": 1792178202786,
"markPrice": 2372.2,
"unrealizedPnl": -775.9702,
"pnlCurrency": "USDT",
"roi": -1.6307718065,
"fundingPnl": -7.6109009837,
"tradingFee": 7.5409244,
"sourceDetails": {}
},
{
"symbol": "ETHUSDT",
"side": "SHORT",
"size": 4.12,
"entryPrice": 2495.3986983630753,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1514789428",
"margin": 259.8121187424,
"openedAt": 1792149154180,
"markPrice": 2372.2,
"unrealizedPnl": 507.5786372559,
"pnlCurrency": "USDT",
"roi": 1.9536372657,
"fundingPnl": 20.135926655,
"tradingFee": 106.3831026,
"sourceDetails": {}
}
],
"hidden": false
}
}
A real response · long lists cut for the pageExplore all routes
Overall, ROI, PnL and new-trader tabsOpen PnL worked out from the fair priceSizes in the base asset

Trader id The code in a trader's MEXC URL, or their 8-digit uid.

The API surface

7 MEXC Copy Trading routes

Pick one to see its parameters and a real response.

GET/v5/mexc-copy-trading/openPositions

The trader's open positions, sizes in the base asset. MEXC sends no PnL: markPrice is its fair price, and unrealizedPnl and roi are worked out from it and the position's margin, as MEXC's site does. A trader can show them only to copiers; then positions is empty and hidden is true.

Query parameters
traderIdstringrequired
The lead trader's 8-digit uid, from traders, or the code in their MEXC URL (/copyTrade/leader/32C6A56), which is the uid in hexadecimal
200 responsereal sample
{
"data": {
"positions": [
{
"symbol": "ZECUSDT",
"side": "LONG",
"size": 5.85,
"entryPrice": 1152.6349401709401,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1522241795",
"margin": 69.447439296,
"openedAt": 1792247574643,
"markPrice": 1083.8,
"unrealizedPnl": -402.6844,
"pnlCurrency": "USDT",
"roi": -5.7984052988,
"fundingPnl": -1.5883691235,
"tradingFee": 1.84857768,
"sourceDetails": {}
},
{
"symbol": "ETHUSDT",
"side": "LONG",
"size": 19.32,
"entryPrice": 2412.3640890269153,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1521877206",
"margin": 475.830031456,
"openedAt": 1792178202786,
"markPrice": 2372.2,
"unrealizedPnl": -775.9702,
"pnlCurrency": "USDT",
"roi": -1.6307718065,
"fundingPnl": -7.6109009837,
"tradingFee": 7.5409244,
"sourceDetails": {}
},
{
"symbol": "ETHUSDT",
"side": "SHORT",
"size": 4.12,
"entryPrice": 2495.3986983630753,
"leverage": 100,
"marginMode": "CROSS",
"positionId": "1514789428",
"margin": 259.8121187424,
"openedAt": 1792149154180,
"markPrice": 2372.2,
"unrealizedPnl": 507.5786372559,
"pnlCurrency": "USDT",
"roi": 1.9536372657,
"fundingPnl": 20.135926655,
"tradingFee": 106.3831026,
"sourceDetails": {}
}
],
"hidden": false
}
}
Example request
curl -H "X-API-KEY: $KEY" \
"https://api.kopyon.com/v5/mexc-copy-trading/openPositions?traderId=71631996"

Quickstart

Two calls to a trader's positions

Set KOPYON_KEY in your environment. The ranking hands you ids for every other route.

# The ranking, best first
curl -H "X-API-KEY: $KOPYON_KEY" "https://api.kopyon.com/v5/mexc-copy-trading/traders?period=7D"

# One trader's open positions
curl -H "X-API-KEY: $KOPYON_KEY" "https://api.kopyon.com/v5/mexc-copy-trading/openPositions?traderId=TRADER_ID"
import os, requests

API = "https://api.kopyon.com/v5/mexc-copy-trading"
HEADERS = {"X-API-KEY": os.environ["KOPYON_KEY"]}

traders = requests.get(f"{API}/traders", params={"period": "7D"}, headers=HEADERS).json()["data"]["traders"]
trader_id = traders[0]["traderId"]

answer = requests.get(f"{API}/openPositions", params={"traderId": trader_id}, headers=HEADERS)
print(answer.json()["data"])
const API = "https://api.kopyon.com/v5/mexc-copy-trading";
const headers = { "X-API-KEY": process.env.KOPYON_KEY };

const { data } = await (await fetch(`${API}/traders?period=7D`, { headers })).json();
const traderId = data.traders[0].traderId;

const answer = await fetch(`${API}/openPositions?traderId=${traderId}`, { headers });
console.log((await answer.json()).data);

Official SDKs for TypeScript and Python are generated from the same spec. Full reference


Real time

Get told when a MEXC trader trades

Subscribe once and the API polls for you. Hold a WebSocket open, or let signed webhooks POST each change to your server. Both count one request per check, however many of your clients follow the same trader.

openPositionsOpen positions, whenever they change
positionEventsOpened, increased, decreased, closed
positionHistoryNewly closed positions
webhooksThe same changes, as signed POSTs to your URL
Stream and webhook reference
Subscribe
const ws = new WebSocket("wss://api.kopyon.com/v5/stream?apiKey=" + KEY);

ws.onopen = () => ws.send(JSON.stringify({
  type: "subscribe",
  source: "mexc-copy-trading",
  topic: "positionEvents",
  traderId: TRADER_ID,
}));

ws.onmessage = (m) => console.log(JSON.parse(m.data));
You receive
{
  "type": "events",
  "source": "mexc-copy-trading",
  "topic": "positionEvents",
  "traderId": "TRADER_ID",
  "data": {
    "events": [
      {
        "event": "opened",
        "symbol": "SOLUSDT",
        "side": "LONG",
        "size": 620,
        "position": {
          "symbol": "SOLUSDT",
          "side": "LONG",
          "size": 620,
          "entryPrice": 142.31,
          "markPrice": 142.4,
          "leverage": 20,
          "unrealizedPnl": 55.8
        }
      }
    ]
  }
}


Pricing

Priced on throughput, not on features

Every plan reaches every source, and paid plans add the stream and webhooks. The rest is how fast you can call, how many calls you get, and what you may do with the data.

Billed directly, with no marketplace in between
Free
Build the whole integration before you pay anything.
$0/mo
No card required
Start free
  • 120 requests / minute, per endpoint
  • 10,000 requests / month
  • Every source, REST only
  • Evaluation use
  • Community support
Most popular
Developer
A single bot or dashboard, running in production.
$49/mo
Billed monthly
Get started
  • 600 requests / minute, per endpoint
  • 5,000,000 requests / month
  • Every source, with stream and webhooks
  • One production system, no resale
  • Email support
Trading Desk
Funds and prop firms running this across a team.
$299/mo
Billed monthly
Get started
  • 1,800 requests / minute, per endpoint
  • 50,000,000 requests / month
  • Every source, with stream and webhooks
  • Commercial use across your firm
  • Telegram support, same day
Dedicated

Capacity, uptime and redistribution rights are all negotiated. It's for firms reselling the data, or running it as core infrastructure.

From $1,500 /mo
scoped to a custom contract
Talk to us
No card on file, nothing auto-renewsMonthly quota runs 30 days from your first callUpgrade or downgrade between months

FAQ

Before you write the first request

Where do I find a trader's id?

The code in a trader's MEXC URL, or their 8-digit uid.

How fresh is the data?

As fresh as the exchange publishes it. Each request is read from the source when you make it; identical requests in the same second share one read. Exchanges refresh on their own schedule, from about a second to several minutes, and each route's reference says how often where we know it.

Can I try it before I pay?

Yes. A free key gets 10,000 requests a month on every source and never asks for a card, and the console has a playground that runs any route or stream with your key. Without a key, each IP gets 10 calls a day per route.

Is the format really the same on every exchange?

Yes. Every source answers the same routes with the same field names: traders, traderProfile, openPositions, positionHistory and so on. Rates are fractions, sizes are in the base asset, and rankings page with page while histories page with a cursor. What only one exchange sends goes in sourceDetails.

How do the stream and webhooks work?

You subscribe to a topic for one trader, and the API polls the exchange for you and sends only what changed: a WebSocket message, or a signed POST to your URL. Each poll counts one request, shared by all your connections and webhooks on the same trader. They come with every paid plan.

What if a trader hides their positions?

The answer says so with hidden: true and an empty list, rather than an empty list you would read as closed, and the stream sends a hidden message instead of closing everything.

Is this an official exchange API?

No. Kopyon reads what traders share publicly on each exchange or blockchain. A few sources, such as OKX, Hyperliquid and dYdX, publish it through documented APIs; the rest through their websites. An exchange can change what it publishes, and the changelog in the reference says when that affects a route.

Can I get a custom plan?

Yes. Dedicated plans negotiate limits, capacity and the right to redistribute the data. Tell us the volume you need on Telegram at @nunnito, or by email.

Ship against real MEXC Copy Trading data.

The free tier is 10,000 requests a month. That is enough to build a whole integration and test it against live data before you pay anything.

Usually answered within a day · [email protected]