Skip to main content
These routes document the Liftx Settings application’s authenticated contract. They are not ordinary bot endpoints. An API key, TradingView capability or MCP access token cannot create keys, expand its permissions, change account security or authenticate these routes. Use Settings → Integrations for customer administration. The web application preserves its session and CSRF boundary. The reference shows Base path contracts; it does not instruct third-party clients to bypass the application session.

Operations

Fresh approval flow

  1. Allocate a canonical UUID operation_id for the exact draft.
  2. Start with purpose:"credential", "binding" or "mcp" and the matching complete request schema.
  3. Use an offered authentication method. The Apple flow must use the returned nonce and the subject already linked to this account.
  4. Verify exactly one of password or apple_token, plus mfa_code when required.
  5. Submit the exact approved request with the same operation ID before approval expiry; MCP uses its dedicated approval endpoint.
The approval binds the operation ID, session bearer, purpose and payload digest. It is consumed atomically. Five proof attempts share one five-minute budget. This is fresh approval within the same account, not account linking or a new login identity.

Credential request

This is a nonoperational shape example. When supplied, expiry must be in the future and within one year of the request; omission or null means no expiration for API/TradingView. Optional integration_id is for replacement within an existing exact namespace policy. The issuance response contains credential metadata and a one-time secret on new issuance. A committed duplicate cannot recover the secret. After a lost response, inspect metadata and revoke a key whose secret was not retained before explicitly creating another.

TradingView binding policy

In addition to restricted credential fields, a binding has mode, position_mode, allow_market_terminate, optional positive decimal-string max_quantity, fresh source UUID and guided position_request when applicable. One exact exchange link is required. Each alert selects one instrument within the optional allowlist. The returned immutable revision accompanies subsequent signals. single/multiple controls OPEN occupancy per instrument, while the signal’s exact-position/strategy/market target controls what termination selects. The explicit market grant is additional authority, including manual and other strategies’ positions in that exact market. It is not enabled by choosing multiple-position mode. Both credential and binding issuance wrap the proposed request with the required operation_id. Fresh-auth start also requires purpose; verify requires operation_id and proof, referring to that existing challenge. Inside proof, exactly one offered password or apple_token is required, with mfa_code conditionally required by the challenge. Do not include both authentication methods. Revoke requests require the exact id (credential) or integration_id (binding) specified by their endpoint. See the endpoint schemas for wire bounds and request wrappers. MCP approval is separate from ordinary key issuance. Never send kind:"mcp" to POST /integrations/credentials. Use the OAuth request supplied by the client and the authenticated Settings flow.
  1. Preview the authorization using authorization. The server validates the registered callback, exact resource, state and S256 PKCE challenge, then returns client_name, normalized authorization, all five supported allowed_scopes and resource. Preview creates no grant; Settings enables only read by default.
  2. Form MCPConsentRequest from that authorization, one to 32 owned active exchange_link_ids, and one to five supported scopes selected by the account owner. Optional expires_at is null/omitted for no expiration, or future UTC Unix seconds within 30 days. Optional instrument_ids selects up to 64 exact IDs; empty/omitted permits all instruments on the links.
  3. Continue submits the selected permissions without a separate consent flag. Start fresh authentication with purpose:"mcp" and the complete request, verify the offered proof and required MFA, then approve the connection with the same operation_id and unchanged request before the five-minute approval expires.
The authorization object’s scope is optional and defaults to read when omitted/empty. Duplicate/unknown requested scopes are rejected. The client owns its registered callback, opaque state and PKCE verifier; never construct or paste these sensitive callback values into chat. The allowed_scopes in preview are all supported choices, independently of the client’s initial scope. The account owner’s selection determines the grant under OAuth scope rules; the token response reports the actual granted scopes. Preview grants no access, and refresh cannot expand the selected permissions. Approval requires current Pro/trial entitlement and returns 201 with credential metadata and a sensitive redirect_url. The callback contains a two-minute, single-use code, original state and issuer; access/refresh tokens are obtained by the OAuth client separately. A committed retry returns 409 OAUTH_APPROVAL_CONSUMED and cannot recover the code. After an ambiguous response inspect connection metadata and explicitly restart OAuth instead of automatically replaying approval. The approval route shares the 12-requests/minute/IP credential-security limiter; preview retains bounded request/concurrency admission without consuming that quota. An MCP service refusal from preview/approve returns OAuth-shaped 503 data with error, error_description and iss; error is temporarily_unavailable. Reauthentication with purpose mcp uses the normal integration error MCP_NOT_ACTIVATED. Other validation/admission failures retain the documented integration error shape. See MCP setup and permissions.

Metadata, retention and revocation

Metadata kind is api, tradingview or mcp. MCP credentials come from the OAuth consent flow, not ordinary key issuance. Read the availability booleans when offering a connection. They do not grant permission or replace linked-account checks. Active metadata is listed first, followed by recent history, up to 100 rows. Inactive credentials become eligible for cleanup 30 days after their own expiry or revocation, provided retained command evidence no longer references them. Unrevoked keyless TradingView setups remain visible for disconnection. A credential’s expiry does not itself remove its setup or free the unrevoked-binding capacity. Export metadata you need beyond its retention window without exporting secrets. The Settings Events list retains the command receipt semantics described in commands and receipts. Confirmed revocation is 200 {"revoked":true}. If the result is REVOCATION_UNCERTAIN, refresh metadata before an explicit retry. New handoff authorization changes do not interrupt trading-owned protection or recovery. Settings groups credentials by integration_id and presents one Disconnect action per integration. It uses the namespace endpoint above for every kind and removes the item after a confirmed response. Individual Remove key controls appear under Keys only when multiple replacement keys exist; these use the exact credential endpoint and leave the other keys active. No additional delete request or automatic mutation retry is required.