fxdatapi
Python library for integrating with Currency API functionality.
Requirements
Python 2.7 and later.
Setup
You can install this package by using the pip tool and installing:
$ pip install fxdatapi
Or:
$ easy_install fxdatapi
Usage Example
from fxdatapi.auth import Auth
from fxdatapi.currencies import Currencies
from fxdatapi.historical import Historical
from fxdatapi.convert import Convert
from fxdatapi.convert_all import ConvertAll
from fxdatapi.daily_average import DailyAverage
from fxdatapi.weekly_average import WeeklyAverage
from fxdatapi.monthly_average import MonthlyAverage
from fxdatapi.margins_spreads import MarginsSpreads
from fxdatapi.performances import Performances
from fxdatapi.signals import Signals
# Authenticate and log in
auth = Auth()
username = "your_username"
password = "your_password"
result = auth.login(username, password)
print("Login successful:", result)
currencies = Currencies(auth.headers)
result = currencies.get_currencies(username, "19", "04", "2023")
print("Currencies:", result)
uuid = "currency_uuid"
result = currencies.get_currency(uuid, username, "19", "04", "2023")
print("Currency:", result)
historical = Historical(auth.headers)
result = historical.get_historical(username, "2023_04_19", "19", "04", "2023")
print("Historical data:", result)
uuid = "historical_uuid"
result = historical.get_historical_currency(uuid, username, "2023_04_19", "19", "04", "2023")
print("Historical currency:", result)
convert = Convert(auth.headers)
result = convert.convert_currency(username, "2023_04_19", "GBP", "EUR", "500")
print("Converted amount:", result)
convert_all = ConvertAll(auth.headers)
result = convert_all.convert_all_currencies(username, "GBP", 120, "2023_04_19")
print("Converted amounts:", result)
daily_average = DailyAverage(auth.headers)
result = daily_average.get_daily_average("2023_04_19")
print("Daily average:", result)
weekly_average = WeeklyAverage(auth.headers)
result = weekly_average.get_weekly_average("2023_04_03", "2023_04_07")
print("Weekly average:", result)
monthly_average = MonthlyAverage(auth.headers)
result = monthly_average.get_monthly_average("2023", "04")
print("Monthly average:", result)
margins_spreads = MarginsSpreads(auth.headers)
result = margins_spreads.get_margins_spreads(username, "19", "04", "2023")
print("Margins and spreads:", result)
uuid = "margins_spreads_uuid"
result = margins_spreads.get_margins_spreads_currency(uuid, username, "19", "04", "2023")
print("Margins and spreads for currency:", result)
performances = Performances(auth.headers)
result = performances.get_performances(username)
print("Performances:", result)
uuid = "performance_uuid"
result = performances.get_performance(uuid, username)
print("Performance:", result)
signals = Signals(auth.headers)
result = signals.get_signals(username)
print("Signals:", result)
uuid = "signal_uuid"
result = signals.get_signal(uuid, username)
print("Signal:", result)
Setting up Currency API Account
Subscribe here for a user account.
Using the Currency API
You can read the API documentation to understand what’s possible with the Currency API. If you need further assistance, don’t hesitate to contact us.
License
This project is licensed under the BSD 3-Clause License.
Copyright
Copyright © 2020 - 2023 Hori Systems Limited. All Rights Reserved.
Metadata
Release files for fxdatapi 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fxdatapi-1.1.4.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fxdatapi-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / fxdatapi-1.1.4.tar.gz
| Download URL | fxdatapi-1.1.4.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50487b5fb57741fcabe05572ac6e1493e7d0a62a4ea6960a6a9e4833695cc92a
|
|
BLAKE2b-256 checksum How to use checksums |
9b5307e79d4e1f7745fbfcd01994e4629945a8cb8ebf526c3c31e1141950566c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / fxdatapi-1.1.4-py3-none-any.whl
| Download URL | fxdatapi-1.1.4-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c033b24e38c1fd66640971f1af736177401f6a482133a785ef492fc14b354962
|
|
BLAKE2b-256 checksum How to use checksums |
67f02612d1387db7c03e81489cd7a48c8591365c8bf9d73fdebab008126917d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for fxdatapi 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.