energypriceapi


Nameenergypriceapi JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/energypriceapi/energypriceapi-python
SummaryOfficial Python wrapper for energypriceapi.com
upload_time2023-01-19 21:46:13
maintainer
docs_urlNone
authorEnergypriceAPI
requires_python
license
keywords currency oilpriceapi oil price foreign exchange rate currency conversion exchangerate rates
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EnergypriceAPI

energypriceapi is the official Python API wrapper for EnergypriceAPI.com. This allows you to quickly integrate our foreign exchange rate API and currency conversion API into your application. Check https://energypriceapi.com documentation for more information.

## Installation

Install the latest release with:


    pip install energypriceapi

## Usage

```python
from energypriceapi.client import Client

api_key = 'SET_YOUR_API_KEY_HERE'
client = Client(api_key)
```
---
## Documentation

#### fetchSymbols()
```python
client.fetchSymbols()
```

[Link](https://energypriceapi.com/documentation#api_symbol)

---
#### fetchLive(base, currencies)

- `base` <[string]> Optional. Pass in a base currency, defaults to USD.
- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.

```python
client.fetchLive(base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])
```

[Link](https://energypriceapi.com/documentation#api_realtime)

---
#### fetchHistorical(date, base, currencies)

- `date` <[string]> Required. Pass in a string with format `YYYY-MM-DD`
- `base` <[string]> Optional. Pass in a base currency, defaults to USD.
- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.

```python
client.fetchHistorical(date='2021-04-05', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])
```

[Link](https://energypriceapi.com/documentation#api_historical)

---
#### convert(from_currency, to_currency, amount, date)

- `from_currency` <[string]> Optional. Pass in a base currency, defaults to USD.
- `to_currency` <[string]> Required. Specify currency you would like to convert to.
- `amount` <[number]> Required. The amount to convert.
- `date` <[string]> 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.

```python
client.convert(from_currency='USD', to_currency='EUR', amount=100, date='2021-04-05')
```

[Link](https://energypriceapi.com/documentation#api_convert)

---
#### timeframe(start_date, end_date, base, currencies)

- `start_date` <[string]> Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.
- `end_date` <[string]> Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.
- `base` <[string]> Optional. Pass in a base currency, defaults to USD.
- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.

```python
client.timeframe(start_date='2021-04-05', end_date='2021-04-06', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])
```

[Link](https://energypriceapi.com/documentation#api_timeframe)

---
#### change(start_date, end_date, base, currencies)

- `start_date` <[string]> Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.
- `end_date` <[string]> Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.
- `base` <[string]> Optional. Pass in a base currency, defaults to USD.
- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.

```python
client.change(start_date='2021-04-05', end_date='2021-04-06', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])
```

[Link](https://energypriceapi.com/documentation#api_change)

---
**[Official documentation](https://energypriceapi.com/documentation)**


---
## FAQ

- How do I get an API Key?

    Free API Keys are available [here](https://energypriceapi.com).

- I want more information

    Checkout our FAQs [here](https://energypriceapi.com/faq).


## Support

For support, get in touch using [this form](https://energypriceapi.com/contact).


[List]: https://www.w3schools.com/python/python_datatypes.asp 'List'
[number]: https://www.w3schools.com/python/python_datatypes.asp 'Number'
[string]: https://www.w3schools.com/python/python_datatypes.asp 'String'

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/energypriceapi/energypriceapi-python",
    "name": "energypriceapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "currency,oilpriceapi,oil price,foreign exchange rate,currency conversion,exchangerate,rates",
    "author": "EnergypriceAPI",
    "author_email": "contact@energypriceapi.com",
    "download_url": "https://files.pythonhosted.org/packages/96/1c/b03b063c4b742fe2f43b9de1f8c770a1d7ed95b7889398dff32c5ff45d84/energypriceapi-1.0.3.tar.gz",
    "platform": null,
    "description": "# EnergypriceAPI\n\nenergypriceapi is the official Python API wrapper for EnergypriceAPI.com. This allows you to quickly integrate our foreign exchange rate API and currency conversion API into your application. Check https://energypriceapi.com documentation for more information.\n\n## Installation\n\nInstall the latest release with:\n\n\n    pip install energypriceapi\n\n## Usage\n\n```python\nfrom energypriceapi.client import Client\n\napi_key = 'SET_YOUR_API_KEY_HERE'\nclient = Client(api_key)\n```\n---\n## Documentation\n\n#### fetchSymbols()\n```python\nclient.fetchSymbols()\n```\n\n[Link](https://energypriceapi.com/documentation#api_symbol)\n\n---\n#### fetchLive(base, currencies)\n\n- `base` <[string]> Optional. Pass in a base currency, defaults to USD.\n- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.fetchLive(base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])\n```\n\n[Link](https://energypriceapi.com/documentation#api_realtime)\n\n---\n#### fetchHistorical(date, base, currencies)\n\n- `date` <[string]> Required. Pass in a string with format `YYYY-MM-DD`\n- `base` <[string]> Optional. Pass in a base currency, defaults to USD.\n- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.fetchHistorical(date='2021-04-05', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])\n```\n\n[Link](https://energypriceapi.com/documentation#api_historical)\n\n---\n#### convert(from_currency, to_currency, amount, date)\n\n- `from_currency` <[string]> Optional. Pass in a base currency, defaults to USD.\n- `to_currency` <[string]> Required. Specify currency you would like to convert to.\n- `amount` <[number]> Required. The amount to convert.\n- `date` <[string]> 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='2021-04-05')\n```\n\n[Link](https://energypriceapi.com/documentation#api_convert)\n\n---\n#### timeframe(start_date, end_date, base, currencies)\n\n- `start_date` <[string]> Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.\n- `end_date` <[string]> Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.\n- `base` <[string]> Optional. Pass in a base currency, defaults to USD.\n- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.timeframe(start_date='2021-04-05', end_date='2021-04-06', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])\n```\n\n[Link](https://energypriceapi.com/documentation#api_timeframe)\n\n---\n#### change(start_date, end_date, base, currencies)\n\n- `start_date` <[string]> Required. Specify the start date of your timeframe using the format `YYYY-MM-DD`.\n- `end_date` <[string]> Required. Specify the end date of your timeframe using the format `YYYY-MM-DD`.\n- `base` <[string]> Optional. Pass in a base currency, defaults to USD.\n- `currencies` <[List]<[string]>> Optional. Pass in an list of currencies to return values for.\n\n```python\nclient.change(start_date='2021-04-05', end_date='2021-04-06', base='USD', currencies=['BRENT','GASOLINE','NATURALGAS','WTI'])\n```\n\n[Link](https://energypriceapi.com/documentation#api_change)\n\n---\n**[Official documentation](https://energypriceapi.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://energypriceapi.com).\n\n- I want more information\n\n    Checkout our FAQs [here](https://energypriceapi.com/faq).\n\n\n## Support\n\nFor support, get in touch using [this form](https://energypriceapi.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",
    "bugtrack_url": null,
    "license": "",
    "summary": "Official Python wrapper for energypriceapi.com",
    "version": "1.0.3",
    "split_keywords": [
        "currency",
        "oilpriceapi",
        "oil price",
        "foreign exchange rate",
        "currency conversion",
        "exchangerate",
        "rates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ec1bcea3f408127d4d64bf02f923f425db4ec211f4bfb3f829992ad9a36395a",
                "md5": "ac27ab47249bca92604bab4ad7f09e60",
                "sha256": "032adbee6fe14e04a52263693598dbda480beff05268ad1fbf3faef44b5d9d05"
            },
            "downloads": -1,
            "filename": "energypriceapi-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac27ab47249bca92604bab4ad7f09e60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3830,
            "upload_time": "2023-01-19T21:46:11",
            "upload_time_iso_8601": "2023-01-19T21:46:11.266295Z",
            "url": "https://files.pythonhosted.org/packages/0e/c1/bcea3f408127d4d64bf02f923f425db4ec211f4bfb3f829992ad9a36395a/energypriceapi-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "961cb03b063c4b742fe2f43b9de1f8c770a1d7ed95b7889398dff32c5ff45d84",
                "md5": "d2d3b8d6a109657ca54d7174a8d05646",
                "sha256": "361e67a30dfd0a5de64f2c9d87b2e5ddc5e06844f07d45742acf89eadfd8a566"
            },
            "downloads": -1,
            "filename": "energypriceapi-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d2d3b8d6a109657ca54d7174a8d05646",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3419,
            "upload_time": "2023-01-19T21:46:13",
            "upload_time_iso_8601": "2023-01-19T21:46:13.655150Z",
            "url": "https://files.pythonhosted.org/packages/96/1c/b03b063c4b742fe2f43b9de1f8c770a1d7ed95b7889398dff32c5ff45d84/energypriceapi-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-19 21:46:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "energypriceapi",
    "github_project": "energypriceapi-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "energypriceapi"
}
        
Elapsed time: 0.21556s