sammchardy / python-binance-chain

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

APIError(code=401): signature verification failed #24

Closed logan059 closed 5 years ago

logan059 commented 5 years ago

Python Version: 3.7 Environment: Mac OS

Method: ` wallet = Wallet('privkey', env=BinanceEnvironment.get_testnet_env())

transfer_msg = TransferMsg( wallet=wallet, symbol='BNB', amount=1, to_address='tbnb15cwx4kh8qcgr0uumm4hf20a4lsd7znpdjykevc', memo='good luck' )

transfer_msg.wallet.initialise_wallet()

data = transfer_msg.to_hex_data()

res = client.broadcast_hex_msg(hex_msg=data, sync=True) `

Error: exceptions.BinanceChainAPIException: APIError(code=401): signature verification failed How to fix ? Thanks

logan059 commented 5 years ago

The problem has been solved, because i change ujson to json