How to transfer SBD or STEEM to multiple accounts? (Batch transfer with steem-python) / 如何向多个账户批量转账

in #steemdev7 years ago

Manual transfer

<p dir="auto">Some of my friends held some very interesting activities on steemit. Such as <code>谷哥点名<code>七夕征文大赛<span> by <a href="/@jubi">@jubi, and <span>by <a href="/@rivalhw">@rivalhw. The activities are very successful, plenty of people did participate and many people won the prize. <p dir="auto">But, How to pay bonuses is a bit of a hassle, organizers need to log on to the website and transfer bonuses to each winner. <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmUHD9RHmyNtEJz1TRbTyEEvAi2ZsYJHsbqV6s5gnXirTh/image.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmUHD9RHmyNtEJz1TRbTyEEvAi2ZsYJHsbqV6s5gnXirTh/image.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmUHD9RHmyNtEJz1TRbTyEEvAi2ZsYJHsbqV6s5gnXirTh/image.png 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmPisdDLX5W6C3gkgeb6nrds6fGR3FPZ1mFRhgs1PsxFmw/image.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmPisdDLX5W6C3gkgeb6nrds6fGR3FPZ1mFRhgs1PsxFmw/image.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmPisdDLX5W6C3gkgeb6nrds6fGR3FPZ1mFRhgs1PsxFmw/image.png 2x" /> <p dir="auto">If there are a large number of winners, We need to do the same thing over and over again. <h1>Batch transfer <p dir="auto">Fortunately, we can implement batch transfers using program.<br /> Just installed <strong><em>the official python library for STEEM as I mentioned in <a href="https://steemit.com/steemdev/@oflyhigh/how-to-claim-your-rewards-automatically" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">my previous article <p dir="auto">But, We need <strong><em>Active private key this time, follow the same steps in <a href="https://steemit.com/steemdev/@oflyhigh/how-to-claim-your-rewards-automatically" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">my previous article but select <strong><em>Active private key, and then import it to our local wallet. <p dir="auto">A simplest script maybe like this: <pre><code>#!/usr/bin/env python import sys from steem import Steem from_account = 'oflyhigh' to_accounts = ['oflyhigh.test', 'jubi', 'deanliu'] amount = 0.001 asset = 'SBD' message = 'Test transfer!' def main(argv=None): steem=Steem() for to_account in to_accounts: steem.transfer(to_account, amount=amount, asset=asset, memo=message, account=from_account) if __name__ == "__main__": sys.exit(main()) <p dir="auto"><strong><em>Test transfer! was added at the same time.<span>Now, we can transfer 0.001 SBD to multiple accounts ( <a href="/@oflyhigh.test">@oflyhigh.test, <a href="/@jubi">@jubi, <a href="/@deanliu">@deanliu) by executing the script. A message <p dir="auto">Now, let me check my wallet:<br /> <img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmYxoV4dimck8qB5YRFa263XcpiQ7kWZc9dUmUiaUUHHEf/image.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmYxoV4dimck8qB5YRFa263XcpiQ7kWZc9dUmUiaUUHHEf/image.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmYxoV4dimck8qB5YRFa263XcpiQ7kWZc9dUmUiaUUHHEf/image.png 2x" /><br /> We made it successfully! <h1>For encrypted messaging <p dir="auto"><strong><em><code>steem-python also supports message encryption. <p dir="auto">To issue a encrypted message, just plus <strong><code># prefix for your message.<br /> For example,<br /> <code>message = '#Test transfer!' <p dir="auto">And you must import <strong><em>memo private key to your local wallet, otherwise you will get the following error message like this one:<br /> <code>steembase.exceptions.MissingKeyError: Memo key for oflyhigh missing! <p dir="auto">There's a small issue of <strong><code>steem-python for encrypted memo<br /> <img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmZuR52Aj7Tf25pH7KDDPjLfYyM55rmURrpxNnGgYx3Myf/image.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmZuR52Aj7Tf25pH7KDDPjLfYyM55rmURrpxNnGgYx3Myf/image.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmZuR52Aj7Tf25pH7KDDPjLfYyM55rmURrpxNnGgYx3Myf/image.png 2x" /><br /> We get two <strong>'#' in the memo, which should be one, but it doesn't matter. <h1>中文 <p dir="auto"><strong><em>谷哥点名<strong><em>七夕征文大赛等等。这些活动非常成功,吸引了很多朋友参加并且很多朋友赢得了奖励。<span>我的一些朋友在STEEMIT举办了很多有意思的活动,比如 <a href="/@jubi">@jubi 的<span>, <a href="/@rivalhw">@rivalhw 的 <p dir="auto">但是,如何发放奖励是很麻烦的事情,组织者要登陆网站给每个获奖者一笔一笔的转账。如果获奖者很多,那么我们就要一次又一次的做相同的事情。 <p dir="auto">幸运的是,我们可以用程序实现批量转账并附加备注信息,代码参见英文部分。 <p dir="auto">程序同时支持备注消息加密,在消息前边加个<strong><code>#号就可以了。但是<strong><code>steem-python有点小BUG,转账后的消息里多了一个<strong><code>#号,但是这没啥大影响。
Sort:  
There are 2 pages
Pages

