---
title: "Handle TradingView webhook"
method: POST
path: "/rest/api/v1/webhooks/tradingview/accounts/{accountId}"
tags: ["TradingView Webhook API"]
---

# Handle TradingView webhook

`POST /rest/api/v1/webhooks/tradingview/accounts/{accountId}`

Receives webhook alerts from TradingView and queues them for asynchronous processing. Returns 202 Accepted with a requestId that can be used to check status.

## Path parameters

- `accountId` string, uuid, required

## Request body

- string

## Response `200`

OK

- TradingViewWebhookResponseDTO — Response from TradingView webhook endpoint
  - `attemptCount` integer — Number of processing attempts (for queued requests)
  - `cached` boolean — Whether this is a cached response from idempotency
  - `closedPositions` ClosedPositionInfo[] — List of closed positions (for close operations)
    - `error` string — Error message if close failed
    - `positionId` string — Broker position ID
    - `success` boolean — Whether the close was successful
    - `symbol` string — Symbol
  - `code` string — Error code for failed requests
  - `data` object — Additional data returned with the response
  - `hint` string — Hint for resolving errors
  - `matchCount` integer — Number of positions matched (for close/modify operations)
  - `message` string — Human-readable message describing the result
  - `originalRequestId` string — Original request ID if this is a cached response
  - `requestId` string — Unique request ID for tracking and debugging
  - `status` string — Processing status (for queued requests)
  - `success` boolean — Whether the request was successful
  - `timestamp` string, date-time — Response timestamp

---

[API](https://skmtc.net/metacopier/apis/metacopier-api.md) · [All operations](https://skmtc.net/metacopier/apis/metacopier-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metacopier/metacopier-api/revisions/ff1699330afa/schema)
