Skip to content

Latest commit

 

History

History
244 lines (143 loc) · 6.3 KB

ForexApi.md

File metadata and controls

244 lines (143 loc) · 6.3 KB

intrinio_sdk.ForexApi

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

get_forex_currencies

View Intrinio API Documentation

ApiResponseForexCurrencies get_forex_currencies()

Forex Currencies

Returns a list of forex currencies for which prices are available.

Example

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) 

Parameters

This endpoint does not need any parameter.

Return type

ApiResponseForexCurrencies

get_forex_pairs

View Intrinio API Documentation

ApiResponseForexPairs get_forex_pairs()

Forex Currency 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).

Example

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) 

Parameters

This endpoint does not need any parameter.

Return type

ApiResponseForexPairs

get_forex_prices

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)

Forex Currency Prices

Provides a list of forex price quotes for a given forex currency pair and timeframe.

Example

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) 

Parameters

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]  

Return type

ApiResponseForexPrices