create account

Let's build a Bot - Universal Hive Bot Dev Blog #2 by assassyn

View this thread on: hive.blogpeakd.comecency.com
· @assassyn · (edited)
$0.25
Let's build a Bot - Universal Hive Bot Dev Blog #2
Hi
I need to keep a regular update for this dev blog as I manage to release more often than I am writing these posts.

I have a decent progress and I am adding more and more HIveEngine actions to the bot.  Currently, there are 9 actions and I think this is almost all for now as I am not sure what else could be added. 

**By all mean the Bot is still at most Beta version so please be aware that some actions might not always work as the amount selected are not correct**

# New token actions 

I have added the ability to add liquidity to a pool as well as a token swap function. However, I have some issues with calculating the correct amount and as a result, actions do not work all the time yet, but this will be fixed soon. 
```
        {
          "name": "SwapToken",
          "parameters": {
              "tokenPair": "SPORTS:AFIT",
              "token": "SPORTS",
              "amountToSwap": "*",
              "maxSlippage": "0.673619"
          }
        },
```
# New support action

What is more, there is a new FlushAndBalance action that combines both flush (i.e. sent operations to blockchain) with balance(i.e. read hive engine to get tokens value) with a 3 seconds delay between them to ensure that all blocks are updated. 
```
        {
          "name": "FlushAndBalanceAction"
        }
```

# New better config

I have introduced a new part of the confi g allowing users to set a number of tokens and execute the same operation on them.  So now instead of having 3 nodes doing exactly the same operation on the different tokens/token pairs you can have one. 
```
        {
          "name": "Series",
          "parameters": {
            "action": "AddToPool",
            "splitParameterName": "tokenPair",
            "splitOn": "PKM:SPS;SWAP.HIVE:THGAMING;FORGE:DEC",
            "leftAmount": "*",
            "rightAmount": "*"
          }
        },
```

# Where to find the Bot
 
All releases (that is compiled version of the bot), as well as source code, could be  found on Github: [https://github.com/Assassyn/universal-hive-bot/releases/](https://github.com/Assassyn/universal-hive-bot/releases/)

Posted with [STEMGeeks](https://stemgeeks.net)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorassassyn
permlinklet-s-build-a-bot-universal-hive-bot-dev-blog-2
categoryhive-163521
json_metadata"{"tags":["universal-bot","stem","hive-engine","waivio","pimp","leo"],"links":["https://github.com/Assassyn/universal-hive-bot/releases/"],"app":"stemgeeks/0.1","format":"markdown","canonical_url":"https://stemgeeks.net/@assassyn/let-s-build-a-bot-universal-hive-bot-dev-blog-2","description":"universal hive bot dev blog #2 ","users":[],"image":[]}"
created2023-05-22 11:35:57
last_update2023-05-22 11:37:12
depth0
children0
last_payout2023-05-29 11:35:57
cashout_time1969-12-31 23:59:59
total_payout_value0.127 HBD
curator_payout_value0.121 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,182
author_reputation27,348,274,521,994
root_title"Let's build a Bot - Universal Hive Bot Dev Blog #2"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id123,726,281
net_rshares548,962,879,491
author_curate_reward""
vote details (39)