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.

Bitfinex margin info errors on both bitfinex.py and bitfinex2.py

See original GitHub issue
  • OS: *
  • Programming Language version: ptyhon
  • CCXT version: 593 and newer
  • Exchange: bitfinex + bitfinex2
  • Method: bitfinex.private_post_margin_infos & bitfinex2.privatePostAuthRInfoMarginKey

Hi,

So I’m running into a weird issue. I setup bitfinex with bitfinex = ccxt.bitfinex() then I setup the keys.

I try to get the margin balance, so I use this code:

account_balance = bitfinex.private_post_margin_infos()[0]['margin_balance']

For my old bitfinex account this just works, but if I create a new one (or other users try my code and create a new account) they run into this error:

bitfinex https://api.bitfinex.com/v1/margin_infos POST 500 Server Error: Internal Server Error for url: https://api.bitfinex.com/v1/margin_infos 

I really can’t get my head around why it works with my key that’s a year old or so and not with new keys. Bitfinex themselves are looking into this issue too, do you guys think it’s a bug on their side?

The second issue I’m having is with the bitfinex2 code. Because bitfinex.py is not working I’m trying this as the exception:

bitfinex2.privatePostAuthRInfoMarginKey()

But the response I’m getting is this:

bitfinex2 https://api.bitfinex.com/v2/auth/r/info/margin/{key} POST 500 Server Error: Internal Server Error for url: https://api.bitfinex.com/v2/auth/r/info/margin/%7Bkey%7D ["error",10020,"key: invalid"]

Is this an error on my side or is this an error on the bitfinex side?

Thanks for the help and the advice!! 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
jdiekscommented, Jun 6, 2019

Bitfinex actually already answered:

Yes we have actually identified the issue. It does seem to be related to the age of the account (I.E newer accounts are experiencing this issue).  A patch will be rolled out tomorrow. Thanks for the detailed issue analysis.

1reaction
jdiekscommented, Jun 8, 2019

I just tested it… seems to work now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bitfinex Interface loading issues — Frequently Asked ...
My chart and balances are not loading. What should I do? Suppose you see an error message such as “Websocket connection is offline”....
Read more >
Exchanges — ccxt 2.4.71 documentation
Besides making basic market and limit orders, some exchanges offer margin trading (leverage), various derivatives (like futures contracts and options) and also ...
Read more >
Download the PHP package ccxt/ccxt without Composer
A JavaScript / Python / PHP cryptocurrency trading library with support for ... More information about ccxt/ccxt ... bitfinex2, Bitfinex · API Version...
Read more >
ccxt Documentation - Read the Docs
A JavaScript / Python / PHP library for cryptocurrency trading and ... JavaScript version of ccxt works both in Node and web browsers....
Read more >
Utility Sub-commands - Freqtrade
Using these commands will try to load all python files from a directory. ... bitbay False missing: fetchOrder bitcoincom True bitfinex True bitfinex2...
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