Skip to main content
All API trading mutations use POST /v1/commands. Supported actions are open, modify and terminate, authorized by their corresponding scopes. Catalog reads and template CRUD do not create trading-command receipts. TradingView signals enter the same command/lifecycle owners through their separately authenticated webhook contract.

Command envelope

Inner link/instrument must match the envelope. Ordinary API clients omit TradingView-only source/lifecycle fields. Exact field names, uniqueness, types and decimal precision matter: unknown/case-variant/duplicate fields are invalid. Decimal coefficient strings and paired scales must retain their original meaning. For unseen intent, issuance must be within the past five minutes, with at most 30 seconds of future clock allowance; the command must still be before its own deadline. Expiry prevents a new handoff. It does not schedule cancellation of a position or stop work already owned by Liftx.

A complete receipt lifecycle

These are illustrative OPEN responses for one saved command, using synthetic UUIDs and 2030-01-01 UTC times. The first POST returns HTTP 202:
The durable claim can later be observed by GET, with HTTP 200:
After correlated canonical OPEN creation, a later GET can show:
A fast command may skip intermediate states between your reads. There is no requirement that a client observe each state. The current OPEN allocator uses the receipt UUID as the new position UUID; save both returned fields. The accepted UUID may exist before its canonical position publication. handed_off is still not a fill. Read the actual position and its physical order/fill/allocation evidence before treating the entry as executed. A LIMIT command can be handed off while its order remains pending.

Receipt states

error_code preserves a known safe failure reason even when the state is operator_required. A specific code does not prove that no effects occurred or permit replay; the state determines execution certainty. Missing position rows alone cannot exclude earlier account-level effects, such as a venue leverage change. A termination receipt may expose terminal_request_kind (1 close, 2 cancel) and positive terminal_request_seq. Those fields correlate the durable arm, not completed cancellation/closure. They can be present during dispatching before the owner’s synchronous call returns. A terminal request already owned or no longer needed may resolve as execution_observed without a newly correlated arm. Same-position commands are ordered by admission. This orders owner handoffs; it does not make a batch of OPEN/MODIFY/TERMINATE an atomic transaction or wait for every exchange fill between them. Reconcile state before dependent intent. An unresolved command is not authorization to bypass the ordering barrier through a new identity or another credential.

Immutable retries

Persist the complete intent before sending. A transport retry sends the same client ID, timestamps, deadline, target and request. A known identical command returns HTTP 200 with its current receipt and does not run again. An unseen command returns 202 only after durable acceptance. Do not refresh a timestamp or alter a protection under an existing ID. Changing intent under a known identity returns HTTP 409:
A lost response or ACCEPTANCE_UNCERTAIN (503) does not prove absence of acceptance. Retry the exact saved request. Known retained identities are checked before new-command staleness, so an expired exact retry can still recover its receipt; an unseen expired intent is refused. Credential rotation preserves the integration namespace. A separately created integration does not: the same client ID there is a different intent and can open another position. Never rotate into a new namespace as a retry mechanism.

Admission error versus execution rejection

Malformed input, missing scope or missing required revision can fail the POST immediately with an HTTP error envelope. A valid accepted command may instead fail later during owner admission. The following is an alternative receipt response, HTTP 200, for a stale MODIFY that had no prior possible effects:
Read fresh state and reassess the change before creating a new command. If earlier leverage preflight or another effect prevents a definitive rejection classification, the result can instead be:
The second outcome requires reconciliation of the existing intent. Do not create a replacement OPEN, replay a whole modification or submit a compensating trade from the error alone. Errors and limits separates transport/admission failures from receipt outcomes.

Read, paginate and inspect groups

GET /v1/commands returns up to 50 top-level namespace receipts in commands and nullable next_cursor; pass the cursor unchanged for older rows. No extra read scope is needed for your namespace receipts. The Events screen, opened from the Integrations header, supplies account-level on-demand history. A same-account API key with read and matching link/instrument scope may read a known TradingView receipt UUID through GET /v1/commands/get. It does not acquire that TradingView namespace’s list or mutation authority. TradingView group detail adds group.target, frozen target_count, counts for every child state, and up to 64 targets. Unresolved summary priority is operator_required, then dispatching, then accepted; homogeneous resolved children share their state, mixed resolved outcomes are partial. Zero targets resolves to execution_observed. None of these parent states proves a market is flat, and retry never expands frozen membership.

Retention and recovery

Resolved receipt retention is 30 days; unresolved commands are retained. Groups retire only after all children resolve and age out together. Archive audit evidence you need longer, without API keys or secret-bearing webhook bodies. A historical 404 after retention is not proof a command never ran; do not use it to justify an old trade with a refreshed deadline. Restart recovery classifies canonical OPEN and terminal-arm evidence. An uncertain modification is not replayed wholesale. Position recovery remains with the same owners that manage native Liftx trading, including late fills and unresolved physical orders. Revocation, entitlement expiry and command expiry stop new handoffs. They do not interrupt already-owned protection, termination or recovery. Use termination to end a lifecycle and verify its actual position outcome; revocation is not an emergency close. The WebSocket stream publishes state, while receipt reads track commands.