Bot keeps canceling order on Bitfinex
See original GitHub issueIt might just be some setting I am overlooking, but the bot places the order and 2 min later cancels the order and continues to loop. Eventually, Bitfinex gets unhappy and gives this error -
2017-08-09 17:56:46 Error API Error 400: <html>
<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>
<hr><center>cloudflare-nginx</center>
</body>
</html>
Requesting https://api.bitfinex.com/v1/offer/new
Caught API Error 400: <html>
<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>
<hr><center>cloudflare-nginx</center>
</body>
</html>
Requesting https://api.bitfinex.com/v1/offer/new reading from exchange API, ignoring.
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (6 by maintainers)
Top Results From Across the Web
What is an Immediate or Cancel order on Bitfinex
An Immediate or Cancel order requires all or a part of the order to be executed immediately, and any unfilled parts of the...
Read more >Raspberry Bitfinex: Bot cannot cancel orders from Orderbook?
It seems that the bot cannot cancel orders from the order book. It tries to place f.e. new buy orders, but cannot delete...
Read more >The crypto bot's most common errors - TradeSanta
Find the trading bot's most common errors on the various exchanges, ... Error canceling Extra order Can't cancel order (Reject Exception) - Failed...
Read more >Cancel Orders - Automated Trading at Alertatron
Cancels all outstanding open orders (eg, from earlier trades), then closes the position if there was one. Finally, it opens a long using...
Read more >Order Refresh Tolerance - Hummingbot Docs
This means that Hummingbot will cancel active orders (excluding hanging orders) every order_refresh_time seconds. However, if the price has not changed since ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey guys–total n00b programmer here, but I think I may have figured this out, or at least found a clue.
In modules/Bitfinex.py on line 224, I tried changing
"rate": str(lending_rate * 36500),
to:
"rate": str(round(float(lending_rate),10) * 36500),
And that seems to have solved it. I think it’s because (as the error message seems to indicate) the payload for ‘offer/new’ was too long, and rounding the rate to 10 decimal places prevents that.
I’m not sure if this is the root of the problem or if I simply treated a symptom, but I wanted to mention it here in case it’s helpful.
@utdrmac fenced so your eyes aren’t offended. 😃