fix ccxt.base.errors.BadRequest: binance fetchConvertTradeHistory() the max interval between startTime and endTime is 30 days.
This commit is contained in:
parent
f0c565aaf7
commit
8871c66902
@ -188,6 +188,7 @@ function get_transactions {
|
|||||||
## Get converts on supported exchanges since 2022
|
## Get converts on supported exchanges since 2022
|
||||||
if [[ $f_exchange = binance ]]
|
if [[ $f_exchange = binance ]]
|
||||||
then
|
then
|
||||||
|
local m y
|
||||||
printf -v f_convert_end_year '%(%Y)T'
|
printf -v f_convert_end_year '%(%Y)T'
|
||||||
for ((y=2022;y<=$f_convert_end_year;y++))
|
for ((y=2022;y<=$f_convert_end_year;y++))
|
||||||
do
|
do
|
||||||
@ -196,9 +197,10 @@ function get_transactions {
|
|||||||
for ((m=1;m<=$f_convert_end_month;m++))
|
for ((m=1;m<=$f_convert_end_month;m++))
|
||||||
do
|
do
|
||||||
f_start_date="$(date -d "$y-$m-1" +%s)001"
|
f_start_date="$(date -d "$y-$m-1" +%s)001"
|
||||||
em=$((m+1))
|
#em=$((m+1))
|
||||||
[ $em = 13 ] && em=1
|
#[ $em = 13 ] && em=1
|
||||||
f_end_date="$(date -d "$y-$em-1" +%s)000"
|
#f_aend_date="$(date -d "$y-$em-1" +%s)000"
|
||||||
|
f_end_date="$(date -d "$y-$m-1 +30days" +%s)000"
|
||||||
f_convert_file="TRANSACTIONS-$f_exchange/CONVERT-$y-$m"
|
f_convert_file="TRANSACTIONS-$f_exchange/CONVERT-$y-$m"
|
||||||
|
|
||||||
[ -s "${f_convert_file}.csv" ] && continue
|
[ -s "${f_convert_file}.csv" ] && continue
|
||||||
|
Loading…
Reference in New Issue
Block a user