Skip to main content

What

  • Convert a http://www.floatrates.com/json-feeds.html daily rates json src file to valid Open Bank Project payload.

  • HTTP PUT them to an Open Bank Project endpoint to populate the database via the fx api call

  • Uses python3

Setup

  • You must have a valid Direct Login token
  • You must have the CanCreateFxRateAtAnyBank permission
export ENDPOINT=<api.example.com>
export AUTH_TOKEN=<direct-login-token>

Options

  • WRITE_TO_FILE - Write output to disk
  • POST_TO_OBP - Post to Open Bank Project api endpoint

Note: By default this wont post to the enpoint. This is to allow testing to post to an endpoint, set the environment up:

export WRITE_TO_FILE=False
export POST_TO_OBP=True

The above allows you to test before blasting an endpint with invalid data.

Run

pip install -r requirements.txt
python3 convert.py

Metadata

Release files for fx2obp 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fx2obp 0.2
File Size Uploaded
fx2obp-0.2.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fx2obp 0.2
File Interpreter ABI Platform
fx2obp-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / fx2obp-0.2.tar.gz

Download URL fx2obp-0.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
822d9406e250a228b0f7479e2e296738f745a6478ff955c4783e63b96831e7eb
BLAKE2b-256 checksum
How to use checksums
52d9b7fb309507678300cc81ab219550ee3426bea3eb3898191516b1ba1193fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

Release files / fx2obp-0.2-py3-none-any.whl

Download URL fx2obp-0.2-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
316396f243c5a95a36717e77e0dc221d7ea9b0899f533770e574e3304321a6db
BLAKE2b-256 checksum
How to use checksums
14a42390f14f3d78405d6c9966ee25b931b40c6f5d43c854544301254394b775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page