{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tradingview/json-schema/tradingview-config-response-schema.json",
  "title": "ConfigResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tradingview-broker-configuration-api-openapi.yml#/components/schemas/ConfigResponse",
  "type": "object",
  "properties": {
    "s": {
      "$ref": "#/$defs/OkStatus"
    },
    "d": {
      "$ref": "#/$defs/Config"
    }
  },
  "required": [
    "s",
    "d"
  ],
  "additionalProperties": false,
  "$defs": {
    "AccountManager": {
      "title": "AccountManager",
      "type": "array",
      "description": "Localized Account manager's tables configuration. Account manager is a\npage in the bottom widget. This page can have multiple tables. Data of\nthe tables is filled using the [/state](/rest-api-spec/#operation/getState) endpoint.\n",
      "items": {
        "$ref": "#/$defs/AccountManagerTable"
      },
      "minItems": 1
    },
    "AccountManagerColumn": {
      "title": "AccountManagerColumn",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "description": "Localized title of a column.",
          "type": "string"
        },
        "tooltip": {
          "description": "Tooltip that is shown on mouse hover.",
          "type": "string"
        },
        "alignment": {
          "description": "The cell value alignment. Default value is `left`",
          "type": "string",
          "enum": [
            "left",
            "right"
          ],
          "default": "left"
        },
        "isCapitalize": {
          "description": "The first character of each word in the sentence will be capitalized. The rest of the symbols appearance does not change.",
          "type": "boolean",
          "default": true
        }
      },
      "required": [
        "id",
        "title"
      ],
      "additionalProperties": false
    },
    "AccountManagerTable": {
      "title": "AccountManagerTable",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "description": "Localized title of a table.",
          "type": "string"
        },
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountManagerColumn"
          },
          "minItems": 1
        }
      },
      "required": [
        "id",
        "columns"
      ],
      "additionalProperties": false
    },
    "AccountSummaryRow": {
      "title": "AccountSummaryRow",
      "type": "array",
      "description": "Localized Account Summary Row configuration.\nAccount Summary Row is a panel at the top of the bottom widget with the key account indicators. The `supportCustomAccountSummaryRow` flag should be enabled in the account config, see the [/accounts](#operation/getAccounts) endpoint. Data of the Account Summary Row is filled using the [/state](/rest-api-spec/#operation/getState) endpoint.",
      "items": {
        "$ref": "#/$defs/AccountSummaryRowItem"
      },
      "minItems": 1
    },
    "AccountSummaryRowItem": {
      "title": "AccountSummaryRowItem",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique Account Summary Row item identifier."
        },
        "title": {
          "type": "string",
          "description": "Localized Account Summary Row item title."
        }
      },
      "required": [
        "id",
        "title"
      ],
      "additionalProperties": false
    },
    "Config": {
      "title": "Config",
      "type": "object",
      "properties": {
        "accountSummaryRow": {
          "$ref": "#/$defs/AccountSummaryRow"
        },
        "accountManager": {
          "$ref": "#/$defs/AccountManager"
        },
        "durations": {
          "$ref": "#/$defs/Durations"
        },
        "orderCustomFields": {
          "$ref": "#/$defs/OrderCustomFields"
        },
        "orderHistoryCustomFields": {
          "$ref": "#/$defs/OrderHistoryCustomFields"
        },
        "positionCustomFields": {
          "$ref": "#/$defs/PositionCustomFields"
        },
        "netPositionCustomFields": {
          "$ref": "#/$defs/PositionCustomFields"
        },
        "individualPositionCustomFields": {
          "$ref": "#/$defs/PositionCustomFields"
        },
        "pullingInterval": {
          "$ref": "#/$defs/PullingInterval"
        },
        "orderInfoConfig": {
          "$ref": "#/$defs/OrderInfoConfig"
        }
      },
      "additionalProperties": false
    },
    "Duration": {
      "title": "Duration",
      "description": "Single duration option.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Duration identifier.",
          "type": "string"
        },
        "title": {
          "description": "Localized title.",
          "type": "string"
        },
        "hasDatePicker": {
          "description": "Display date control in the Order Ticket for this duration type.",
          "type": "boolean",
          "default": false
        },
        "hasTimePicker": {
          "description": "Display time control in the Order Ticket for this duration type.",
          "type": "boolean",
          "default": false
        },
        "default": {
          "description": "Default duration. Only one duration object in the durations array can have a `true` value for this field. The default duration will be used when the user places orders in the silent mode and it will be the selected one when the user opens the Order dialog for the first time.",
          "type": "boolean",
          "default": false
        },
        "supportedOrderTypes": {
          "$ref": "#/$defs/SupportedOrderTypes"
        }
      },
      "required": [
        "id",
        "title"
      ],
      "additionalProperties": false
    },
    "Durations": {
      "title": "Durations",
      "type": "array",
      "description": "Localized array of durations displayed in the Order Ticket.",
      "items": {
        "$ref": "#/$defs/Duration"
      },
      "minItems": 1
    },
    "OkStatus": {
      "title": "OkStatus",
      "type": "string",
      "description": "Status will always be `ok`.",
      "enum": [
        "ok"
      ]
    },
    "OrderCustomFields": {
      "title": "OrderCustomFields",
      "type": "array",
      "description": "Additional order columns to be displayed in the orders table of the Account manager.\nThe orders table has a default set of columns that can be extended using this configuration.\nThe `supportOrderCustomFields` flag should be enabled in the [account configuration](https://www.tradingview.com/rest-api-spec/#operation/getAccounts).\nData of the additional fields is filled from the\n[/orders](https://www.tradingview.com/rest-api-spec/#operation/getOrders) `customFields` value.\n",
      "items": {
        "$ref": "#/$defs/AccountManagerColumn"
      },
      "minItems": 1
    },
    "OrderHistoryCustomFields": {
      "title": "OrderHistoryCustomFields",
      "type": "array",
      "description": "Additional history columns to be displayed in the history table of the Account manager.\nThe history table has a default set of columns that can be extended using this configuration.\nThe `supportOrderHistoryCustomFields` and `supportOrdersHistory` flags should be enabled in the [account configuration](https://www.tradingview.com/rest-api-spec/#operation/getAccounts).\nData of the additional fields is filled from the\n[/ordersHistory](/rest-api-spec/#operation/getOrdersHistory) `customFields` value.\n",
      "items": {
        "$ref": "#/$defs/AccountManagerColumn"
      },
      "minItems": 1
    },
    "OrderInfoConfig": {
      "title": "OrderInfoConfig",
      "description": "Config for the Order Info section of the Order Ticket.",
      "type": "object",
      "properties": {
        "dependencies": {
          "description": "List of fields that trigger an update to the data in the Order Info section whenever its values change.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "qty",
              "side",
              "price",
              "duration",
              "brackets",
              "slType",
              "customFields"
            ]
          }
        },
        "dependantCustomFieldIds": {
          "description": "List of custom field IDs that can trigger Order Info updates when `customFields` dependency is enabled.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        }
      },
      "required": [
        "dependencies"
      ]
    },
    "PositionCustomFields": {
      "title": "PositionCustomFields",
      "type": "array",
      "description": "Additional position columns to be displayed in the positions table of the Account manager.\nThe positions table has a default set of columns that can be extended using this configuration.\nThe `supportPositionCustomFields` flag should be enabled in the [account configuration](https://www.tradingview.com/rest-api-spec/#operation/getAccounts).\nData of the additional fields is filled from the\n[/positions](https://www.tradingview.com/rest-api-spec/#operation/getPositions) `customFields` value.\n",
      "items": {
        "$ref": "#/$defs/AccountManagerColumn"
      },
      "minItems": 1
    },
    "PullingInterval": {
      "title": "PullingInterval",
      "type": "object",
      "description": "Time intervals in milliseconds to pull data from the server.\nPlease note: if the pulling interval is set above the maximum value then the maximum value will be used explicitly.\n",
      "properties": {
        "quotes": {
          "description": "Time interval in milliseconds to request quote and level 2 depth updates.",
          "type": "number",
          "default": 500,
          "maximum": 1000
        },
        "orders": {
          "description": "Time interval in milliseconds to request orders.",
          "type": "number",
          "default": 500,
          "maximum": 1000
        },
        "positions": {
          "description": "Time interval in milliseconds to request positions.",
          "type": "number",
          "default": 1000,
          "maximum": 1500
        },
        "accountManager": {
          "description": "Time interval in milliseconds to update Account manager tables.",
          "type": "number",
          "default": 500,
          "maximum": 1500
        },
        "balances": {
          "description": "Time interval in milliseconds to request balances.",
          "type": "number",
          "default": 1000,
          "maximum": 1500
        }
      },
      "additionalProperties": false
    },
    "SupportedOrderTypes": {
      "description": "An optional array of order types to which this UI element applies.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "market",
          "stop",
          "limit",
          "stoplimit"
        ]
      },
      "minItems": 1,
      "default": [
        "limit",
        "stop",
        "stoplimit"
      ]
    }
  }
}