sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading
http://python-binance-chain.rtfd.io
MIT License
297 stars 133 forks source link

HttpApiClient._handle_response handle response error #12

Closed arch0x closed 4 years ago

arch0x commented 5 years ago

When I call the client.get_transaction method, I get a BinanceChainAPIException error. However, the status code of http is 200, and the code in the response result is 0. After I flip through the api document, I found the result to be correct. After I looked at the source code, I found that HttpApiClient. _handle_response when parsing the result, if 'code' in res and res['code'] != "200000": This code is inconsistent with the definition of api.