load_trading_strategy_like_jsonl_data#

load_trading_strategy_like_jsonl_data(session, api_url, pair_ids, time_bucket, mappings, start_time=None, end_time=None, max_bytes=None, progress_bar_description=None)[source]#

Read data from JSONL endpoint.

See OpenAPI spec for details on the format.

Can be used to load

  • OHLCV candles

  • Liquidity data

Calling this function may consume up to few hundred megabytes of memory depending on the response size.

Display a progress bar using tqdm.

Parameters:
  • df – The master DataFrame we are going to fill up.

  • api_url (str) – Which Trading Strategy API we call

  • pair_ids (Set[int]) – Trading pairs we query data for

  • time_bucket (TimeBucket) – Candle time frame

  • mappings (Dict[str, str]) – Mapping between JSONL object keys and DataFrame columns

  • session (Session) –

  • start_time (Optional[datetime]) –

  • end_time (Optional[datetime]) –

  • max_bytes (Optional[int]) –

  • progress_bar_description (Optional[str]) –

Returns:

In-place modified DataFrame passed to this function

Return type:

DataFrame