If you'd like it to be super fast and efficient, you can pack multiple op's in a single tx.
http://steem.readthedocs.io/en/latest/examples.html#batching-operations

guide me also

Thank you for your comment.

<p dir="auto">I had already introduced <code>Batching Operations in my another article:<br /><br /> This method is really efficient, but it may be too technical to explain😀<span> <a href="https://steemit.com/cn/@oflyhigh/operation-transaction" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://steemit.com/cn/@oflyhigh/operation-transaction <p dir="auto">BTW: I'm very glad that you brought <a href="https://steemit.com/steem/@furion/steemdata-sbds-hosting-is-making-a-comeback" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemData SBDS back, It's really very useful. 👍

Thanks. I check this.

Is there perhaps a website/tool for this? I don't understand this whole python stuff

It seems as easy as pie....thanks for your tips....now i know more...

It would be great a web interface is developed so that non-coder people can send STEEM or SBD to multiple people. Thanks for the efforts though.

awesome

Good information. i resteem your post.

thanks for the info.. really helpful

Something many people should

helpfull, only i have registered sucsesfully multiple account

要如何轉大量資金到另一個帳戶呢?快點!使用我當例子!等你喔!

刘老师不介意我分一些吧 哈哈

排隊。。。

5%

我排這裡!! XD ((還排得到嗎?))

1%

有排到就好~~

是要分给我们每人1%吗?我第一个排队领哦

你确定用你当例子?我这就去把你的钱都转移到我账户下。

你要做你能力做得到的嘛!轉我錢走,你去試試啊!

@oflyhigh very interesting ..love your post...i'm your supporter and follower,.kindly see my post and upvote it..your vote is a big help on small timer like me..hope you upvote my post..thanks for your humble heart..support..thank you ..my friend

https://steemit.com/christianity/@mrblu/blessed-by-thy-name-of-the-lord

https://steemit.com/poetry/@mrblu/poem-the-power-of-deception-faces

https://steemit.com/poetry/@mrblu/poem-i-m-tired

https://steemit.com/poetry/@mrblu/poem-the-power-of-deception-faces

我是不是来晚了

@oflyhigh, This is something much needed and I'm glad I found it here. A lot of people are going to like this post and I'm sure I'm the first one to resteem it. You got my upvote as well. Keep posting.

Very informative

Very nice sharing with good necessary informations.

所以你是修改了程序是吗?安全性不会改变吧?

Thanks for sharing

Good share 👍🏻 !

Very handy, nothing worse then fill the same form out over and over again.

Thanks for sharing!

o哥测试转账的时候欢迎加上我。。。

下次统统加上

好,期待下次,明天吧。

Nice informatinformativepost

thank you so much for the info

下次可以轉錢給我來做示範^^

哈哈哈 +1

thanks for the info

太酷了!非常方便,但是,具体这个操作,感觉对非技术人士还是有些难度了

其实很简单的
普通用户, 弄个Linux系统(或许虚拟机),一步一步操作就可以了

Linux is FUD

I have understood now....

Please follow me back @hanisullah

its helpful buddy these tips are very easy to use i appreciate your work

very useful information, pretty simple and clear. 写得很清楚,而且看起来很简单, 点赞了。有空的话看看我的最新post吧,谢谢你了 点这里哦 :)

I have learnt a lot from this article.
Thank you!
And keep it on

赞,这个方法节省了不少时间。

As a newbie gain much knowledge, nice sharing!

Good post..
May sometimes you might to send me a present to show your kindness 😄😉

Thank you for the info @oflyhigh

Thanks. I try this .

Wow really helpful 😊👍🏼🍂💯👏🏼🎶

I will try this soon, I run giveaways and I had to stop just because it takes a lot of time to send the rewards to hundreds of people.

I still have to send about 7 SBD to more than 100 people and I will try your program and hopefully it will work.

Thanks in advance.

test 20170907

感谢O哥分享!

I wish... Some one can just do a 0.1 transfer to me... My account thinks I am probably dead.... Tears

Didn't know this was possible. Thanks for informing us about the multiple account transfer


Your post was mentioned in the hit parade in the following category:Congratulations @oflyhigh!

  • Pending payout - Ranked 6 with $ 306,93

感觉编程的都是魔术师,写个代码,什么都能实现!

Pls sbd 1 pls

Excellent and timely. I resteemed your post.

I really don't know anything about esteem. How can I raise the income and have more followers ?
I uploaded only one article and got from it 0.0

thanks for the info oflyhigh
upvoted and followed you, please do the same

thanks you help me :)

Good to know, tanks buddy.

There are 2 pages
Pages