question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bot keeps canceling order on Bitfinex

See original GitHub issue

It 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:closed
  • Created 6 years ago
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
nielashcommented, Sep 3, 2017

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.

1reaction
rnevetcommented, Aug 11, 2017

@utdrmac fenced so your eyes aren’t offended. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found