Get historical prices for a stock. View daily, weekly or monthly format back to when the stock was issued.
Request
Authorization
Add parameter in header
x-rapidapi-key
Example:
x-rapidapi-key: ********************
Query Params
symbol
string
required
Stock symbol
Example:
GOOG
period1
number
required
Starting date in epoch datetime format. Usually not used together with range parameter.
Example:
1688712093
period2
number
required
Ending date in epoch datetime format. Usually not used together with range parameter.
Example:
1720334493
interval
string
optional
Data interval. Available options: 1d|1wk|1mo. Defaults to 1d.
Example:
id
region
string
optional
Get data based on region. Available region codes: FR|IN|HK|DE|CA|ES|IT|US|AU|GB|BR|NZ|SG|TW. Defaults to 'US'.
Example:
TW
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request GET 'https://live-stock-market.p.rapidapi.com/v1/stock/historical-data?symbol=GOOG&period1=1688712093&period2=1720334493&interval=id®ion=TW' \
--header'x-rapidapi-key;'