fbpx
Connect with us

CryptoSpace

A Beginner’s Guide on How to Build a Steem Bot

Published

on

How to build steem bot

Steemit is the first blockchain-based blogging and social media website that rewards its content creators with the cryptocurrency STEEM when they publish or curate content. 

Top 5 Cryptocurrencies 2020

Bots were first introduced in the Steem ecosystem in 2016, and have since then come a long way. The most common Steem bot development is done for upvoting posts – in simple as well as complex conditions. A Steem bot developer can create an application over blockchain to perform tasks that are simple, but structurally repetitive. There can be certain pre-programmed conditions under which the bot functions and produces results. If too many conditions are levied, it creates complexity and the bot could run for long periods of time until the specific criterion is met and satisfied. 

Steem bot development involves real-time automation over Steem blockchain with the help of simple APIs. The Steem bot developer can simply bootstrap an automated task with Steem without having much understanding about the node’s mechanism and tricky API.

Steem Bot Development – How to Build a Steem Bot

There are plenty of operations that you can simplify by learning how to make a bot for Steemit. In fact, you can even make money with a Steemit bot if you are adept at building one. This tutorial guides you on how to build a Steem bot that can perform the function of auto-voting. 

  • Outline

An auto-voting bot can automatically upvote posts from the selected list of usernames. When new people join your platform, you can upvote their milestone to encourage them with the help of this Steemit bot. 

  • What You Need

A plain text editor

Your private posting key – this is available in your wallet which can be accessed through the permissions tab on steemit.com. The private key feature allows the bot to vote.

Goals

  • specify a list of usernames (your friends)
  • connect to the Steem-js API
  • check when a new post is posted to the Steem network
  • check if the post belongs to any of your friends
  • send a vote to that post

Once that the basics are outlined for you, let us begin with the development:

Step 1: Set Up

For the purpose of this tutorial, we will have the bot run in the web browser (However, a more effective way to use this bot would be on the command-line, but this one is simpler and a good place to start from for a beginner).

Set up a blank HTML file and link it to the steem.js library. The library does most of the work as most of the commands are already present in it, talks to the Steem network, and means that we need to write very little code ourselves.

<html>

<head>

<script src=”https://cdn.steemjs.com/lib/latest/steem.min.js”></script>

<script></script>

</head>

<body></body>

</html>

You can go ahead and save this file as bot-tutorial.html. Although, if you run this file right now, it’ll only show you a blank screen.

Step 2 – Create a list of Friends

This step will enable you to store a list of names to the code. Whether the names should be up-voted or not can be decided later.

const FRIEND_LIST = [‘June’, ‘Zoe’, ‘Karen’, ‘Sarah’]

Once the bot is running, the list of names cannot be changed. So create an expansive list.

Step 3 – Connect to the Steem-js API

Connect to the Steem network and check all new transactions. Each block on the Steem blockchain holds transactions which can be anything – transfers, votes, comments, profile updates, and many more. Once we connect to the Steem network, we’re sent new data from the blockchain every few seconds. 

The API is very consistent and follows the same set of rules.

Whenever you interact with the steem-js library, specify steem.api and then the action that you want taken. In some cases, actions need to provide extra information. This information is called arguments. 

SteemBot constructor after declaration will provide some methods as events, which you can use to trigger different behaviors for different users. The first argument of every event method is always targetUsers and the second one is handler function. If you omit targetUsers the first one will be handlerfunction.

Targetusers could simply be a string with the username of a Steem account, or it could be an array of usernames. Omitting this parameter will require the event to trigger all users.

Step 4 – Check for the Names in Your Friend List

Once you’ve connected to the Steem-JS library, you need to check if the names that you get from the blockchain match those in your list of friends. To do this, create a function. Functions allow us to create blocks of code that we can reuse over and over.

The function can be created like this:

Friend(name){

  return (FRIEND_LIST.indexOf(name) > -1);

}

Out function takes one piece of data ‘name’ and returns us a yes/no or a true/false answer. 

With the help of this code we are taking our FRIEND_LIST and looking for the index (the position) of the name we entered. If the friend name that we ask for is in the list, it will say 1 or 3 (to show the position at which the name is at) for example if not it says -1. checking if the answer is > -1 gives us our true/false for friends. 

Step 5 – Send Votes

