Idempotency & concurrency
- Reads never need special headers.
- Updates (
PATCH,DELETE, pause/resume) require anIf-Matchheader carrying the resource’s current ETag (itsversion, quoted — e.g."3", taken from a priorGET/POSTresponse). Omitting it returns428 precondition_required; a stale value returns412 version_conflict(409for Auto Sell) — re-read the resource and retry. - Creates require an
Idempotency-Keyheader (8–128 characters from letters, digits,.,_,:, and-). Completed responses are retained for 24 hours, scoped to the account, method and path; rotating a key does not reset this binding. Within that window, replaying the same key with the same request body returns the original201response instead of creating a duplicate; the same key with a different body returns409 idempotency_conflict. A missing header returns400 missing_idempotency_key, a malformed one400 validation_error. While an earlier request with the same key is still running you get409 idempotency_in_progress; retry later with the same key. - Batch pause/resume carry one
If-Matchvalue per item in the request body instead of a header — one failing item does not fail the whole batch; the response is always200with a per-itemstatus_code/code.
Fee warnings on successful task writes
Successful creates (201) and updates (200) for Copy Trade, Sniper, Strategy Tasks and Auto Sell Tasks return a top-level warnings array for the saved configuration. An empty array means no fee crossed a threshold.
high_feemeans a fee exceeds 1 SOL or 1 BNB.pathis the field of this resource that sets the fee, such asgas.high_tip.landing_fee,sell.gas.priority_feeorbuy.tiers.0.gas.landing_fee(a JSON Pointer intospecfor Strategy Tasks). Whensellis omitted the sell side usesgas, so a buy and a sell warning can share one path. Usesideanditemto identify the fee. Bothamountandthresholdare decimal strings denominated inunit.high_fee_ratiomeans the automatic Solana buy fee exceeds 10% of principal. The configuredbpsand thethreshold_bpsof 1000 are in basis points (100 bps = 1%).
The write has succeeded. No confirmation parameter or retry is needed. Replaying a create with the same idempotency key returns the original response.
Patch semantics
PATCH bodies are application/merge-patch+json (RFC 7396): omitted keys are untouched, nested objects merge, arrays replace wholesale, and null restores a field to its default — except the fields each resource marks immutable (rejected outright) or “no-null” (must be turned off with {"enabled": false} instead of null). Each endpoint page states its resource’s immutable and no-null fields.
Read-only configurations and deletion
read_only: true configurations reject configuration PATCH requests, including name changes, with 409 task_read_only. Labels-only PATCH still works with the current If-Match; GET, pause, resume and delete keep their existing rules. A paused, synced task can still be read-only.
For pause and DELETE, close_position still defaults to false, and that value is stored even when the query parameter is omitted. Deleting with close_position=false keeps the task’s open exit orders. They remain visible via /v1/orders and can be cancelled with an API key carrying orders:cancel; deletion alone is not order cancellation. Resume does not accept close_position.
Editing wallet leaders
This capability is pending release. For an ordinary wallet Copy Trade configuration, add or remove leaders by PATCHing the original configuration ID with the complete desired list. Every entry must use source: "wallet"; the list must contain valid, unique addresses for the task’s chain. The complete list accepts up to 2000 addresses; the gateway and task domain enforce the same limit. An empty list or null is rejected. Omitting leaders preserves the current list. The task ID, chain, and execution wallets (wallet_id / wallet_ids) remain unchanged.
- Pause the configuration and wait until GET reports
status: "paused",engine.sync_state: "synced", andengine.buy_entry: "closed". - Read the current ETag. PATCH
/v1/copy-trade/configs/{id}with that value inIf-MatchandContent-Type: application/merge-patch+json. Send all leaders you want to keep, including any additions; omit addresses you want to remove. - Read back the configuration and wait for engine synchronization before resuming with its latest ETag. A successful PATCH saves the requested list; it does not by itself prove the engine has applied it.
For example, replacing a two-leader list with one retained leader removes the other:
{
"leaders": [
{ "source": "wallet", "ref": "LEADER_ADDRESS_TO_KEEP" }
]
}
Use an actual address for the configuration’s chain. A stale ETag returns 412 version_conflict; re-read the latest list before preparing another complete replacement so you do not overwrite another edit. A configuration that is not ready for editing returns 409 not_paused. PATCH requests accept up to 512 KiB.
FOMO/Pump-bound configurations cannot change their leaders through PATCH, and wallet/FOMO source switching is rejected with 400 validation_error. FOMO creation still takes one handle.
Auto Sell concurrency and lifecycle
All items on one chain share a version and ETag. Re-read after editing any item before preparing another write. PATCH merges into the current item and submits a full validated update; arrays replace, optional exits can be removed with null, required fields cannot. Use pause/resume for rule.enabled. Except for name-only edits, the item must be paused with chain sync_state=off or active.
Create uses the same 24-hour idempotency window. Pause/resume at the requested state returns unchanged with the current If-Match, without a version increment. Delete removes the item; later GET/DELETE returns 404. These operations do not accept close_position and leave existing protection orders intact. Writes, including deletion, require copytrade:write.