
Get up and running with the Copydium API in under 10 minutes.
Sign up for a Copydium account and generate your API key from the dashboard.
# Your API key will look like this:
X-API-Key: sk_live_abc123def456...Test your API key by fetching your user profile.
curl https://api.copydium.com/api/v1/users/me \
  -H "X-API-Key: sk_live_abc123def456..." \
  -H "Content-Type: application/json"Add your MetaTrader account to start copy trading.
curl https://api.copydium.com/api/v1/taccounts \
  -H "X-API-Key: sk_live_abc123def456..." \
  -H "Content-Type: application/json" \
  -d '{
    "serverId": "srv_123",
    "accountId": "12345678",
    "platform": "TRADE_PLATFORM_MT4",
    "accountType": "ACCOUNT_TYPE_DEMO"
  }'Create your first copy trading connection.
curl https://api.copydium.com/api/v1/connections \
  -H "X-API-Key: sk_live_abc123def456..." \
  -H "Content-Type: application/json" \
  -d '{
    "copyConnectionName": "My First Strategy",
    "masterAccount": {
      "accountId": "12345678",
      "tradePlatform": "TRADE_PLATFORM_MT4"
    },
    "followerAccount": {
      "accountId": "87654321", 
      "tradePlatform": "TRADE_PLATFORM_MT4"
    }
  }'No SDK required. Call our REST API directly using your language’s HTTP client with the X-API-Key header.
// Requires Node 18+ for fetch()
const API_BASE_URL = process.env.API_BASE_URL || 'https://api.copydium.com';
const API_KEY = 'sk_live_abc123def456...';
// GET: User dashboard stats
const statsRes = await fetch(`${API_BASE_URL}/api/v1/reports/user/dashboard-stats`, {
  headers: { 'X-API-Key': API_KEY }
});
const stats = await statsRes.json();
console.log(stats);
// POST: Create trading account
const createRes = await fetch(`${API_BASE_URL}/api/v1/taccounts`, {
  method: 'POST',
  headers: {
    'X-API-Key': API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    serverId: 'srv_123',
    accountId: '12345678',
    tradePlatform: 'TRADE_PLATFORM_MT4',
    accountType: 'T_ACCOUNT_TYPE_FOLLOWER',
    password: 'your-password'
  })
});
const account = await createRes.json();
console.log(account);import os, requests
API_BASE_URL = os.getenv('API_BASE_URL', 'https://api.copydium.com')
API_KEY = 'sk_live_abc123def456...'
headers = { 'X-API-Key': API_KEY }
# GET: User dashboard stats
r = requests.get(f"{API_BASE_URL}/api/v1/reports/user/dashboard-stats", headers=headers)
print(r.json())
# POST: Create trading account
payload = {
  'serverId': 'srv_123',
  'accountId': '12345678',
  'tradePlatform': 'TRADE_PLATFORM_MT4',
  'accountType': 'T_ACCOUNT_TYPE_FOLLOWER',
  'password': 'your-password'
}
r = requests.post(f"{API_BASE_URL}/api/v1/taccounts", headers={**headers, 'Content-Type': 'application/json'}, json=payload)
print(r.json())<?php
$API_BASE_URL = 'https://api.copydium.com';
$API_KEY = 'sk_live_abc123def456...';
// GET: User dashboard stats
$ch = curl_init("$API_BASE_URL/api/v1/reports/user/dashboard-stats");
curl_setopt_array($ch, [
  CURLOPT_HTTPHEADER => ["X-API-Key: $API_KEY"],
  CURLOPT_RETURNTRANSFER => true
]);
$stats = curl_exec($ch);
curl_close($ch);
print_r($stats);
// POST: Create trading account
$payload = json_encode([
  'serverId' => 'srv_123',
  'accountId' => '12345678',
  'tradePlatform' => 'TRADE_PLATFORM_MT4',
  'accountType' => 'T_ACCOUNT_TYPE_FOLLOWER',
  'password' => 'your-password'
]);
$ch = curl_init("$API_BASE_URL/api/v1/taccounts");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $payload,
  CURLOPT_HTTPHEADER => [
    "X-API-Key: $API_KEY",
    'Content-Type: application/json'
  ],
  CURLOPT_RETURNTRANSFER => true
]);
$resp = curl_exec($ch);
curl_close($ch);
print_r($resp);Step-by-step tutorials to help you master the Copydium API.
Learn how to authenticate requests and implement security best practices.
Connect and manage MT4/MT5 accounts programmatically.
Build copy trading functionality with master-follower relationships.