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

TypeError: broadcast_msg() missing 1 required positional argument: 'msg' #20

Closed mantle3576 closed 5 years ago

mantle3576 commented 5 years ago

res = client.broadcast_msg(transfer_msg, sync=True) TypeError: broadcast_msg() missing 1 required positional argument: 'msg'

Any idea how to fix this error?

from binance_chain.http import HttpApiClient from binance_chain.messages import TransferMsg from binance_chain.wallet import Wallet from binance_chain.environment import BinanceEnvironment

env = BinanceEnvironment.get_production_env() wallet = Wallet('my private key') client = HttpApiClient

transfer_msg = TransferMsg( wallet=wallet, symbol='BNB', amount=1, to_address='address', ) res = client.broadcast_msg(transfer_msg, sync=True)

sammchardy commented 5 years ago

Hi @mantle3576 make sure you either name all parameters in the function call, or don't name them.

try

res = client.broadcast_msg(msg=transfer_msg, sync=True)
mantle3576 commented 5 years ago

Thanks for your labor :)

On Mon, Jul 8, 2019, 7:49 AM Sam McHardy notifications@github.com wrote:

Hi @mantle3576 https://github.com/mantle3576 make sure you either name all parameters in the function call, or don't name them.

try

res = client.broadcast_msg(msg=transfer_msg, sync=True)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sammchardy/python-binance-chain/issues/20?email_source=notifications&email_token=AMRH4UOABXK3HRDH4ZT4RVDP6LBOHA5CNFSM4H6SVDA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZL6QJA#issuecomment-509077540, or mute the thread https://github.com/notifications/unsubscribe-auth/AMRH4ULO5ROBV7QGPQNTHK3P6LBOHANCNFSM4H6SVDAQ .

diliosuhor commented 3 years ago

thank you! @sammchardy