• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

How to send dash to hundreds of private keys?

GrandMasterDash

Well-known member
Masternode Owner/Operator
I have a csv with hundreds of private keys. Now I want to send dash to them, not one at a time, how?
 
You can also use the sendmany command in debug console (i suggest if you go this route you first try this out on Testnet).
Just typing sendmany in debug console will get you following information :

sendmany "fromaccount" {"address":amount,...} ( minconf addlocked "comment" ["address",...] subtractfeefromamount use_is use_ps )
Send multiple times. Amounts are double-precision floating point numbers.
Arguments:
1. "fromaccount" (string, required) DEPRECATED. The account to send the funds from. Should be "" for the default account
2. "amounts" (string, required) A json object with addresses and amounts
{
"address":amount (numeric or string) The dash address is the key, the numeric amount (can be string) in DASH is the value
,...
}
3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.
4. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.
5. "comment" (string, optional) A comment
6. subtractfeefromamount (array, optional) A json array with addresses.
The fee will be equally deducted from the amount of each selected address.
Those recipients will receive less dashs than you enter in their corresponding amount field.
If no addresses are specified here, the sender pays the fee.
[
"address" (string) Subtract fee from this address
,...
]
7. "use_is" (bool, optional, default=false) Send this transaction as InstantSend
8. "use_ps" (bool, optional, default=false) Use anonymized funds only
Result:
"txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
the number of addresses.

Examples:

Send two amounts to two different addresses:
> dash-cli sendmany "tabby" "{\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\":0.01,\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\":0.02}"

Send two amounts to two different addresses setting the confirmation and comment:
> dash-cli sendmany "tabby" "{\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\":0.01,\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\":0.02}" 6 false "testing"

As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["tabby", "{\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\":0.01,\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\":0.02}", 6, false, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/
(code -1)

With above examples you will most likely need to put ./ before dash-cli, FYI.
I would let the "use_is" parameter on default (false), as these transactions will most likely get instantsend through ChainLocks anyways.
Also i'm not sure if you can still do that json rpc call these days.
 
Last edited:
Back
Top