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

avatar
(Edited)

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/

Posted with STEMGeeks



0
0
0.000
0 comments