Skip to content

Subscribe Quotes

writes · idempotent

Subscribe to real-time bid/ask prices for one or more symbols.

Requires the QUOTE session to be enabled and connected. Subscribes to live market data from the broker for each symbol.

After subscribing, get_quote will return live bid/ask prices instead of stale fill data.

PARAMETERS:

  • symbols: Array of symbol names (e.g., [“EURUSD”, “XAUUSD”])
    • Must be in SYMBOL_MAP configuration
    • Already-subscribed symbols are silently skipped

USAGE:

  • Call once per session to start receiving prices
  • Subscriptions persist until server shutdown or QUOTE session disconnects
  • Auto-resubscribes on reconnection
  • If AUTO_SUBSCRIBE_QUOTES=true, all SYMBOL_MAP symbols are subscribed at startup

Returns list of newly subscribed symbols and total active subscriptions.

ParameterTypeRequiredDescription
symbolsstringYesArray of symbol names to subscribe to (e.g., [‘EURUSD’, ‘XAUUSD’])