Advanced

Asynchronous Requests

Pulling data for dozens of symbols? yahooquery can fire requests in parallel using requests-futures — one flag, no asyncio boilerplate.

Enable async mode

pythonasync_mode.py
from yahooquery import Ticker

symbols = ['fb', 'aapl', 'amzn', 'nflx', 'goog']
faang = Ticker(symbols, asynchronous=True)

faang.summary_detail  # requests run concurrently

When it helps

  • Large watchlists — 20+ symbols see the biggest wall-clock gains.
  • Multi-module pulls — requesting several modules at once parallelizes across endpoints.
  • Batch history — long date ranges across many symbols complete noticeably faster.

Controlling concurrency

Pass max_workers to tune how many requests run at once:

pythonworkers.py
faang = Ticker(symbols, asynchronous=True, max_workers=8)
Be a good citizen: higher concurrency hits Yahoo’s endpoints harder. Keep max_workers modest and add your own rate limiting for very large jobs.

Retries and backoff

yahooquery accepts retry and status_forcelist arguments so transient 429s and 5xx responses get retried automatically:

pythonretry.py
faang = Ticker(symbols, asynchronous=True,
               retry=5, status_forcelist=[429, 500, 502, 503, 504])
Related: combine async with Multiple Symbols for the fastest batch workflows.