You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

currencyapicom

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currencyapicom

CurrencyAPI Python Client

0.1.1
100

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

100

License

Maintainers
1

CurrencyAPI Python Client

CurrencyAPI Python Client is the official Python Wrapper around the CurrencyAPI API.

Installation

Install from pip:

pip install currencyapicom

Install from code:

pip install git+https://github.com/everapihq/currencyapi-python.git

Usage

All curencyapi API requests are made using the Client class. This class must be initialized with your API access key string. Where is my API access key?

In your Python application, import currencyapicom and pass authentication information to initialize it:

import currencyapicom
client = currencyapicom.Client('API_KEY')

Retrieve Status


print(client.status())

Retrieve Currencies

https://currencyapi.com/docs/currencies


result = client.currencies(currencies=['EUR', 'CAD'])
print(result)

Retrieve Latest Exchange Rates

https://currencyapi.com/docs/latest


result = client.latest()
print(result)

Retrieve Historical Exchange Rates

https://currencyapi.com/docs/historical


result = client.historical('2022-02-02')
print(result)

Retrieve Historical Range Exchange Rates

https://currencyapi.com/docs/range


result = client.range('2022-02-02', '2022-02-04')
print(result)

Retrieve Converted Exchange Rates

https://currencyapi.com/docs/convert


result = client.convert(1234)
print(result)

Contact us

Any feedback? Please feel free to contact our team.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts