load_candles_jsonl#

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)[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:
  • progress_bar_description (Optional[str]) – Progress bar label

  • sanity_check_count

    Don’t accidentally try to load too many pairs.

    Never exceed this value.

  • session (Session) –

  • server_url (str) –

  • pair_ids (Set[id]) –

  • time_bucket (TimeBucket) –

  • start_time (Optional[datetime]) –

  • end_time (Optional[datetime]) –

  • max_bytes (Optional[int]) –

Raises:

JSONLMaxResponseSizeExceeded – If the max_bytes limit is breached

Returns:

Dataframe with candle data for giving pairs.

Return type:

DataFrame