Ticks History (ticks_history)

Get historic tick data for a given symbol.

ticks_history(ticks_history: str, end: str, adjust_start_time: Optional[int] = None, count: Optional[int] = None, granularity: Optional[int] = None, start: Optional[int] = None, style: Optional[str] = None, subscribe: Optional[Union[bool, int]] = None, passthrough: Optional[Any] = None, req_id: Optional[int] = None) → int
Parameters:
  • ticks_history (str) – Short symbol name (obtained from the active_symbols call).
  • end (str) – Epoch value representing the latest boundary of the returned ticks. If latest is specified, this will be the latest available timestamp.
  • adjust_start_time (Optional[int]) – [Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate.
  • count (Optional[int]) – [Optional] An upper limit on ticks to receive.
  • granularity (Optional[int]) – [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60).
  • start – [Optional] Epoch value representing the earliest boundary of the returned ticks.
  • For “style”: “ticks”: this will default to 1 day ago.
  • For “style”: “candles”: it will default to 1 day ago if count or granularity is undefined.
Parameters:
  • style (Optional[str]) – [Optional] The tick-output style.
  • subscribe (Optional[Union[bool, int]]) – [Optional] 1 - to send updates whenever a new tick is received.
  • passthrough (Optional[Any]) – [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.
  • req_id (Optional[int]) – [Optional] Used to map request to response.
Returns:

req_id

Return type:

int

Example

binary.api.ticks_history(
    'R_50'
    adjust_start_time=1
    count=10
    end='latest'
    start=1
    style='ticks'
)