LuPoYi / ftx-keep-lending

FTX - lending all available balance(USD/USDT) per hour using crontab
19 stars 9 forks source link

Error: "Size too large" #3

Open HostFat opened 3 years ago

HostFat commented 3 years ago

"2021-03-05T05:30:00.428Z GME getBalance 2.92478723 => 2.92478723 freeBalance 0.00530656 ERROR! 400 { error: 'Size too large', success: false } Size too large"

Current GME Previous Funding Rate: 199,00% / year Estimated Next Funding Rate: 199,00% / year

Is this a bug?

LuPoYi commented 3 years ago

I believe the bug is on FTX. It happens to me sometimes, even when I use their Lending page to lend.

So..for now, I don't know how to fix this :)

HostFat commented 3 years ago

Maybe it is related to this? (another bot)

"Fix price precision to 8 because API issue on rounding price value." https://github.com/caebwallace/caeb-autolend/commit/8d8cebba3391d04f01d6f0e859a744849177743c

LuPoYi commented 3 years ago

I did do the "Fix price precision to 8" in my code, but seems the error still happen.

Is that happen to you very often?

It is not happening to me for few weeks, so it is hard to test. But I'll keep an eye on it.

LuPoYi commented 3 years ago

Just an idea - Once we get 'Size too large', we set precision to 6 and try again. Maybe this solution is not bad.

HostFat commented 3 years ago

Are trying to lend crypto with funding rate over 100%? (I'm not sure if it is related ...)

Anyway, I get always this error. Where I can set the precision to 6 on the code?

LuPoYi commented 3 years ago

Just added custom precision feature.

update your config.json like { "coin": "GME", "keepBalance": 0, "minimunHourlyRate": 0.000001, "decimals": 6 } and give it a try :)

HostFat commented 3 years ago

Same error, I'm currently using the develop branch.

sieburger commented 3 years ago

I had the same problem because there were open positions, so I changed "keepBalance" to a hold value for my positions and it worked.