Surface Map
Concepts
Lead trader. A wallet that has registered a lead profile. Leaders are addressed everywhere by their custom TraderCode handle (see TraderCodes), and one wallet holds at most one lead profile, so a handle names exactly one leader. Every other user appears by public wallet address plus a display name, never by an internal id. A leader’s profile carries a status:ACTIVE accepts new follows, PAUSED keeps existing follows mirroring but accepts no new ones, and SUSPENDED (set by the platform) hides the leader from public reads.
Follow and copy account. A follow is one follower’s relationship with one leader. Creating it moves the allocation from the follower’s margin account into a new copy account: a cross risk bucket in the follower’s margin account that holds only this follow’s collateral and positions. The follow’s copyRiskBucketId names it, and the account listings label its rows with copyFollowId and copyLeaderHandle. Isolated copies open isolated risk buckets tied to the same follow.
Sizing, leverage and margin mode. Each follow chooses:
sizingMode:PROPORTIONAL(default) scales each copy by the copy account’s equity over the leader’s margin account equity;FIXED_MARGINcommitssizingParamquote units of margin per leader order.leverageMode:FOLLOW(default) uses the leader’s leverage;FIXEDusesfixedLeveragefor every copy.marginModePolicy:FOLLOW(default) copies into the leader’s margin mode per market;CROSSorISOLATEDforces one.tradingPairIds: the markets to copy; empty copies every market the leader trades.
INSUFFICIENT_MARGIN, BELOW_MIN, LEVERAGE_MISMATCH, MARKET_STATE, LEADER_EQUITY or NO_LIQUIDITY. Only INSUFFICIENT_MARGIN counts toward the follow’s consecutiveSkips streak. A follow in CLOSE_ONLY mirrors reductions only. A copy that would be sized into a CROSS risk bucket on an isolated-only market is skipped with MARKET_STATE and does not count toward the consecutiveSkips streak.
Stop-loss and stopping. slPct sets a copy stop-loss as a fraction of the allocation, in (0, 1]. A follow stops when the follower stops it, the stop-loss triggers, the skip limit is reached, the leader is suspended, or an admin stops it; stopReason says which.
Profit share basis. Each follow tracks cumNetRealized (realized PnL net of fees since the follow started) and its high-water mark hwm. These are the basis for the leader’s profit share. They are not the copy account’s balance: on a risk bucket row, realizedPnl is the risk bucket’s cash balance, which also moves on transfers with no trade.
Copy orders. Orders placed for a follow carry origin: "COPY" and the follow’s id as copyRelationshipId on their order events.
Flow for followers
1. Find a leader
The leaderboard, a leader’s profile and their closed trades are public — no session needed.nextPageToken (with the same sort and window for the leaderboard) until it comes back empty. There are no totals.
2. Follow
minAllocation. Delegated agent and sub-account sessions cannot follow. To also copy the leader’s already-open positions into the new copy account, set copyExisting: true on the create. Each copy is sized like a mirrored fill. previewFollow shows what that would open before you commit, as totals only: the estimated margin the copies would reserve and their fees (rounded up to cents), and how many of the leader’s positions would and would not be copied. It names no market, side or reason, since you do not follow the leader yet. It is read-only, applies the same terms rules as a follow (so it refuses terms a follow would refuse), is refused while copy trading is off, and spends the order-risk preview budget. It sizes at most 64 positions and sets truncated when the leader holds more in the copied markets. copyExisting applies only to a create: an edit that sets it is refused, and the follow keeps recording whether it copied at creation.
3. Watch the follow
listLeadTraderOpenPositions(handle), or by follow with listFollowLeaderPositions(followId), which takes the leader from the follow and so keeps working after the leader releases their handle. getFollow(followId) returns a follow with its most recent skips and copyAccountEquity: the copy account’s equity at the engine’s marks (its collateral plus the unrealized PnL of its positions). That is a balance, not trading PnL, and it is absent when the engine cannot be read.
Copy positions are the follow’s
The positions in a copy account are managed by the follow:- TP/SL cannot be attached to a copy position (403).
- A manual close, single or close-all, still works, but it goes out immediate-or-cancel, so no order is left resting in the copy account. Panic close (
batchCloseAllon positions) closes copy positions along with everything else, one position at a time. - No order, transfer or simulate accepts a strategy key starting with
copy:(400strategy keys starting with copy: are reserved). Collateral moves into or out of a copy account only through the follow: its allocation, an edit, or a stop. Within the follow, adding margin moves copy account collateral into an isolated copy position.
4. Add margin to a copy position
addFollowPositionMargin moves collateral from the follow’s copy account into the margin of its isolated copy position on one trading pair. The position’s initial margin requirement rises by exactly amount at the current mark (its leverage drops to what that amount buys at this price), the copy account’s remaining collateral falls by the same, and your margin account is never touched. It lowers the position’s leverage and moves its liquidation price away. It opens no exposure, so it works while copy trading is switched off and on a CLOSE_ONLY follow.
POST /api/v1/copy-trading/follows/{followId}/position-margin. The follow id goes in the path only, and the body carries the rest; the gateway rejects unknown fields.
- There is no margin reduction: a follow exits by being stopped.
- Only a master account session can add margin; a delegated agent or sub-account session gets 403. A follow that is not yours is 404.
- A follow that is stopping, or has stopped, is 409.
- Refusals of the add itself are 400 with
code: "COPY_TRADING_REJECTED"and a message naming the rule: the follow holds no isolated copy position on the pair (a cross copy lives in the copy account’s cross risk bucket, which has no per-position margin), the copy position is being liquidated or is in bad debt (a position waiting for liquidation still takes margin: adding it is the way out), or the amount is more than the copy account can put into the position. - Switching copy trading off does not block it: the switch halts new exposure, and an add opens none.
- It is refused during an operations block (
OPERATIONS_BLOCKEDover REST,UNAVAILABLEover gRPC), like every other margin move. - It spends the per-user movement budget that withdrawals and collateral transfers share: over it, 429 with
details.retryAfter. - It is not idempotent. If a call times out, read the follow (or the position) before retrying: a retry whose first attempt landed adds the amount twice.
5. Edit or stop
An edit sendsfollowId and replaces the follow’s settings: every optional setting you leave out reverts to its default, so an edit without slPct removes the stop-loss. The leader comes from the stored follow, so leader can be omitted.
Retry-After.
6. Close copy positions and keep following
To close a follow’s copy positions without stopping it, close them. The follow stays as it is (ACTIVE or CLOSE_ONLY) and the leader’s next trades keep mirroring;stopFollow is the close-and-stop path.
- Every position in the copy account closes at market, reduce-only and immediate-or-cancel, in one batch per follow. The resting orders and conditional orders (TP/SL) on its copy risk buckets are cancelled; a TWAP cannot run on a copy risk bucket.
closeAllCopyPositionsdoes this for every live follow of yours, one batch per follow. - A close is not a flatten guarantee. An immediate-or-cancel close on a thin or halted market can leave part of a position open (
positionsNotClosed), and because the follow keeps mirroring, the leader’s next trade opens copy positions again. Stop the follow to end the copying. - The proceeds stay in the copy account; nothing returns to your margin account until the follow stops.
- A close is never gated by copy trading being switched off or by an operations block, and it charges no order budget. Only a delegated agent session is refused (403). Both close methods share a small per-account rate limit (about one close per second, burst 5); past it the answer is 429 with
Retry-After. - The response comes once the batch is durably logged: close orders placed and positions still open. Each close’s fills arrive on the order, position and copy channels.
closeAllCopyPositionslists every live follow whose stop is not in progress, including one with nothing to close (0 and 0). - A follow that is not yours is a 404. A stopped follow, or one whose stop is in progress (the stop closes its positions itself), is a 409;
closeAllCopyPositionslists those instoppingFollowIdsinstead. A close the engine refuses is a 400, and one that cannot run right now a 503;closeAllCopyPositionslists such a follow infailedFollowswith a fixed reason and still closes the others.
Flow for leaders
1. Register
A registration is checked against the platform’s eligibility rules — account equity, trading history, closed positions, and a claimed custom TraderCode handle. A refusal names the rule. A wallet with a live follow cannot register.bio or minAllocation is cleared and an omitted status means ACTIVE; an omitted shareBps keeps the current share (the platform default on a registration).

