Skip to content

Generate two csv files, the first contains all currencies, the second their current exchange rate. Note: functionality depends on a paid for API, for real-time exchange rate pairs.

Notifications You must be signed in to change notification settings

Nebuchadrezzar/currencies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

currencies

Usage: currencies.py [-h] [-o [OUTPUT]] [-v]

Create a csv of currencies from www.coinbase.com

To load these currencies into a sqlite database, use the following syntax:
.import "| tail - n + 2 currencies.csv" mytable

optional arguments:
-h, --help show this help message and exit
-o [OUTPUT], --output [OUTPUT] Path and Name of a file to direct output.
-v, --verbose Print to stdout.

rates

Useage: rates.py [-h] [-s] [-b [CURRENCY CODE]]

Create a csv of exchange rates for various currencies. Data drawn from www.fixer.io.

optional arguments:
-s suppress creating a csv, just print to stdout
-b supply a base currency code. Default is EUR.

Note: You'll need API key in a file called APIKey.ini co-located with the script. A free API key affords you only pulling EUR daily rates. A paid account will allow you pass in other Base currencies without error.

Their pipechain

for baseCurr in $(./currencies.py -v | cut -d ' ' -f1); do rates.py -b $baseCurr; done

Which creates two CSVs:
the first containing all 168 world currencies, the second ~30K rows of exchanges rates for all currency pairs.

About

Generate two csv files, the first contains all currencies, the second their current exchange rate. Note: functionality depends on a paid for API, for real-time exchange rate pairs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages