All URIs are relative to https://api-v2.intrinio.com
Method | HTTP request | Description |
---|---|---|
get_forex_currencies | GET /forex/currencies | Forex Currencies |
get_forex_pairs | GET /forex/pairs | Forex Currency Pairs |
get_forex_prices | GET /forex/prices/{pair}/{timeframe} | Forex Currency Prices |
View Intrinio API Documentation
ApiResponseForexCurrencies get_forex_currencies()
Returns a list of forex currencies for which prices are available.
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)
response = intrinio.ForexApi().get_forex_currencies()
print(response)
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict)
This endpoint does not need any parameter.
View Intrinio API Documentation
ApiResponseForexPairs get_forex_pairs()
Returns a list of currency pairs used to request foreign exchange (forex) market price data. The currency that is used as the reference is called quote currency and the currency that is quoted in relation is called the base currency. For example, in the pair code “EURGBP” with a price of 0.88, one Euro (base currency) can be exchanged for 0.88 British Pounds (quote currency).
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)
response = intrinio.ForexApi().get_forex_pairs()
print(response)
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict)
This endpoint does not need any parameter.
View Intrinio API Documentation
ApiResponseForexPrices get_forex_prices(pair, timeframe, timezone=timezone, start_date=start_date, start_time=start_time, end_date=end_date, end_time=end_time, page_size=page_size, next_page=next_page)
Provides a list of forex price quotes for a given forex currency pair and timeframe.
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)
pair = 'EURUSD'
timeframe = 'D1'
timezone = 'UTC'
start_date = '2018-01-01'
start_time = ''
end_date = '2019-01-01'
end_time = ''
page_size = 100
next_page = ''
response = intrinio.ForexApi().get_forex_prices(pair, timeframe, timezone=timezone, start_date=start_date, start_time=start_time, end_date=end_date, end_time=end_time, page_size=page_size, next_page=next_page)
print(response)
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict)
Name | Type | Description | Notes |
---|---|---|---|
pair | str | The Forex Currency Pair code | |
timeframe | str | The time interval for the quotes | |
timezone | str | Returns trading times in this timezone | [optional] [default to UTC] |
start_date | date | Return Forex Prices on or after this date | [optional] |
start_time | str | Return Forex Prices at or after this time (24-hour in 'hh:mm' format, UTC timezone) | [optional] |
end_date | date | Return Forex Prices on or before this date | [optional] |
end_time | str | Return Forex Prices at or before this time (24-hour in 'hh:mm' format, UTC timezone) | [optional] |
page_size | int | The number of results to return | [optional] [default to 100] |
next_page | str | Gets the next page of data from a previous API call | [optional] |