Skip to main content

Endpoint requirements

Before integrating your broker’s platform into TradingView, you should review the list of required and optional endpoints. This will allow you to understand which endpoints you need for the features you’d like to have.

tip

If you are not sure which endpoints you need in your particular case, contact the TradingView team.

Required endpoints

The endpoints listed below are required for trading integration.

EndpointDescription
/accountsGets a list of accounts (subaccounts) owned by a user.
/configGets localized configuration.
/instrumentsGets the list of the instruments that are available for trading with the specified account (subaccount).
/ordersGets, places, modifies, or deletes orders for the account (subaccount).
/ordersHistoryGets order history for an account (subaccount). All orders that come in response to /ordersHistory requests are displayed in the History tab.
/stateGets account (subaccount) information.
/quotesGets the current prices of an instrument and its data restrictions. Must be implemented to avoid possible delays in fetching data from the exchange, which may lead users’ orders to execute at unexpected prices.

If you plan to integrate data, you also need to implement the following endpoints.

EndpointDescription
/symbol_infoGets a list of all instruments and a set of rules for them.
/historyGets history data for instruments.
/streamingGets real-time prices for instruments.
/groupsGets a list of possible symbol groups. Used to differentiate instrument types, to restrict access to market data, or to hide symbols for some users.

Optional endpoints

The table below describes optional endpoints which can be required in several cases.

EndpointDescriptionWhen required
/authorizeAuthenticates users by their usernames and passwords.Required when you use Password Bearer authentication type.
/logoutExplicitly notifies the broker server that a user has finished working with the integration.Required when supportLogout: true is set in the /accounts endpoint.

Note that /logout is only needed for servers that do not automatically invalidate a token some time after it is no longer used in requests.
/positionsGets, modifies, or deletes positions for a broker account (subaccount).Required unless supportPositions: false is set in /accounts. Not used in Crypto Spot trading.

Note that you should implement either /positions or /balances or both endpoints in your integration.
/balancesGets crypto balances for an account (subaccount).Required for Crypto brokers.

Note that you should implement either /positions or /balances or both endpoints in your integration.
/executionsGets a list of executions (fills or trades) for an account (subaccount) and an instrument.Required when supportExecutions: true is set in /accounts. If /executions is not implemented, transactions will not be displayed on the Chart.
/previewOrderGets estimated cost, commission, and other order information without the order being placed or modified.Required when either supportPlaceOrderPreview or supportModifyOrderPreview is set to true in /accounts.
/depthGets current depth of market for the instrument.Required when supportLevel2Data: true is set in /accounts.
/getLeverageGets changes on every action users do in the order ticket.Required when supportLeverage: true is set in /accounts.
/previewLeverageDisplays preview information when users edit the leverage.Required when supportLeverage: true is set in /accounts.
/setLeverageSets the leverage when users confirm changing it.Required when supportLeverage: true is set in /accounts.
/mappingGets all broker symbols that match the TradingView ones.Required for symbol mapping when you use the TradingView market data that is available from a third-party source.
/permissionsGets a list of symbol groups allowed for a user.Required for restricting access to market data, hide symbols for some users, or prevent them from paying twice for a real-time data subscription.

Streaming trading endpoints

The table below shows corresponding regular and streaming REST endpoints.

RESTStreaming
/orders/stream/orders
/state/stream/state
/positions/stream/positions
/quotes/stream/quotes
/individualPosition/stream/individualPositions
/netPositionsstream/netPositions