Skip to main content

search

Currency Search.

Search available currency pairs. Currency pairs are the national currencies from two countries coupled for trading on the foreign exchange (FX) marketplace. Both currencies will have exchange rates on which the trade will have its position basis. All trading within the forex market, whether selling, buying, or trading, will take place through currency pairs. (ref: Investopedia) Major currency pairs include pairs such as EUR/USD, USD/JPY, GBP/USD, etc.

Example​

from openbb import obb
obb.currency.search()
# Search for 'EURUSD' currency pair using 'polygon' as provider.
obb.currency.search(provider='polygon', symbol='EURUSD')
# Search for terms using 'polygon' as provider.
obb.currency.search(provider='polygon', search='Euro zone')
# Search for actively traded currency pairs on the queried date using 'polygon' as provider.
obb.currency.search(provider='polygon', date='2024-01-02', active=True)

Parameters​

NameTypeDescriptionDefaultOptional
providerLiteral['fmp', 'intrinio', 'polygon']The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default.fmpTrue

Returns​

OBBject
results : List[CurrencyPairs]
Serializable results.

provider : Optional[Literal['fmp', 'intrinio', 'polygon']]
Provider name.

warnings : Optional[List[Warning_]]
List of warnings.

chart : Optional[Chart]
Chart object.

extra : Dict[str, Any]
Extra info.

Data​

NameTypeDescription
namestrName of the currency pair.