Hi.
I'm working on this
https://github.com/p4u/blockchain.pyIt is a blockchain.info python API (I did not find any code light and working). I've problems with the "sendManyPayment" method, I hope you can help me.
According to blockchain.info API specification (
https://blockchain.info/es/api/blockchain_wallet_api):
https://blockchain.info/es/merchant/$guid/sendmany?password=$main_password&second_password=$second_password&recipients=$recipients&shared=$shared&fee=$fee
$main_password Your Main My wallet password
$second_password Your second My Wallet password if double encryption is enabled.
$recipients Is a JSON Object using Bitcoin Addresses as keys and the amounts to send as values (See below).
$from Send from a specific Bitcoin Address (Optional)
$shared "true" or "false" indicating whether the transaction should be sent through a shared wallet. Fees apply. (Optional)
$fee Transaction fee value in satoshi (Must be greater than default fee) (Optional)
$note A public note to include with the transaction (Optional)
{
"1JzSZFs2DQke2B3S4pBxaNaMzzVZaG4Cqh": 100000000,
"12Cf6nCcRtKERh9cQm3Z29c9MWvQuFSxvT": 1500000000,
"1dice6YgEVBf88erBFra9BHf6ZMoyvG88": 200000000
}
Recipients is a JSON object with the BTC address as key and the amount in Satoshi as value.
Sending the recipients dictionary as is, does not work:
RuntimeError: ERROR: Invalid Recipients JSON. Please make sure it is url encoded and consult the docs.
And trying to encode it by
data['recipients'] = urllib.parse.urlencode(recipients)
Does not work either.
RuntimeError: ERROR: Invalid Recipients JSON. Please make sure it is url encoded and consult the docs.
Do you have any experience with it? Do you know which kind of data are they expecting? Could it be that they use another url encode RFC?
Thanks!
EDIT: typo