Canonical Schema — Plain Text for LLM Context
All 84 TradeCommand properties are published as a plain-text reference at /llms-full.txt (~25 KB) and as a JSON Schema Draft 2020-12 at /schemas/trade-command.schema.json (~30 KB). Both are kept in sync with the live trade-command schema on every release. Use them as ground truth in any LLM workflow.
This page exists for the awkward case where an LLM cannot fetch URLs — corporate gateways block external requests, sandboxed agents lack network access, or you want a single self-contained block to paste into a one-shot prompt. The canonical content lives at /llms-full.txt; the link below opens it raw, and you can copy the entire body into your conversation.
Why a separate plain-text artifact
The HTML Parameter Reference is the human-friendly view: sortable table, anchor links, hover-help. For LLMs, that's the wrong shape:
- HTML wastes tokens (tags, classes, table structure overhead).
- Anchor links don't help — the model is reading text, not navigating.
- Tooltips and collapsibles strip the LLM of context it needs.
llms-full.txt is the same data, optimized for context windows:
- One section per field. Name, type, required-flag, default, allowed values, description, example, gotcha, see-also.
- Categories (
core,sizing,stop-loss,take-profit,futures,dca,limit-mgmt,conditional,close-cancel,timing) match the dashboard UI. - Roughly 3-4× more token-efficient than the HTML version.
- Stable line structure — easy for an LLM to quote a specific field back at you.
The canonical file
Direct link: https://www.tv-hub.org/llms-full.txt
The file opens as text/plain in the browser. Select all, copy, paste into your LLM.
A trimmed example of the file's structure (first three required fields):
### exchange (string)
Required: yes
Description: Target exchange identifier. Determines which exchange adapter receives the trade.
Allowed values: binance, binance-futures, binance-futures-testnet, binance-futures-coin,
binance-futures-coin-testnet, bybit, bybit-testnet, bybit-spot, bybit-spot-testnet,
okx, kucoin, kucoin-spot, coinbase, coinbase-spot, bitmex, bitmex-testnet
Example: binance-futures
Gotcha: Lowercase only. Spot vs derivatives are distinct exchanges.
See also: pair, apiKey, token
### pair (string)
Required: yes
Description: Trading pair in exchange-native format.
Example: BTCUSDT
Gotcha: TVH does not normalise pair names across exchanges.
See also: exchange, instrumentType
### token (string)
Required: yes
Description: Your TVH User Token, a GUID that authenticates the webhook caller.
Example: YOUR_TOKEN
Gotcha: Never log or share. Rotate immediately if leaked.
See also: apiKey
The full file follows the same shape for all 84 fields, grouped into ten categories. Total length ≈ 700 lines, ≈ 25 KB, well within a single context turn for GPT-4o, Claude 3.7 Sonnet, Gemini 2.5, and DeepSeek V3.
Alternative formats
| Format | URL | Best for |
|---|---|---|
| Plain text (full) | /llms-full.txt | Pasting into a chat as ground truth |
| Curated index | /llms.txt | Site map for AI crawlers; ~6 KB |
| JSON Schema Draft 2020-12 | /schemas/trade-command.schema.json | Tool-use APIs (OpenAI, Anthropic, LangChain) |
| HTML reference | Parameter Reference | Humans browsing the docs |
All four are kept in sync with the live trade-command schema on every release. Drift between them is impossible by construction.
Use for tool-use APIs
The JSON Schema is designed to be dropped straight into function-calling or tool-use payloads.
OpenAI function calling
import json, requests
from openai import OpenAI
schema = requests.get("https://www.tv-hub.org/schemas/trade-command.schema.json").json()
client = OpenAI()
resp = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You generate TVH webhook payloads."},
{"role": "user", "content": "Long Binance Futures BTCUSDT, 5% balance, 2% SL, 4% TP."},
],
tools=[{
"type": "function",
"function": {
"name": "submit_trade_command",
"description": "Submit a TradingView Hub webhook payload.",
"parameters": schema,
},
}],
tool_choice={"type": "function", "function": {"name": "submit_trade_command"}},
)
payload = json.loads(resp.choices[0].message.tool_calls[0].function.arguments)
The model is now constrained to field names and types defined by the schema. additionalProperties: false rejects hallucinated keys.
Anthropic tool use
import anthropic, requests
schema = requests.get("https://www.tv-hub.org/schemas/trade-command.schema.json").json()
client = anthropic.Anthropic()
msg = client.messages.create(
model="claude-opus-4-5",
max_tokens=1024,
tools=[{
"name": "submit_trade_command",
"description": "Submit a TradingView Hub webhook payload.",
"input_schema": schema,
}],
messages=[{"role": "user", "content": "Long Binance Futures BTCUSDT, 5% balance, 2% SL, 4% TP."}],
)
Same idea — the schema validates the model's output before you forward it to https://alerts.tv-hub.org.
LangChain
from langchain_community.document_loaders import TextLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
loader = TextLoader.from_url("https://www.tv-hub.org/llms-full.txt")
docs = loader.load()
splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=200)
chunks = splitter.split_documents(docs)
# Pass chunks into your retrieval chain or vectorstore.
llms-full.txt is line-structured, so even naive chunking preserves field boundaries.
LangGraph / agent loops
The schema also doubles as a validator. Run every model output through jsonschema.validate(payload, schema) before submission — invalid payloads loop back to the model with the validation error as feedback.
Versioning and freshness
The build pipeline stamps the generation timestamp into both llms.txt and llms-full.txt. To bind to a specific TVH release, either:
- Pin the version via the Changelog and re-fetch on each release, or
- Mirror the file into your own repo at a known commit hash.
We don't currently host historical versions at /llms-full.txt?v=... — open an issue if you need that.
Related references
- Parameter Reference — Same 84 fields in sortable-table form.
- Trade Command Anatomy — How the receiver interprets a payload (auto-mapping, close detection).
- 15 Common TradeCommand Mistakes — Field-level gotchas with code.
- Common LLM Hallucinations — LLM-specific failure modes and rewrites.