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

get_transactions is always empty w/ testnet env #17

Open ScriptProdigy opened 5 years ago

ScriptProdigy commented 5 years ago

Installed through pip, running shell

>>> from binance_chain.http import HttpApiClient
>>> from binance_chain.constants import KlineInterval
>>> from binance_chain.environment import BinanceEnvironment
>>> testnet_env = BinanceEnvironment.get_testnet_env()
>>> client = HttpApiClient(env=testnet_env)
>>> testnet_env._api_url
'https://testnet-dex.binance.org'
>>> testnet_env.wss_url
'wss://testnet-dex.binance.org/api/'
>>> client.env._api_url
'https://testnet-dex.binance.org'
>>> client.get_node_info()
{'node_info': {'protocol_version': {'p2p': 7, 'block': 10, 'app': 0}, 'id': '1bca643058c56f9c20ebaaad1739522ee7d11cd6', 'listen_addr': '10.201.41.106:27146', 'network': 'Binance-Chain-Nile', 'version': '0.30.1', 'channels': '3540202122233038', 'moniker': 'Fuji', 'other': {'tx_index': 'on', 'rpc_address': 'tcp://0.0.0.0:27147'}}, 'sync_info': {'latest_block_hash': '44B24923743EF044CEE7A47C7FFAF4C800749C2A37D8AD6567DCE57AD3D46771', 'latest_app_hash': 'B929CEF204C3615470AC27020917D03A553E8B22924CA9DB3654C8FEE7ED2895', 'latest_block_height': 22531119, 'latest_block_time': '2019-06-19T17:10:25.457142303Z', 'catching_up': False}, 'validator_info': {'address': '7B343E041CA130000A8BC00C35152BD7E7740037', 'pub_key': [74, 93, 71, 83, 235, 121, 249, 46, 128, 239, 226, 45, 247, 172, 164, 246, 102, 164, 244, 75, 248, 28, 83, 108, 74, 9, 212, 185, 197, 182, 84, 181], 'voting_power': 100000000000}}
>>> client.get_transactions('tbnb1j537plrhs3ndqrxxsyv69nm9u96cuqlqhcapqc')
{'tx': [], 'total': 0}

Its not pulling proper transaction history for this address on testnet. https://testnet-explorer.binance.org/address/tbnb1j537plrhs3ndqrxxsyv69nm9u96cuqlqhcapqc

Can anyone replicate?

ScriptProdigy commented 5 years ago

On mainnet get_transactions works however.. So this is related entirely to testnet