Once the above steps are completed and the structure set up, the final step includes coding to send votes. For this, use the following command:

function sendVote(author, permlink){}

We can create another function which is slightly more complex and specific. In this function, the data we need is the author and the permlink. This function will specify the author and the post that you shall vote on.

function sendVote(author, permlink){

steem.broadcast.vote(ACCOUNT_POSTING_KEY, ACCOUNT_NAME, author, permlink, 10000, function(err, result) {

        console.log(result);

   });

}

With this function, you can enable a ‘steem.broadcast’. The data that you need to share includes the posting key, account name, the author, the link and a voting weight. Note the voting weight does not use percentages so 10000 is the same as 100%.

Finally, you can update the function to add the sendVote function instead of just a message. We’re taking the data from the transaction and using it in our send vote function.

That’s it! With the help of this simple tutorial on how to build a steem bot, your friend’s post will automatically get upvoted in your post.

You can use this simple exercise to create simple function and for steem bot development to help you in making your programs a lot more personalised. The bot will automate repetitive tasks of upvoting content each time without the need for your assistance. The bot will automatically start scrolling and fetching more content, then analyze everything and eventually upvote. Then it will refresh and do it again, and again, and again, and again.

Thank you for reading and sharing this article. We appreciate you.

This is a guest post by Vin Boris.

Author Bio:

SteembotVin Boris is a Social Media Marketer and Content Writer at Steem Blockchain Experts , a Blockchain and Steem currency based development, consulting and marketing firm. Vin Boris has been Outshining in the Blockchain Tech. industry for more than 10 years.

 

Stay safe and healthy!

Top 5 Cryptocurrencies 2020

best Crypto Tax Software

IMPORTANT DISCLAIMER

Everything in this article is an opinion, not an advice of any kind. This material has been prepared for general informational purposes only and it is not intended to be relied upon as accounting, tax, investment, legal or other professional advice. Please consult with a professional for specific advice.

We do not endorse or guarantee the accuracy of the information and claims made.

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Continue Reading

CryptoSpace

Why this bull run has no precedence? ONE key metric to rule them all

Published

on

bull run 2020

Everyone is singing the praises for the bulls’ arrival in the crypto space.

Some say that 2020 will mark the biggest bull run in cryptos’, albeit short, history.  

We are already in October so we doubt any fireworks will take place now since there is a lot of uncertainty about the US elections.

Add the uncertainty around the stimulus bills, unemployment trends, soon to be lifted forbearances and the list goes on.

2020 still has another 2.5 months to go but most of these uncertainties will take a while to show their true impact.

For instance, what will a Biden presidency mean for the economy and cryptos?  

How many people will be forced to sell their homes once the forbearance’s are lifted?

What happens if the next stimulus bill does not pass through?

When will the vaccine become available?

These are some of the unique situations that we have no precedence for. Do not let anyone convince you that we know what’s going to unfold, because no one does.

Yes, everyone has theories, like the ones we are presenting here, but that is all they are: theories.

The BIGGEST metric that crypto community is not considering

We are no economists nor can we run any fancy charts to impress a point on you.  

We are just good observers and have common sense to deduce a few things based on data.  

For instance, between 2007 and 2010 consumer spending dropped by an overall .2% and we know what that meant for the economy.

Personal consumption expenditure

In 2020, people have literally cut down on their spending.  Some of it is forced due to the restrictions imposed by external forces and most of it is self imposed.

I am sure the spending on marijuana, liquor and food have gone up but what about other spending?

2020 also saw a spike in the savings balances.  

Economy is not stimulated by people hoarding their money. People need to exchange value for the economy to thrive.

What happens to the spending behaviors when the true stats around evictions, lost jobs (that are not coming back) and small businesses that are shutting down permanently are out?

Our guess is that people are going to be weary of spending money in the short to medium term. If we were forced to pick a timeline – we would say about 12-16 months (assuming we get a vaccine in Q1 2021).

When is the next bull run? 

Based on what we have seen in 2007 through 2010 and observing the consumer spending habits in recent times, we think that Bitcoin (and cryptos) will not find their true peak until next halving.

We know this is not what you came to hear.  

If the bull run in your mind is hitting the 2017 highs then we do not think you have to wait until the next bull run.

If the bull run means a $100,000 bitcoin then we stand by our opinion on when that is going to be.

A case for bull run

