Submit a trading command
A new intent returns 202 with a durable receipt; an identical retry returns 200 with the original receipt.
Authorization
positions:open, positions:modify or positions:terminate, selected by the action.
Behavior
A new intent returns 202 with a durable receipt; an identical retry returns 200 with the original receipt. OPEN allocates one position UUID; MODIFY requires a fresh expected_revision; TERMINATE omits request. Reusing an identity with different intent conflicts. Acceptance does not certify a fill or flatness.JSON body example
The following shows the request shape, not live credentials or executable market defaults. Replace timestamps only when creating a new reviewed intent; never mutate them on a command retry.Response and errors
The generated response schema below is the wire contract. Preserve fixed-point strings, nullable fields and endpoint-specific envelopes. Inspect HTTP status and Content-Type before decoding failures; reused trading routes may return JSON or plain text. Authentication, entitlement and exact link/instrument restrictions apply in addition to endpoint validation. See errors and recovery. Do not automatically repeat a mutation after transport ambiguity. Trading commands reuse the exact immutable identity; credential issuance and template writes require their documented metadata/read reconciliation. Read the related guide for lifecycle, units and recovery semantics.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Immutable namespace+client ID; lifespan <=300s. Open omits position_id; modify/terminate require it. Modify requires expected_revision; terminate omits request. Open/modify require request. Identical retries return original receipt, changed payload is 409.
Unique immutable namespace event identity; liftx-group: prefix is reserved.
1 - 128open, modify, terminate 1 <= x <= 9007199254740991x >= 1Existing PositionRequest codec, also used by advanced TradingView. Paired row arrays must have equal lengths. Adapter batch limits and 256 KiB command body apply below the post-decode row ceiling. Creation and enabled protections require their operational fields. API modify requires outer expected_revision and fresh exact slot/order identities. TV modify must preserve OPEN rows. See position-request.md for all fields and units.
Optional explicit exact-position target; group selectors are TradingView-only.
"position"Response
Identical existing command
Durable command receipt, never a fill/completion assertion. Terminal request fields correlate a durable termination owner handoff. Terminal arm writes kind/sequence while retaining dispatching; owner return or startup canonical evidence advances handed_off. Group parent position_id is null. Precedence is operator_required, dispatching, accepted, then homogeneous resolved state or partial. Zero-target parent is execution_observed. Counts and child states do not prove exposure is flat.
accepted, dispatching, handed_off, execution_observed, rejected, expired, operator_required, partial 1, 2 x >= 1Parent group on a child termination receipt.
Counts sum to the immutable target_count. Zero targets records an observed empty selection, not market flatness.
Group detail only: at most 64 frozen ordinary termination receipts. Targets cannot contain nested groups or target arrays. Omitted on list responses and zero-target groups.
64