Skip to main content
POST
Examples are synthetic; the documentation cannot submit requests.

Authorization

Restricted TradingView key in body token; ordinary API keys are invalid.

Behavior

Use the hooks host, valid JSON and exactly one nonnull alert or command. No client-certificate setup is required. New durable acceptance returns 202; identical retry returns 200; temporary or inactive admission returns 503. The application admission budget is two seconds. Receipts are not execution feedback to Pine.

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.
Send to https://hooks.liftx.io/v1/tradingview/events, not the API host. This example assumes a guided setup that already stores the OPEN request. TradingView substitutes {{timenow}}; a direct sender must supply the canonical UTC timestamp itself.

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.

Body

application/json

Exactly one non-null command or alert object. The restricted body token authenticates either transport; both converge on the same canonical command admission.

token
string
required
write-only

Required. Dedicated restricted TradingView capability, not an ordinary API key. Keep private.

command
object
required

Conditional: provide exactly one command or alert. Advanced Pine envelope with explicit command and lifecycle identities.

alert
object

Conditional: provide exactly one alert or command. Ordinary alert format whose identity and lifecycle are derived by Liftx.

Response

Identical accepted event

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.

id
string<uuid>
required
client_command_id
string
required
action
string
required
state
enum<string>
required
Available options:
accepted,
dispatching,
handed_off,
execution_observed,
rejected,
expired,
operator_required,
partial
position_id
string<uuid> | null
required
error_code
string | null
required

Safe error reason, when available. A reason on operator_required does not prove absence of side effects or authorize replay; state remains authoritative for uncertainty.

created_at
integer<int64>
required
updated_at
integer<int64>
required
source
string

Source label on receipt reads, including group targets. API and TradingView derive from the integration kind; MCP uses the immutable OAuth-verified client name, such as ChatGPT or Claude. Initial command acknowledgments may omit this read metadata.

Maximum string length: 80
terminal_request_kind
enum<integer>
required if terminal_request_seq is set
Available options:
1,
2
terminal_request_seq
integer<int64>
required if terminal_request_kind is set
Required range: x >= 1
group_id
string<uuid>

Parent group on a child termination receipt.

group
object
required if targets is set

Counts sum to the immutable target_count. Zero targets records an observed empty selection, not market flatness.

targets
object[]

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.

Maximum array length: 64