Copytrading Execute
curl --request POST \
--url https://api.simmer.markets/api/sdk/copytrading/execute \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
"<string>"
],
"top_n": 123,
"max_usd_per_position": 50,
"dry_run": false,
"buy_only": true,
"detect_whale_exits": false,
"max_trades": 123,
"venue": "<string>",
"market_ids": [
"<string>"
]
}
'import requests
url = "https://api.simmer.markets/api/sdk/copytrading/execute"
payload = {
"wallets": ["<string>"],
"top_n": 123,
"max_usd_per_position": 50,
"dry_run": False,
"buy_only": True,
"detect_whale_exits": False,
"max_trades": 123,
"venue": "<string>",
"market_ids": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallets: ['<string>'],
top_n: 123,
max_usd_per_position: 50,
dry_run: false,
buy_only: true,
detect_whale_exits: false,
max_trades: 123,
venue: '<string>',
market_ids: ['<string>']
})
};
fetch('https://api.simmer.markets/api/sdk/copytrading/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.simmer.markets/api/sdk/copytrading/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallets' => [
'<string>'
],
'top_n' => 123,
'max_usd_per_position' => 50,
'dry_run' => false,
'buy_only' => true,
'detect_whale_exits' => false,
'max_trades' => 123,
'venue' => '<string>',
'market_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simmer.markets/api/sdk/copytrading/execute"
payload := strings.NewReader("{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.simmer.markets/api/sdk/copytrading/execute")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simmer.markets/api/sdk/copytrading/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"wallets_analyzed": 123,
"positions_found": 123,
"conflicts_skipped": 123,
"top_n_used": 123,
"trades_needed": 123,
"trades_executed": 123,
"trades": [
{
"market_id": "<string>",
"market_title": "<string>",
"action": "<string>",
"side": "<string>",
"shares": 123,
"estimated_price": 123,
"estimated_cost": 123,
"success": true,
"error": "<string>"
}
],
"summary": "<string>",
"markets_matched": 0,
"user_positions": 0,
"trades_filtered_buy_only": 0,
"buys_skipped_min_shares": 0,
"buys_skipped_min_value": 0,
"whale_exits_detected": 0,
"failed_markets_skipped": 0,
"drift_filtered": 0,
"stale_filtered": 0,
"low_conviction_positions": 0,
"scope_filtered": 0,
"skipped_markets": [],
"errors": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Trading
Copytrading Execute
Execute copytrading: mirror positions from target wallets.
This wraps the existing copytrading_strategy.py logic for SDK/skills usage. Fetches target wallet positions via Dome API, calculates rebalance trades, and executes via SDK trade flow.
Flow:
- Fetch positions from all target wallets
- Calculate size-weighted allocations (larger wallets = more influence)
- Skip markets with conflicting positions
- Apply Top N filter (concentrate on highest-conviction positions)
- Match to Simmer database (auto-import missing markets)
- Get user’s current Polymarket positions (track which are from copytrading)
- Calculate rebalance trades
- Filter to buy-only if buy_only=True (default: prevents selling positions from other strategies)
- Detect whale exits if detect_whale_exits=True (sell positions whales no longer hold)
- Execute trades (unless dry_run=True)
Parameters:
- wallets: List of wallet addresses to copy
- top_n: Number of positions to mirror (None = auto based on balance)
- max_usd_per_position: Max USD per position (default: 50)
- dry_run: If true, return signals without executing
- buy_only: If true (default), only buy to match targets. This prevents copytrading from selling positions opened by other strategies (weather, etc.) Set to false for full rebalancing mode.
- detect_whale_exits: If true, sell positions that whales no longer hold. Only affects positions originally opened by copytrading (tracks via source field). Use with buy_only=True to accumulate + follow whale exits.
Requires API key in Authorization header (rate limited: 30/minute).
POST
/
api
/
sdk
/
copytrading
/
execute
Copytrading Execute
curl --request POST \
--url https://api.simmer.markets/api/sdk/copytrading/execute \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
"<string>"
],
"top_n": 123,
"max_usd_per_position": 50,
"dry_run": false,
"buy_only": true,
"detect_whale_exits": false,
"max_trades": 123,
"venue": "<string>",
"market_ids": [
"<string>"
]
}
'import requests
url = "https://api.simmer.markets/api/sdk/copytrading/execute"
payload = {
"wallets": ["<string>"],
"top_n": 123,
"max_usd_per_position": 50,
"dry_run": False,
"buy_only": True,
"detect_whale_exits": False,
"max_trades": 123,
"venue": "<string>",
"market_ids": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallets: ['<string>'],
top_n: 123,
max_usd_per_position: 50,
dry_run: false,
buy_only: true,
detect_whale_exits: false,
max_trades: 123,
venue: '<string>',
market_ids: ['<string>']
})
};
fetch('https://api.simmer.markets/api/sdk/copytrading/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.simmer.markets/api/sdk/copytrading/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallets' => [
'<string>'
],
'top_n' => 123,
'max_usd_per_position' => 50,
'dry_run' => false,
'buy_only' => true,
'detect_whale_exits' => false,
'max_trades' => 123,
'venue' => '<string>',
'market_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simmer.markets/api/sdk/copytrading/execute"
payload := strings.NewReader("{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.simmer.markets/api/sdk/copytrading/execute")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simmer.markets/api/sdk/copytrading/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n \"<string>\"\n ],\n \"top_n\": 123,\n \"max_usd_per_position\": 50,\n \"dry_run\": false,\n \"buy_only\": true,\n \"detect_whale_exits\": false,\n \"max_trades\": 123,\n \"venue\": \"<string>\",\n \"market_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"wallets_analyzed": 123,
"positions_found": 123,
"conflicts_skipped": 123,
"top_n_used": 123,
"trades_needed": 123,
"trades_executed": 123,
"trades": [
{
"market_id": "<string>",
"market_title": "<string>",
"action": "<string>",
"side": "<string>",
"shares": 123,
"estimated_price": 123,
"estimated_cost": 123,
"success": true,
"error": "<string>"
}
],
"summary": "<string>",
"markets_matched": 0,
"user_positions": 0,
"trades_filtered_buy_only": 0,
"buys_skipped_min_shares": 0,
"buys_skipped_min_value": 0,
"whale_exits_detected": 0,
"failed_markets_skipped": 0,
"drift_filtered": 0,
"stale_filtered": 0,
"low_conviction_positions": 0,
"scope_filtered": 0,
"skipped_markets": [],
"errors": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}This endpoint executes real trades. Always test with
venue=sim first.Body
application/json
Response
Successful Response
Response from copytrading execute endpoint.
Show child attributes
Show child attributes
⌘I
