TradingView · Schema
StreamPositionsMessage
CompanyConsumerChartsCharting LibraryFinancial DataMarket DataWidgetsTradingFintechEmbeddable Components
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/tradingview/json-schema/tradingview-stream-positions-message-schema.json",
"title": "StreamPositionsMessage",
"x-generated": "2026-11-05",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/tradingview-broker-rest-api-openapi.yml#/components/schemas/StreamPositionsMessage",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/$defs/Position"
},
{
"$ref": "#/$defs/StreamClosedPosition"
}
]
},
"$defs": {
"CustomFieldsValueItem": {
"title": "CustomFieldsValueItem",
"type": "object",
"properties": {
"id": {
"description": "Column identifier as defined in [/config](#operation/getConfiguration) response.",
"type": "string"
},
"value": {
"description": "Localized column value",
"type": "string"
}
},
"required": [
"id",
"value"
],
"additionalProperties": false
},
"Position": {
"title": "Position",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier.",
"type": "string"
},
"instrument": {
"description": "Instrument name that is used on a broker's side.",
"type": "string"
},
"qty": {
"description": "Quantity.",
"type": "number"
},
"side": {
"description": "Side.",
"type": "string",
"enum": [
"buy",
"sell"
]
},
"avgPrice": {
"description": "Average price of position trades.",
"type": "number"
},
"unrealizedPl": {
"description": "Unrealized (open) profit/loss.",
"type": "number"
},
"message": {
"$ref": "#/$defs/PositionInformationalMessage"
},
"lastModified": {
"description": "Indicates the time when the position was last modified, Unix timestamp (UTC).",
"type": "number"
},
"customFields": {
"type": "array",
"description": "Localized position custom fields values data.\nCustom fields are configured in the [/config](#operation/getConfiguration) endpoint response.\n",
"items": {
"$ref": "#/$defs/CustomFieldsValueItem"
},
"minItems": 1
}
},
"required": [
"id",
"instrument",
"qty",
"side",
"avgPrice"
],
"additionalProperties": false
},
"PositionInformationalMessage": {
"title": "PositionInformationalMessage",
"description": "Informational message description, that will be displayed for the position in the Account manager. The message will be marked\nwith a color, corresponding to a message type.\n",
"type": "object",
"properties": {
"text": {
"description": "Message text",
"type": "string"
},
"type": {
"description": "Message type",
"type": "string",
"enum": [
"information",
"warning",
"error"
]
}
},
"required": [
"text",
"type"
],
"additionalProperties": false
},
"StreamClosedPosition": {
"title": "StreamClosedPosition",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier.",
"type": "string"
},
"qty": {
"description": "Quantity. Should be equal to `0`.",
"type": "number"
}
},
"required": [
"id",
"qty"
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/tradingview-stream-positions-message"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.