Function: get_quotes(symbols, fields, subscribe=False)

Purpose: 

Fetch the latest snapshot quote data for one or more instruments from ICE Data Services. Designed for low-latency use cases like building dashboards, calculations, or on-demand market views.

Function Signature: 

get_quotes(symbols: List[str], fields: Union[str, List[str]], subscribe: bool = False) -> tuple
Parameters:
Name Type Required Default Description
symbols List[str] ✅ Yes List of instrument symbols. Max 500 per request.
fields str or List[str] ✅ Yes One or more quote fields to return. Examples: 'last', ['bid', 'ask', 'volume'].
subscribe bool ❌ No False If True, keeps a persistent subscription to ICE servers. Enables faster local responses for subsequent calls.

Default Behavior & Internals:

Field Aliases: Field names follow ICE Data Services naming. Common fields:

  • 'last' – Last traded price
  • 'bid' – Best bid price
  • 'ask' – Best ask price
  • 'volume' – Total traded volume
  • 'open', 'high', 'low' – OHLC prices

Subscription Default: If not set, subscribe=False by default.

With subscribe=True:

  • ICE establishes a session-backed subscription.
  • Future requests for the same symbol-field pair are instantaneous and local.
  • Recommended for high-frequency or repeated access patterns.

With subscribe=False: 

  • The connection is closed post-call.
  • Each future request triggers full server interaction (It’s a bit slower).

Field Input Flexibility:

  • Accepts both str (single field) and List[str].

Notes:

  • Requests beyond 500 symbols will be rejected.
  • Request rate limit: 10 requests/sec
  • Ensure instrument symbols match ICE's format (e.g., 'BRN 1!-ICE')
  • Field names are case-insensitive but best practice is lowercase ('last', 'volume', etc).