Bitfinex returns negative balance
See original GitHub issueBiftinex returns negative balance.
- OS: Linux protagonist 4.14.5-1-ARCH #1 SMP PREEMPT Sun Dec 10 14:50:30 UTC 2017 x86_64 GNU/Linux
- Programming Language: python
- CCXT version: 1.10.593
- Exchange: Bitfinex
- Method: fetch_balance
Reproduction requires private API keys.
From info field:
{'type': 'exchange', 'currency': 'eos', 'amount': '-0.00000032', 'available': '0.0'}
which goes to
{'free': 0.0, 'used': -3.2e-07, 'total': -3.2e-07}
after ccxt mangling.
This is definitely a bug on Bitfinex side…I’m not sure what to think of it.
I’d suggest max(0, amount)
though am not sure if this the right call (since this error shall fall silently). Comments?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
What is a settlement on Bitfinex
If you have a negative amount in your wallet, Bitfinex will take a currency with a positive balance and exchange it with a...
Read more >Bitfinex Withdrawal not possible due to Negative Balance
Hot to get rid of this situation when you want to withdraw your money from Bitfinex. In the video I'm showing you what...
Read more >Bitfinex - Negative balance | Waltio Help Center
On Bitfinex, it is possible that your balance becomes "fictionally" negative. If this happens to you, Bitfinex will then create a Settlement type...
Read more >Negative Balance with Open Margin Positions : Support Desk
Negative amounts are correct, if you have open margin positions. Lets imagine you have $100 USD. And you buy 0.3 btc for 300USD...
Read more >Bitfinex on Twitter: "The platform is returning to normal ...
The platform is returning to normal operations. We will keep monitoring the situation closely. ... pls next time let me realise there is...
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 Free
Top 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
Some time ago I’ve got a similar issue. I saw a negative amount via their UI but haven’t come up with an idea to check what would ccxt return.
I’m not sure we need to
max(0, amount)
though. The balance is negative. We need to reflect the reality to users even if we don’t like it.I would agree with @mkutny here, it’s obviously coming from their API, and we would not want to change values implicitly. I would suggest to account for that in logic, as we most likely cannot workaround this in the lib, better leave it for the user to decide. Closing this for now, until we have some followup on this. Feel free to reopen it if needed, or just continue posting here, we will be happy to answer.