Introducing WKOIN Seller - bot to dinamically change the price of sell orders

in #koinoslast year

Repository

https://github.com/joticajulian/wkoin-seller

What is WKOIN?

WKOIN is a wrapped token for KOIN (see https://koinos.io) created and controlled on Hive-Engine by @harpagon. See the introduction post for more details.

Motivation

Hive-Engine gives the possibility to place buy/sell orders in the market. However, it is not possible to set a price that dinamically changes based on the price in external exchanges, like Uniswap.

Bot seller

This bot checks the price of Hive and Koin periodically (each 10 minutes) on coinmarketcap and uniswap respectively. And it updates the sell order on Hive Engine taking into account the new prices. The bot also uses a factor price to define how much above the current price it wants to sell in order to get a profit.

Preparation

The bot uses coinmarketcap to get the current price of Hive and an API KEY is required to use this service. Go to https://coinmarketcap.com/api/ to request a free api key.

Installation

Create a .env file taking a copy of .env.example and set the corresponding variables.

  • ACCOUNT: hive account.
  • ACTIVE_KEY: active key.
  • QUANTITY: Amount of Wkoin placed in the sell order. When a sell order is filled a new sell order is created with the same quantity.
  • PRICE_FACTOR: Multiplication factor to set the price above (or below) the current price on uniswap.

Install dependencies

$ npm run install

Start the bot

$ npm run start

Trading pair

https://hive-engine.com/?p=market&t=WKOIN

I already sent some wkoin to the market to create some liquidity.

Thanks to the fee-less transactions on Hive it is possible to make trading without using the high fees of Ethereum.

Sort:  

Very cool I had some WKOIN on sell on Hive-Engine but canceled that after some time due to the everychanging eth/koin prices.

Congratulations @jga! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 4000 as payout for your posts. Your next target is to reach a total payout of 5000

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP