The Steem Monsters trading bot is now available as open source

in #steemmonsters6 years ago (edited)

After having used the bots for several months now I have decided to make the code publicly available for anybody to use - either directly or as a basis for own development. You will find the full code here:

https://github.com/rondras/Steem-Monsters-Trading-Bot

Bildschirmfoto 20181020 um 16.26.13.png

Basically, there are three files at the moment. All three are written in Python 3.6

tradingbotbuyer.py

This program will consistently scan the market for new cards. Whenever a new card comes to the market, it identifies the card and checks what limit the user has set for the card. If the price of the card is below the set limit, it will buy the card. To make sure that no cards are paid multiple times, each transaction is saved in a mongo db.

The bot takes care of limits for different rarities but also allows to set limits for individual cards. The limits can either be set directly in the code or by querying the blockchain. This requires to save the settings in a specific format into the blockchain by making a transaction to a specified reference account.

Additionally, it differentiates between gold foil and normal cards and for the normal cards also picks up if a card is leveled. As of now the bot does not differentiate between Alpha and Beta cards.

Finally, there is also a feature to set a max holding limit for each card. This means that if you set 300 as a limit, the bot will stop buying a specific card if the limit is exceeded.

Lastly, there is also the option to shut down the bot via a certain command written into the blockchain.

tradingbotseller.py

This bot will put your cards on the market. Again, you can set limits for different cards or rarities and you can also set a limit for the maximum number of cards for each card you want to put on the market at a time.

The bot will again and again go through your cards and check every card if the price o the market is still consistent with your limits. If it is not, it will cancel your sale and create a new sell order.

Another feature is the "underbidding" function. This will set the price just below the current lowest sales price - but at least at your set limit.

A big weakness of this part of the bot is the fact that I have not yet implement beta cards, but this should be relative easy to do.

fightbot.py

The fightbot is a basic fightbot that will battle automatically. It is not very smart and will not get you up high in the rankings. But it helps to explain how the fighting algorithm works and might be used as a basis for future work.

A word of warning:
I have written these bots for my own pleasure and the code is pretty messy and not well documented. It cannot be implement as a plug and play program but might be interesting for the or or other who is interested in doing his or her own work in this direction.

Have fun and continue to enjoy the game,

Tim

Sort:  

Hey, why dont you use Utopian? Add utopian-io and development to your tags so we can review it. :)

is this all I have to do? I have never used utopian before but if it is ok to set the tag, sure.

Thank you for your review, @emrebeyler!

So far this week you've reviewed 4 contributions. Keep up the good work!

That looks great, @rondras. :)

Since -I guess- you're new to sharing on open-source scene, I would like to give a couple feedbacks on the codebase if you don't mind.

  • Adding a README.md file and giving information about the project, instructions, installation, usage, etc would be cool. Checkout this gist for a good README template example.

  • Open source has a global language (english) so code comments should be in English to make it understable for everyone.

  • I see you define shared configuration (parameteraccount, user, s) in each file. It might be a good idea to create a config.py and import from there in the other python files.

  • Since this is your first Utopian tagged post. (I encouraged you, so you didn't signed-up for a review in the first place but checkout our guidelines for your future submissions.)

Keep developing :)

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you very much for your feedback and tipps. I will review the guidelines and consider your tipps in the future.

Great! This will help me improving my steemmonster python script at https://github.com/holgern/steemmonsters

I am glad if it is helpful. If you have any questions please just let me know.

Hi @rondras!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @rondras!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Fight bot not work. It's just show me my rating every 120 secs and thats all.

Still not work? !shop

I was little busy, but right now it's work fine! Even better than that code! xD
!shop

你好鸭,ales!
@coar赠送1枚SHOP币给你!

目前你总共有: 2枚SHOP币

查看或者交易 SHOP币 请到 steem-engine.com.

无聊吗?跟我猜拳吧! **石头,剪刀,布~**

你好鸭,coar!
@ales赠送1枚SHOP币给你!

目前你总共有: 7枚SHOP币

查看或者交易 SHOP币 请到 steem-engine.com.

无聊吗?跟我猜拳吧! **石头,剪刀,布~**