I need to interact with blockchain network by API (by Python)? but I have few problems with it.
I have rpcuser, rpcpassword, ip, and port of rpc; api endpoint; and network such as wif_prefix_hex=, address_prefix_hex=, pay_to_script_prefix_hex= and so on. I tried to interact with it by following:
serverURL = rpcUser + ':' + rpcPassword + '@' + rpcIP + ':' + rpcPort
requests.post(serverURL, json={'method': 'getnewaddress'}, )
But I get:
requests.exceptions.InvalidSchema: No connection adapters were found for
How can I solve this?