fetch [financial]
data =: fetch (conn, symbol)
data =: fetch (..., fields)
data =: fetch (..., date)
data =: fetch (..., fromdate, todate)
data =: fetch (..., period)
— [data, fields] =: fetch (...)

Download stock data from a connection.

fields are the data fields to download and must come from the set

  • "Symbol"
  • "Last"
  • "Date"
  • "Time"
  • "Change"
  • "Open"
  • "High",
  • "Low"
  • "Volume"

As an output, fields may be different than your request. This is because there is mapping of field names from the data source to the output, and what is returned is the source mapping to allow validation.

date is the date string or datenum for the requested data. If you enter today's date, you will get yesterday's data. fromdate and todate allow you to specify a date range for the data.

period (default: "d") allows you to select the period for the data which can be any of the below as long as they are supported by the associated backend.

  • 'd': daily
  • 'w': weekly
  • 'm': monthly (Yahoo only)
  • 'v': dividends (Yahoo only)

See also: yahoo, google