hitbtc-com / hitbtc-api

HitBTC API
GNU Lesser General Public License v3.0
324 stars 153 forks source link

Problem with example_rest.py file #149

Closed suroegin closed 6 years ago

suroegin commented 6 years ago

Hello!

I copied this file, put my API key and secret, and after commands below I got error code 1003. Please correct this example file. I don't know what I must do for normal work.

class Client(object):
    ...

public_key = "..."
secret = "..."

client = Client("https://api.hitbtc.com", public_key, secret)
client.get_account_balance()

Error 1003:

{"error": {"code": 1003,
  "description": "",
  "message": "Action is forbidden for this API key"}}

With regards, Ivan

fujiapple852 commented 6 years ago

Sounds like you forgot to tick “Order book, History, Trading balance” when creating your API key?

suroegin commented 6 years ago

@fujiapple852 I won't use them all, I want just to get balance info.

fujiapple852 commented 6 years ago

@suroegin it appears to be all-or-nothing, if you want to be able to retrieve balance data you need this option when creating the api key.