Get Transaction data from JustTrade (NeoBroker) Blockpit Export
This commit is contained in:
parent
9b6c5a1408
commit
7e49ae8927
15
dabo/functions/get_justtrade_csv_transactions.sh
Normal file
15
dabo/functions/get_justtrade_csv_transactions.sh
Normal file
@ -0,0 +1,15 @@
|
||||
function get_justtrade_csv_transactions {
|
||||
|
||||
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
|
||||
|
||||
# Check for JustTrade API Key - If there is data from JustTrade csv
|
||||
if [ -s justtrade-export.csv ]
|
||||
then
|
||||
cat justtrade-export.csv | sed 's/\"//g' | egrep '^[0-9]' | egrep ',otc,justtrade,.+Z,EUR,' | awk -F, '{print $4",sell,"$7","$8","$5","$6",JustTrade"}' >JUSTTRADE-sell.csv.tmp
|
||||
cat justtrade-export.csv | sed 's/\"//g' | egrep '^[0-9]' | egrep -v ',otc,justtrade,.+Z,EUR,' | awk -F, '{print $4",buy,"$5","$6","$7","$8",JustTrade"}' >JUSTTRADE-buy.csv.tmp
|
||||
cat JUSTTRADE-buy.csv.tmp JUSTTRADE-sell.csv.tmp | sort >TRANSACTIONS-JUSTTRADE.csv
|
||||
rm -f JUSTTRADE-buy.csv.tmp JUSTTRADE-sell.csv.tmp
|
||||
fi
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user