Webhook API v2 | Valuera

Envelope, actions, and TradingView alert format for Valuera webhook ingest.

Webhook API v2

Webhook API v2.0 documentation — exported from https://docs.valuera.cloud/webhook

Endpoints

Envelope

{
  "id": "your-endpoint-key",
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "action": "OPEN"
}

Actions

OPEN

Opens one copy-trading position with symbol, side, entry, SL, and TP (one signal = one position; TP target from strategy).

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "action": "OPEN",
  "symbol": "XAUUSD",
  "side": "BUY",
  "entry": 2650.5,
  "sl": 2640,
  "tp": [
    2660,
    2670
  ]
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`symbol`yesMT5 symbol (e.g. XAUUSD).
`side`yesBUY or SELL.
`entry`yesEntry price (number, {min,max} range, or [lo,hi] array). entry_price alias rejected.
`sl`yesStop loss.
`tp`yesTake profit: number or array of numbers.
`market_price`noMarket price for entry zone resolution.
`order_type`nomarketlimitstop (default market).
`pip_size`noOverride pip size for the symbol.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

CLOSE_ALL

Closes all open positions on linked accounts. Does not accept symbol.

{
  "id": "your-endpoint-key",
  "request_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "action": "CLOSE_ALL"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

CLOSE_SYMBOL

Closes all open positions for a specific symbol.

{
  "id": "your-endpoint-key",
  "request_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "action": "CLOSE_SYMBOL",
  "symbol": "XAUUSD"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`symbol`yesSymbol to close.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

CLOSE_TICKET

Closes the position linked to an open_request_id (ticket correlated from a prior OPEN).

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "d4e5f6a7-b8c9-0123-def0-234567890123",
  "action": "CLOSE_TICKET",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`open_request_id`yesUUID of the original OPEN (returned or sent open_request_id).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

MOVE_SL_BE

Moves stop loss to break-even. With open_request_id/tickets only those positions; otherwise by symbol (or whole account if symbol is omitted).

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "e5f6a7b8-c9d0-1234-ef01-345678901234",
  "action": "MOVE_SL_BE",
  "symbol": "XAUUSD"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`symbol`noIf omitted (and no ticket), applies to all eligible positions.
`open_request_id`nov2 — UUID of the original OPEN: the action only touches the linked position. If omitted, v1 semantics apply (all positions on the symbol).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

MOVE_SL_PRICE

Moves stop loss to a fixed price. With open_request_id/tickets only those positions.

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
  "action": "MOVE_SL_PRICE",
  "sl_price": 2655,
  "symbol": "XAUUSD"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`sl_price`yesNew stop loss price.
`symbol`noFilter by symbol (optional).
`open_request_id`nov2 — UUID of the original OPEN: the action only touches the linked position. If omitted, v1 semantics apply (all positions on the symbol).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

MODIFY

Updates stop loss and take profit of the linked position in a single request.

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "d0e1f2a3-b4c5-6789-3456-890123456789",
  "action": "MODIFY",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "sl": 2645,
  "tp": [2665]
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`open_request_id`nov2 — UUID of the original OPEN: the action only touches the linked position. If omitted, v1 semantics apply (all positions on the symbol).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.
`sl`noNew stop loss. Omitted leaves the current stop unchanged.
`tp`noNew take profit: number or array. Omitted leaves the current target unchanged.
`symbol`noFilters by symbol when no ticket identity is provided.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

PARTIALS

Closes a percentage of open positions. With open_request_id/tickets only those positions.

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "a7b8c9d0-e1f2-3456-0123-567890123456",
  "action": "PARTIALS",
  "close_percent": 50,
  "symbol": "XAUUSD"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`close_percent`yesPercentage to close (e.g. 50 = 50%).
`symbol`yesMT5 symbol to partially close.
`open_request_id`nov2 — UUID of the original OPEN: the action only touches the linked position. If omitted, v1 semantics apply (all positions on the symbol).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

CANCEL_PENDING

Cancels pending orders. With open_request_id/tickets only that one; otherwise by symbol (or all if symbol is omitted).

What's new in v2

{
  "id": "your-endpoint-key",
  "request_id": "b8c9d0e1-f2a3-4567-1234-678901234567",
  "action": "CANCEL_PENDING",
  "symbol": "XAUUSD"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).
`symbol`noIf omitted (and no ticket), cancels pending on all symbols.
`open_request_id`nov2 — UUID of the original OPEN: the action only touches the linked position. If omitted, v1 semantics apply (all positions on the symbol).
`tickets`nov2 — explicit MT5 ticket array. Takes precedence over open_request_id.

Success response (200)

{
  "ok": true,
  "dispatched": 2,
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "open_request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Main errors

v1 behaviour (still supported)

PING

Checks connectivity and auth without executing trades.

{
  "id": "your-endpoint-key",
  "request_id": "c9d0e1f2-a3b4-5678-2345-789012345678",
  "action": "PING"
}
FieldRequiredDescription
`id`yesEndpoint key; must match {id} in the URL.
`request_id`yesStable UUID v4 assigned by VALUERA per endpoint (shown in panel). Must match your endpoint's id.
`action`yesOperation to execute (see sidebar).

Success response (200)

{
  "ok": true,
  "dispatched": 0,
  "request_id": "c9d0e1f2-a3b4-5678-2345-789012345678",
  "ping": true
}

Main errors

TradingView

Code samples

python

import requests

URL = "https://valuera.cloud/webhook/YOUR_KEY"
TOKEN = "YOUR_TOKEN"

payload = {
    "id": "YOUR_KEY",
    "request_id": "YOUR_STABLE_REQUEST_ID",
    "action": "OPEN",
    "symbol": "XAUUSD",
    "side": "BUY",
    "entry": 2650.50,
    "sl": 2640.00,
    "tp": [2660.00, 2670.00],
}

r = requests.post(URL, json=payload, headers={"X-Webhook-Token": TOKEN}, timeout=15)
print(r.status_code, r.json())

javascript

const res = await fetch("https://valuera.cloud/webhook/YOUR_KEY", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Webhook-Token": "YOUR_TOKEN",
  },
  body: JSON.stringify({
    id: "YOUR_KEY",
    request_id: "YOUR_STABLE_REQUEST_ID",
    action: "OPEN",
    symbol: "XAUUSD",
    side: "BUY",
    entry: 2650.5,
    sl: 2640,
    tp: [2660, 2670],
  }),
});
console.log(res.status, await res.json());

curl

curl -sS -X POST "https://valuera.cloud/webhook/YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Token: YOUR_TOKEN" \
  -d '{"id":"YOUR_KEY","request_id":"550e8400-e29b-41d4-a716-446655440000","action":"PING"}'

go

package main

import (
  "bytes"
  "encoding/json"
  "net/http"
)

func main() {
  body, _ := json.Marshal(map[string]any{
    "id": "YOUR_KEY", "request_id": "YOUR_STABLE_REQUEST_ID",
    "action": "PING",
  })
  req, _ := http.NewRequest("POST", "https://valuera.cloud/webhook/YOUR_KEY", bytes.NewReader(body))
  req.Header.Set("Content-Type", "application/json")
  req.Header.Set("X-Webhook-Token", "YOUR_TOKEN")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
}

php

<?php
$payload = [
  'id' => 'YOUR_KEY',
  'request_id' => 'YOUR_STABLE_REQUEST_ID',
  'action' => 'PING',
];
$ch = curl_init('https://valuera.cloud/webhook/YOUR_KEY');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'X-Webhook-Token: YOUR_TOKEN'],
  CURLOPT_POSTFIELDS => json_encode($payload),
  CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);

Webhook API v2.0 · 2026-07-30

Loading