{"action":"closed","issue":{"url":"https://api.github.com/repos/sammchardy/python-binance/issues/61","repository_url":"https://api.github.com/repos/sammchardy/python-binance","labels_url":"https://api.github.com/repos/sammchardy/python-binance/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/sammchardy/python-binance/issues/61/comments","events_url":"https://api.github.com/repos/sammchardy/python-binance/issues/61/events","html_url":"https://github.com/sammchardy/python-binance/issues/61","id":284743356,"number":61,"title":"binance_python_exceptions.BinanceAPIException: APIError(code=-1100): Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\\.[0-9]{1,20})?$'.","user":{"login":"MennovDijk","id":31887596,"avatar_url":"https://avatars2.githubusercontent.com/u/31887596?v=4","gravatar_id":"","url":"https://api.github.com/users/MennovDijk","html_url":"https://github.com/MennovDijk","followers_url":"https://api.github.com/users/MennovDijk/followers","following_url":"https://api.github.com/users/MennovDijk/following{/other_user}","gists_url":"https://api.github.com/users/MennovDijk/gists{/gist_id}","starred_url":"https://api.github.com/users/MennovDijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MennovDijk/subscriptions","organizations_url":"https://api.github.com/users/MennovDijk/orgs","repos_url":"https://api.github.com/users/MennovDijk/repos","events_url":"https://api.github.com/users/MennovDijk/events{/privacy}","received_events_url":"https://api.github.com/users/MennovDijk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-27T15:26:20Z","updated_at":"2017-12-27T21:42:15Z","closed_at":"2017-12-27T21:42:15Z","author_association":"NONE","body":"Hey there.\r\n\r\nWhen trying to sent a order_limit_buy with following parameters:\r\n\r\n`my_binance.order_limit_buy(symbol = \"TRXBTC\", quantity = 500, price = 0.00000243) `\r\n\r\nIt keeps returning this error:\r\n\r\n```\r\nFile \"C:/Users/ikdem/PycharmProjects/Test/Bot.py\", line 135, in buy_algo\r\n    response = self.limit_buy_binance(market=\"TRXBTC\", quantity=500, rate = 0.00000243)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 921, in order_limit_buy\r\n    return self.order_limit(timeInForce=timeInForce, **params)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 885, in order_limit\r\n    return self.create_order(**params)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 848, in create_order\r\n    return self._post('order', True, data=params)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 179, in _post\r\n    return self._request_api('post', path, signed, version, **kwargs)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 150, in _request_api\r\n    return self._request(method, uri, signed, **kwargs)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 145, in _request\r\n    return self._handle_response(response)\r\n  File \"C:\\Users\\ikdem\\PycharmProjects\\Test\\binance_python.py\", line 169, in _handle_response\r\n    raise BinanceAPIException(response)\r\nbinance_python_exceptions.BinanceAPIException: APIError(code=-1100): Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\\.[0-9]{1,20})?$'.\r\n```\r\n\r\nI know that it has to do with the amount of decimals that are present. If I try and execute the order with only 5 decimals in total it does work. (For example an order sent like this, where I posted an order at the price of 0.0003). \r\n\r\n`\r\n12-27 16:12:35 | TRX/BTC | Limit | Buy | 0.00000242 | 0.00030000 | 10 | 10 | 0.00002420 | -- | Filled\r\n-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --\r\n`\r\n\r\nAny fixes for this?"}}
{"actor":{"display_login":"sammchardy"}}