In spite of what is going on in the street, following factors are acting as strong bull market signals for the crypto space. 

Hype: Crypto space (specifically Bitcoin) has been gathering a lot of steam in terms of brand awareness and mass penetration.  This is great for the long game.

Adoption: More than ever, private and public enterprises are becoming serious about bitcoin and underlying blockchain technology.  What is good for bitcoin is good for blockchain and vice-versa.  MicroStrategy investment, Paul Tudor Jones getting involved with bitcoin are some examples.

Tech explosion: Crypto space is home to some of the brilliant minds in the tech space. Add Big Techs interest in the crypto space and you have a perfect recipe for monumental shifts in crypto perception. Tech giants like Microsoft, Google, Twitter, Facebook are all getting involved with blockchain and cryptocurrencies in some shape or form.

Retail demand: More and more retail investors are looking for alternative investments and they are waiting on the sidelines to get involved with Bitcoin.  As soon as companies like Fidelity or other brands offer crypto investment through retirement plans – there would be a massive influx into this space.

DeFi: DeFi in its current state might be infested with shittty projects but as a concept and technological shift to turn the current banking system upside down – it holds great potential. Any demand to DeFi brings more demand to bitcoin, ethereum and blockchain in general.

Conclusion

The debate around when is the next bull run will hinge on how the market recovers from this pandemic. How soon will we get the vaccine and how many of the lost small businesses and jobs are we going to resurrect?

From a macro perspective, Bitcoin and few select cryptocurrencies will continue their upward trajectory so if you looked back to 2020 five years from now, you might think bitcoin was on sale.  

Question is: how many people have that kind of patience?

Thank you for reading and sharing this article. We appreciate you.

Stay safe and healthy!

Top 5 Cryptocurrencies 2020

IMPORTANT DISCLAIMER

Everything in this article is an opinion, not an advice of any kind. This material has been prepared for general informational purposes only and it is not intended to be relied upon as accounting, tax, investment, legal or other professional advice. Please consult with a professional for specific advice.

We do not endorse or guarantee the accuracy of the information and claims made.

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

 

Continue Reading

CryptoSpace

Is Cryptocurrency driven by fundamentals or hype?

Published

on

Fundamentals or Hype

During the early 2000s India experienced a massive real estate bubble. With a lot of western companies opening their outsourcing centers in India, the land prices shot up 2x, 5x, 10x, and even 100x.

You read that right. 

Have you heard about 100x in Real Estate?

To be sure, the demand was exponentially growing in the major cities like Bangalore, Hyderabad, etc., which were quickly turning into back offices for the many western companies.

The hype in these cities was somewhat justified.

However, here is the kicker.  Many remote places which did not directly benefit from this influx of foreign direct investment started seeing their prices go up in similar fashion.

In a crazy case of trickle effect and super-hype created by the real estate agents, properties were just trading from one party to another for unbelievable markups and the prices constantly went up.

Today, that massive bubble is still intact minus the crazy multipliers.

The reason we like the comparison of what happened in Indian Real Estate market to the crypto is that a genuine need in a specific space has been exploited to translate that hype onto anything tagged with the name. 

In India that hype tag was ‘land’ and in crypto that hype tag could mean anything from ICOs to DeFi.

Ask any crypto enthusiast they will make you believe that crypto is all about fundamentals.  However, anyone who has spent even a few months in the space quickly realizes that crypto prices don’t follow fundamentals.  

This is one place where Crypto space shares its similarities with the stock market as well.

Stock market is completely distanced from the economy and it too acts irrationally, that is, when people are losing jobs and businesses are shutting down permanently, the stock market rallies higher and higher.

Similarly, crypto space, to its own detriment, is ignoring the projects that have amazing fundamentals while pumping other projects solely based on the hype.

Long term vs. Short term

Hype is short lived. Fundamentals are a long game.

That is why we emphasize that anyone interested in the crypto space does their own research in finding the projects that meet their fundamental criteria.

Once you know that a project has fundamentals (team that can execute, problem worth solving, solution that can solve, market demand, etc.,) then you just ignore the FOMO and FUD.

This will help you sleep better and use your spare time and energy in quality endeavors like taking care of yourself or spending time with family, etc.,

If you get on the hype train – it will be difficult to catch the right wave and this constant lookout for the next big thing is going to rob you of all the peace.

And, if you find yourself on the right side of the wave – you will be decimated and drowned.

DeFi defies all common sense

That is what happened with a lot of people who tried to ‘time’ the DeFi market.  

Don’t get us wrong. Many people made a ton of money (and good for them).  However, remember, crypto at this point of its evolution is a zero sum game.  That means, for everyone who made a million someone lost that million.

Unless you got on a project quite early keeping your risk level low or you have some insider information (not to mention this being illegal), you can generally not ‘time’ the market.

Many veteran traders have lost their shirts in chasing the market.

Conclusion: does this mean I should stay away from DeFi?

We cannot tell you that.  That is something you got to decide for yourself.

By market cap, Yearn Finance is considered one of the top DeFi projects. It lost over 67% in less than a month.   

Personally, if the top most project is still trying to find the ground while other projects are losing 99% of their value in a matter of a day, that means one thing:  the space needs time to mature.

We will continue to learn about DeFi. We will continue to invest what we can afford to lose when we find the right project that meets our fundamentals criteria.

That is our strategy at the moment. You have to find a strategy that suits you.

While crypto space is riding on the hype at the moment, we continue to believe in fundamentals.

Thank you for reading and sharing this article. We appreciate you.

Stay safe and healthy!

Top 5 Cryptocurrencies 2020

IMPORTANT DISCLAIMER

Everything in this article is an opinion, not an advice of any kind. This material has been prepared for general informational purposes only and it is not intended to be relied upon as accounting, tax, investment, legal or other professional advice. Please consult with a professional for specific advice.

We do not endorse or guarantee the accuracy of the information and claims made.

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Continue Reading

CryptoSpace

Will India Ban Cryptocurrency Trading?

Published

on

Cryptocurrrency Ban India

India keeps playing with the emotions of the crypto community in India with constant back and forth of change in rules.

First it was a complete ban of crypto transactions. RBI forbids banks from serving any clients that deal in cryptocurrencies. Thanks to the Supreme court decision, RBI had to back off.

Now, there is a renewed effort to place a ban on crypto again.  

Is Crypto Ban a good thing for India’s financial future?

No, Cryptocurrency is here to stay according to many financial investors and billionaires. As nations prepare for a hyper-inflation cycle to sweep the world, Cryptocurrency can act as a hedge in addition to gold and silver.

If the government is concerned about illegal activities with cryptos then they can relax because most crimes happen in fiat cash transactions, not crypto which is traceable.

Crypto traders generally are not the ones that take part in illicit trades.  It is those who introduce illegal ICOs and OTC trades.

How about regulations?

Instead of banning crypto trades, how about bringing clear regulations to provide a framework for the crypto trading.

Such a framework should include stricter guidelines for ICOs and OTC trades.  

Crypto exchanges can relay the trading information directly to the tax authorities (instead of needing to be subpoenaed) so that there is transparency.

Will India Ban Cryptocurrency Trading?

That depends on whether India wants to be in the ranks of the United States, Switzerland, South Korea, etc., or if it wants to be counted among China, Russia and North Korea.

The United States, South Korea and Switzerland (along with other countries) are doing everything to stay ahead in the blockchain and crypto race.

Other countries we stated above are working to stomp on the innovation. 

A better question is: Can India ban cryptocurrency trading?  

The answer is NO.  

To ban cryptocurrency trading – India will have to shut down the internet.  

In the event of an actual law that bans Indians from participating in the cryptocurrency trading, the only people that will be impacted by those are the ‘honest’ citizens because the crooked ones will still find ways to trade using VPN or alias names.

For a country that wants to be at the forefront of technological revolution a ban would be a very backward decision.

We urge the Indian government to NOT punish the honest citizens by introducing a ban.  Rather, introduce a sensible legal framework for everyone to operate in.

This will bring more businesses to India and take India’s platforms to the world.

Thank you for reading and sharing this article. We appreciate you.

Stay safe and healthy!

Top 5 Cryptocurrencies 2020

IMPORTANT DISCLAIMER

Everything in this article is an opinion, not an advice of any kind. This material has been prepared for general informational purposes only and it is not intended to be relied upon as accounting, tax, investment, legal or other professional advice. Please consult with a professional for specific advice.

We do not endorse or guarantee the accuracy of the information and claims made.

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Continue Reading

Trending