Im trying to send bitcoins using Blockchain.info API to both adresses in 'recipes':
recipes ={'1Pd9gXJ8EqyGrqMKVevQWNjjF4B4dcSykf':10000,'14gVMjoCbjaGU3s9EQghVxYTAJgkmqqtHV':10000}
My request looks like:
url_multi = 'https://blockchain.info/nl/merchant/MYKEY/sendmany?password=MYPASSWORD&recipients='+recipes+'&fee=15000'
requests.get(url_multi)
I managed to send txs to single adresses using the examples in the documentation. However, sending to multiple adresses at once requires a dict according to the PHP-example.
In Python, the following Typerror gets returned; TypeError: cannot concatenate 'str' and 'dict' objects
How do I add multiple recipients to the request without using a dict?
recipes should have been a JSON object instead. So I converted it before adding it to the URL. Works fine now.
I suck sometimes ;(