hiveengine/steemengine - transfer/stake/unstake/sell all token at once

in HiveDevs4 years ago

Repository

hiveengine

https://github.com/holgern/hiveengine

steemengine

https://github.com/holgern/steemengine

hiveengine/steemengine

hiveengine/steemengine is using beem for broadcasting transfers and custom_json to the blockchain. hiveengine is only working when using HIVE nodes and steemengine works only when using STEEM nodes. You can check the currently set nodes with

beem config

Hive nodes can be set with

beem updatenodes --hive

For using steemengine, the nodes does not need to be changed, as always the steemit node is used.

Both packages can be installed with pip / pip3:

pip install hiveengine

and/or

pip install steemengine

Usage

After seeing that I had several tokens left in my steem-engine account and as I was to lazy to sell each token one by one, I updated the steemengine command line tool instead.

When a token has aktive bids, selling tokens is now convinient. You can use the sell command to broadcast a sell order for each of your tokens and use then the cancel command to cancel all not fullfilled order after a while. Then you can try again with sell...

I ported the changes also to hiveengine package.

Price calculation

The token price is calculated from the highest bid, or when there is currently no bid, from the last price.

Trying with no-broadcast

steemengine -d command

or

hiveengine -d command

A command can be tested with the -d or --no-broadcast option. When using this option, broadcasting is disabled and the transaction is just printed to the terminal.

Sell all token

steemengine sell -a account_name

or

hiveengine sell -a account_name

can now be used to go through all your tokens and sell them. The tool asks for each token if it should be sold, only when entering y, a sell order is broadcasted.

An account can be set with -a account_name.

selling tokens

Transfering all tokens

steemengine transfer -a from_acc to_acc

or

hiveengine transfer -a from_acc to_acc

This command allows it to send all tokens to the specified account. You will be asked for each token, if it should be transferred. Only when pressing y, the token is send.

Staking all tokens

steemengine stake -a account_name

or

hiveengine stake -a account_name

This helps in staking all token at once. You will be asked if you want to stake the specific token. Only when pressing y, the token is staked.

stake all your tokens

Unstaking all tokens

steemengine unstake -a account_name

or

hiveengine unstake -a account_name

This can be used to unstake all your staked tokens. You will be asked for each token if all staked token should be unstaked. Only when y is pressed, the token is unstaked.

Unstake your tokens

Show open orders

This command was enhanced so that all open orders for an account can be shown at once.

steemengine sellbook -a account_name

or

hiveengine sellbook -a account_name

or

steemengine buybook -a account_name

or

hiveengine buybook -a account_name

I tried, but I could not sell all my remaining tokens at steem-engine:

My sellbook at steem-engine

Maybe it's time for

steemengine  transfer -a holger80 -m bye null

Cancel all open buy / sell orders

steemengine cancel -a account_name buy

or

hiveengine cancel -a account_name buy

or

steemengine cancel -a account_name sell

or

hiveengine cancel -a account_name sell

This cancels all open sell / buy orders at once. It is possible to add --yes to prevent being asked if the open order should be canceled.

Show the worth of your liquid / staked token in HIVE

hiveengine balance -a account_name

This command exists only for hiveengine. The shown values are calculated by the highest bid or when not existing the latest price.

token value

Feedback

Let me know if you have ideas for improvements.


If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD.

Sort:  

Hmm. Does anyone who understands this want to type out a layman's version for me? Please and thank you!

Thanks for the reply. I'm already familiar with using steem-engine to convert between tokens, and to transfer tokens to and from blockchains. It's how I got my tokens out of Dodge over the past 13 weeks.
But it seems this post is about more than that.

I have always been fascinated by your work... You always provide an added value to the ecosystem. I will definetly try it out. Should i set up beem at first then add hive/steem engine?

Yes, that's a good idea. You can test then if beempy, the command line tool, works. If beem is correctly installed, hive/steem engine will most likely work.

Awesome!! Should i require some help, is there a documentation/readme with a guide on how to set up everything?

You can find help at the beem discord: https://discord.gg/4HM592V

You can find a Readme here: https://github.com/holgern/beem

@dein-problem may i know why i got unvoted by you?? Is there anything i did wrong?

No, this account is just a bot, that down votes everyone, also me. Luckily, this account has almost no hive power.

And what is the purpose of doing that? No HP no rep. What could he/she benefit on running such bot?

Wow I feel like after I read this I can code now. Well done!

Any ui where non-programmers can also use these nifty functions?

Yes, hiveengine / steemegine is also a command line tool. There is a help included. Try to install hiveengine / steemengine through pip/pip3 and then you will be able to use it in your terminal.

Selling chops tokens... I wish.. I have a lot to sell as you can imagine!

I voted twice for you !

Hi @holger80, you have received a small bonus upvote from MAXUV.
This is to inform you that you now have new MPATH tokens in your Hive-Engine wallet.
Please read this post for more information.
Thanks for being a member of both MAXUV and MPATH!

Sounds intriguing, but I’m afraid I’m not smart enough to understand how to transfer Steem to Hive this way...

Any translators, simplifiers around?


gdpknm.jpg

Wow great have stake and broadcasting good job

I have picked your post for my daily hive voting initiative, Keep it up and Hive On!!

above my paygrade :'(
this 'game' was meant to be easier