Skip to content
Tianyu edited this page Apr 23, 2020 · 3 revisions

Live Quotes

To get live quotes for a basket of securities, use this command. This allows streaming of up to 240 symbols. The Ally API documentation has a full description of available fields.

quote = a.get_quote(
    symbols="spy,ALLY",
    fields="ask,bid,vol"
)

Recent Intraday data

Ally also offers all intraday trading data for download, on a rolling 5 day window. Optionally specify beginning and end dates for more fine-grain control over the data returned.

Interval can be

  • 1min
  • 5min [default]
  • 15min
a.timesales (
    symbols='spy',
    interval='5min',
    rpp=10, # [default]
    index=1,
    startdate='2020-03-23',
    enddate='2020-03-27'
    starttime='09:30' # [default] return data starting at market open at 9:30 Eastern Timezone
)
Clone this wiki locally