{"id":19520602,"url":"https://github.com/forexrateapi/forexrateapi-python","last_synced_at":"2026-02-26T00:13:50.365Z","repository":{"id":144699157,"uuid":"591047801","full_name":"forexrateapi/forexrateapi-python","owner":"forexrateapi","description":"Foreign exchange rates library | Official Python API wrapper for ForexRateAPI","archived":false,"fork":false,"pushed_at":"2025-02-03T23:44:29.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T07:05:39.452Z","etag":null,"topics":["cryptocurrency","currency","foreignexchange","forex","forex-trading","price-tracker","trading"],"latest_commit_sha":null,"homepage":"https://forexrateapi.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forexrateapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-19T20:07:36.000Z","updated_at":"2025-02-21T22:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a1127b7-45dd-49e2-9b71-46b84d5b67fe","html_url":"https://github.com/forexrateapi/forexrateapi-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forexrateapi%2Fforexrateapi-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forexrateapi%2Fforexrateapi-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forexrateapi%2Fforexrateapi-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forexrateapi%2Fforexrateapi-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forexrateapi","download_url":"https://codeload.github.com/forexrateapi/forexrateapi-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250959375,"owners_count":21514246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptocurrency","currency","foreignexchange","forex","forex-trading","price-tracker","trading"],"created_at":"2024-11-11T00:26:47.942Z","updated_at":"2026-02-26T00:13:50.357Z","avatar_url":"https://github.com/forexrateapi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ForexRateAPI\n\nforexrateapi is the official Python API wrapper for ForexRateAPI.com. This allows you to quickly integrate our foreign exchange rate API and currency conversion API into your application. Check https://forexrateapi.com documentation for more information.\n\n## Installation\n\nInstall the latest release with:\n\n\n    pip install forexrateapi\n\n## Usage\n\n```python\nfrom forexrateapi.client import Client\n\napi_key = 'SET_YOUR_API_KEY_HERE'\nclient = Client(api_key)\n\n# Or use EU server:\n# client = Client(api_key, server='eu')\n```\n---\n## Server Regions\n\nForexRateAPI provides two regional endpoints. Choose the one closest to your servers for optimal performance.\n\n| Region | Base URL |\n|--------|----------|\n| United States (default) | `https://api.forexrateapi.com/v1` |\n| Europe | `https://api-eu.forexrateapi.com/v1` |\n\n```python\n# Default (US)\nclient = Client('SET_YOUR_API_KEY_HERE')\n\n# Europe\nclient = Client('SET_YOUR_API_KEY_HERE', server='eu')\n```\n\n---\n## Documentation\n\n#### fetchSymbols()\n```python\nclient.fetchSymbols()\n```\n\n[Link](https://forexrateapi.com/documentation#api_symbol)\n\n---\n#### setServer(server)\n\n- `server` \u003c[string]\u003e Pass `'eu'` to use the EU server (`api-eu.forexrateapi.com`), or `'us'` for the US server. Defaults to US if not specified.\n\n```python\nclient.setServer('eu')\n```\n\n---\n#### fetchLive(base, currencies, math)\n\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currencies` \u003c[List]\u003c[string]\u003e\u003e Optional. Pass in an list of currencies to return values for.\n- `math` \u003c[string]\u003e Optional. Pass in a math expression to apply to the rates.\n\n```python\nclient.fetchLive(base='USD', currencies=['AUD', 'CAD', 'GBP', 'JPY'])\n```\n\n[Link](https://forexrateapi.com/documentation#api_realtime)\n\n---\n#### fetchHistorical(date, base, currencies)\n\n- `date` \u003c[string]\u003e Required. Pass in a string with format `YYYY-MM-DD`\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currencies` \u003c[List]\u003c[string]\u003e\u003e Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.fetchHistorical(date='2024-02-05', base='USD', currencies=['AUD', 'CAD', 'GBP', 'JPY'])\n```\n\n[Link](https://forexrateapi.com/documentation#api_historical)\n\n---\n#### hourly(base, currency, start_date, end_date, math, date_type)\n\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currency` \u003c[string]\u003e Required. Specify currency you would like to get hourly rates for.\n- `start_date` \u003c[string]\u003e Required. Specify the start date using the format `YYYY-MM-DD`.\n- `end_date` \u003c[string]\u003e Required. Specify the end date using the format `YYYY-MM-DD`.\n- `math` \u003c[string]\u003e Optional. Pass in a math expression to apply to the rates.\n- `date_type` \u003c[string]\u003e Optional. Pass in a date type, overrides date parameters if passed in.\n\n```python\nclient.hourly(base='USD', currency='EUR', start_date='2024-02-05', end_date='2024-02-05')\n```\n\n[Link](https://forexrateapi.com/documentation#api_hourly)\n\n---\n#### ohlc(base, currency, date, date_type)\n\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currency` \u003c[string]\u003e Required. Specify currency you would like to get OHLC for.\n- `date` \u003c[string]\u003e Required. Specify date to use historical midpoint value for conversion with format `YYYY-MM-DD`. Otherwise, it will use live exchange rate date if value not passed in.\n- `date_type` \u003c[string]\u003e Optional. Pass in a date type.\n\n```python\nclient.ohlc(base='USD', currency='EUR', date='2024-02-05', date_type=None)\n```\n\n[Link](https://forexrateapi.com/documentation#api_ohlc)\n\n---\n#### convert(from_currency, to_currency, amount, date)\n\n- `from_currency` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `to_currency` \u003c[string]\u003e Required. Specify currency you would like to convert to.\n- `amount` \u003c[number]\u003e Required. The amount to convert.\n- `date` \u003c[string]\u003e Optional. Specify date to use historical midpoint value for conversion with format `YYYY-MM-DD`. Otherwise, it will use live exchange rate date if value not passed in.\n\n```python\nclient.convert(from_currency='USD', to_currency='EUR', amount=100, date='2024-02-05')\n```\n\n[Link](https://forexrateapi.com/documentation#api_convert)\n\n---\n#### timeframe(start_date, end_date, base, currencies)\n\n- `start_date` \u003c[string]\u003e Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.\n- `end_date` \u003c[string]\u003e Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currencies` \u003c[List]\u003c[string]\u003e\u003e Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.timeframe(start_date='2024-02-05', end_date='2024-02-06', base='USD', currencies=['AUD', 'CAD', 'GBP', 'JPY'])\n```\n\n[Link](https://forexrateapi.com/documentation#api_timeframe)\n\n---\n#### change(start_date, end_date, base, currencies, date_type)\n\n- `start_date` \u003c[string]\u003e Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.\n- `end_date` \u003c[string]\u003e Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.\n- `base` \u003c[string]\u003e Optional. Pass in a base currency, defaults to USD.\n- `currencies` \u003c[List]\u003c[string]\u003e\u003e Optional. Pass in an list of currencies to return values for.\n- `date_type` \u003c[string]\u003e Optional. Pass in a date type, overrides date parameters if passed in.\n\n```python\nclient.change(start_date='2024-02-05', end_date='2024-02-06', base='USD', currencies=['AUD', 'CAD', 'GBP', 'JPY'])\n```\n\n[Link](https://forexrateapi.com/documentation#api_change)\n\n---\n#### usage()\n\n```python\nclient.usage()\n```\n\n[Link](https://forexrateapi.com/documentation#api_usage)\n---\n**[Official documentation](https://forexrateapi.com/documentation)**\n\n\n---\n## FAQ\n\n- How do I get an API Key?\n\n    Free API Keys are available [here](https://forexrateapi.com).\n\n- I want more information\n\n    Checkout our FAQs [here](https://forexrateapi.com/faq).\n\n\n## Support\n\nFor support, get in touch using [this form](https://forexrateapi.com/contact).\n\n\n[List]: https://www.w3schools.com/python/python_datatypes.asp 'List'\n[number]: https://www.w3schools.com/python/python_datatypes.asp 'Number'\n[string]: https://www.w3schools.com/python/python_datatypes.asp 'String'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforexrateapi%2Fforexrateapi-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforexrateapi%2Fforexrateapi-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforexrateapi%2Fforexrateapi-python/lists"}