load_candles_jsonl#

API documentation for tradingstrategy.transport.jsonl.load_candles_jsonl Python function.

load_candles_jsonl(session, server_url, pair_ids, time_bucket, start_time=None, end_time=None, max_bytes=None, progress_bar_description=None, sanity_check_count=75, attempts=5)[source]#

Load candles using JSON API and produce a DataFrame.

Serially load each pair data.

  • Load data from per-pair JSON endpoint

  • Each pair becomes pandas pd.Series

  • The final DataFrame is the merge of these series

See tradingstrategy.candle for candle format description.

Parameters:
Raises:

JSONLMaxResponseSizeExceeded – If the max_bytes limit is breached

Returns:

Dataframe with candle data for giving pairs.

Return type:

DataFrame