Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.23 KB

README.md

File metadata and controls

39 lines (23 loc) · 1.23 KB

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.