make historic transactions from onetrading available to the bot
This commit is contained in:
parent
c54e8f184a
commit
03ebb54e38
18
dabo/functions/get_onetrading_csv_transactions.sh
Normal file
18
dabo/functions/get_onetrading_csv_transactions.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
function get_onetrading_csv_transactions {
|
||||||
|
|
||||||
|
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
|
||||||
|
|
||||||
|
if [ -s onetrading-export.csv ]
|
||||||
|
then
|
||||||
|
|
||||||
|
cat onetrading-export.csv | sed 's/\"//g' | grep ',SELL,' | awk -F, '{print $12","tolower($3)","$6","$5","$8","$9",OneTrading"}' | sort >ONETRADING-sell.csv.tmp
|
||||||
|
|
||||||
|
cat onetrading-export.csv | sed 's/\"//g' | grep ',BUY,' | awk -F, '{print $12","tolower($3)","$11","$9","$8","$5",OneTrading"}' | sort >ONETRADING-buy.csv.tmp
|
||||||
|
|
||||||
|
cat ONETRADING-buy.csv.tmp ONETRADING-sell.csv.tmp | sort >TRANSACTIONS-ONETRADING.csv
|
||||||
|
rm -f ONETRADING-buy.csv.tmp ONETRADING-sell.csv.tmp
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user