<p>WOW....so this never got answered by anyone else....okay let's share the answer for you all as I eventually figured it out but had forgotten that I wrote this question:</p>

<p><code>electrum paytomany "[[\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05]]"
</code></p>

<p>So each address to be paid must reside within its own array which is itself enclosed into a parent array of all those payout requests...the slashes are simply there to escape the quotes so they're included within the string.  I actually ended up doing something other than bash but utlimately this is the string you need to format in order to paytomany using electrum.  Still don't know what the -v nor the -h are for (op...nevermind they mean Help and Verbose)...-P for portable wallet (meaning it can be put onto something like a usb drive (a portable filesystem essentially)... Hope this can help some other fellow web traveller in the future ;)</p>

CC BY-SA 4.0
2020-07-04T02:41:20.387Z
You are a god! the documentation is awful, for thinking that the sentence  "outputs               list of ["address", amount]" implies this EXTREMELY specific data format at all
Sidharth Ghoshal
CC BY-SA 4.0
2020-07-13T12:03:10.880Z
Note that the string '[["address_text", value]]' also works, by mixing single and double quotes you can avoid having to add escape characters \ to the whole thing. This is how the json.dumps library operates in python which is used to interpret this via json.loads  See: https://github.com/spesmilo/electrum/blob/master/electrum/commands.py
Sidharth Ghoshal
CC BY-SA 3.0
2018-03-01T15:28:21.400Z
2018-03-01T15:28:21.400Z
Frankenmint
<p>I know that I can use the GUI to do this and I"m glad to do so...however how would I do this using a bash script?  This is on a Mac but I would just change it for any OS in question.</p>

<pre><code>#!/bin/sh

PAYOUTS=cat ~/Desktop/weeklySummary.csv
WP= /Users/${USER}/.electrum/wallets
PASS= "my_wallet_password"
# echo $PAYOUTS


cd /
./Applications/Electrum.app/Contents/MacOS/Electrum paytomany &amp;&amp; $PAYOUTS -w $WP -W PASS 


# this is not ready yet!  I have to figure out 
# whether or not change address, a fee, and a 
# from address are requried to use this 
</code></pre>

<p>I get thrown some errors for a few missing details.  Am I required to have my wallet password, from address, and change address (I presume the answer is yes)  but furthermore, what are the -h, -v, -P parameters mentioned here?</p>

<p><a href="https://i.sstatic.net/i2vk4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/i2vk4.png" alt="enter image description here"></a></p>

<electrum><sendtoaddress>
How do I properly paytomany using electrum via script?
Frankenmint
# How do I properly paytomany using electrum via script?

(Asked by: username_0 on 2016-05-10)

I know that I can use the GUI to do this and I"m glad to do so...however how would I do this using a bash script?  This is on a Mac but I would just change it for any OS in question.
#!/bin/sh

PAYOUTS=cat ~/Desktop/weeklySummary.csv
WP= /Users/${USER}/.electrum/wallets
PASS= "my_wallet_password"
# echo $PAYOUTS


cd /
./Applications/Electrum.app/Contents/MacOS/Electrum paytomany && $PAYOUTS -w $WP -W PASS 


# this is not ready yet!  I have to figure out 
# whether or not change address, a fee, and a 
# from address are requried to use this 

I get thrown some errors for a few missing details.  Am I required to have my wallet password, from address, and change address (I presume the answer is yes)  but furthermore, what are the -h, -v, -P parameters mentioned here?

**Tags:** electrum, sendtoaddress


---

## 1 answers

### Answer by username_0 on 2018-03-01. Score: 4 | Accepted answer

WOW....so this never got answered by anyone else....okay let's share the answer for you all as I eventually figured it out but had forgotten that I wrote this question:

`electrum paytomany "[[\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05]]"`

So each address to be paid must reside within its own array which is itself enclosed into a parent array of all those payout requests...the slashes are simply there to escape the quotes so they're included within the string. I actually ended up doing something other than bash but utlimately this is the string you need to format in order to paytomany using electrum. Still don't know what the -v nor the -h are for (op...nevermind they mean Help and Verbose)...-P for portable wallet (meaning it can be put onto something like a usb drive (a portable filesystem essentially)... Hope this can help some other fellow web traveller in the future ;)

> **Comments:**
> **username_1**: You are a god! the documentation is awful, for thinking that the sentence  "outputs               list of ["address", amount]" implies this EXTREMELY specific data format at all  
> **username_1**: Note that the string '[["address_text", value]]' also works, by mixing single and double quotes you can avoid having to add escape characters \ to the whole thing. This is how the json.dumps library operates in python which is used to interpret this via json.loads  See: https://github.com/spesmilo/electrum/blob/master/electrum/commands.py  

---

