Skip to main content

Configuring

Configuration levels

There are three configuration levels.

  • Broker level applies to all sub-accounts defined for the user. It's performed via the /config request.
  • Sub-account level extends to UI elements for a specific sub-account. It's performed via the /accounts request.
  • Instrument level uses to configure UI elements for a specific instrument. It's performed via the /instruments request.

All these requests are executed once when logging into the broker integration. The configuration priority of the same UI elements is as follows: broker, account, instrument. Each subsequent configuration overrides the previous one.

Pulling intervals

Pulling intervals are designed to determine the frequency of requests to a specific endpoint. They are configurable at the broker level only. Consider the infrastructure when configuring the intervals to avoid dropping connections on the broker's side.

Warning

If the pulling interval is set above the maximum value, it will be reduced to the required maximum value on the TradingView side. Make sure your server can support the maximum pulling interval values without any issues. Otherwise, the integration stability will be affected.

Matching fields to requests:

  • quotes — the /quotes and /depth requests (max 1000ms)
  • accountManager — the /state request (max 1500ms)
  • orders — the /orders request (max 1000ms)
  • positions — the /positions request (max 1500ms)
  • balances — the /balances request (max 1500ms)
note

To comply with the cross-origin security model, all modern browsers send Pre-flight requests to get permission to send the main request. You can make use of Access-Control-Max-Age header in Pre-flight response, in order for the browser to make the permission last longer than the default 5 seconds. This may help to reduce the number of requests and shorten the delay in updating data between the user and your server.