ohenrik / bitfinex

A Python client for the Bitfinex API
MIT License
58 stars 32 forks source link

authenticated api error #49

Closed newforte closed 3 years ago

newforte commented 3 years ago

I am trying to make a basic authenticated api and getting error.

from bitfinex import ClientV2 as Client2

BTFXCLIENT = Client2('api656j56ejejKey', 'apiSec56je56jjj56j5ret') BTFXCLIENT.active_positions()

dantimofte commented 3 years ago

Can you give me more details? What are you Operating system, python version , error you receive ?

newforte commented 3 years ago

OS: win10 Python 3.8.5 Run the code in Anaconda Navigator Error refer the picture image

dantimofte commented 3 years ago

You have used the same api keys with a different library or a different nonce multiplier. You could try to instantiate with a higher nonce multiplier :
BTFXCLIENT = Client2('api656j56ejejKey', 'apiSec56je56jjj56j5ret', nonce_multiplier=2.0) BTFXCLIENT.active_positions()

I recommend that you create a new api key for this and use different api-keys for different things : one for mobile app, one for each trading system

newforte commented 3 years ago

Thanks a lot!