📢 🤖 Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop

in #blockchain6 years ago (edited)

Hello, RuDex users and the Bitshares community!

Today we have prepared for you something entirely new and very useful. So, the RuDex exchange interface got a new section “Bots”, which name speaks for itself.

At the moment there are two bots that present the strategies of SpreadTrade and TrailingStop.

Over time, our zoo of public trading bots for Bitshares DEX will be expanded, so we invite all users to subscribe to this blog and check the updates.

We sincerely believe that public bots are crucial for the development of DEX and increasing liquidity on the platform by automating routine actions, which is why we decided to equip you with this tools. If you are like us don't mind robots doing all the work for you, then read the instructions below or watch a video tutorial on how to use them for your own benefit.

SpreadTrade bot

STEP-BY-STEP INSTRUCTION:

Basic settings:

  • base and quote fields specify the trading pair that bot uses;
  • balance field: balance available to the bot for using in base & quote;
  • amount field: the amount of the asset, that is placed in the orders (absolute numbers if the value is chosen, or percentage of the balance if the balance % is chosen);
  • spread field: spread from the center price for every asset pair;
  • default price: the default price, if this isn’t a bitAsset;
  • get a price from the market: sets if to take the price from the market or not;

After starting the bot subscribes for a new block in the blockchain. Every time the new block is received it checks two orders: to buy and sell.

If there is no order, it checks if the new order will be executed on placement with the price equal to feed_price * (1 ± spread / 100) and if the balance is sufficient to place an order with the amount.
If the balance is sufficient and the order wouldn’t be immediately executed, then the new order is placed. After placing the order, the balance field is diminished by amount.

If an order exists, the feed_price is checked against the order price. If the prices differ more than spread / 2, and placing the order at feed_price * (1 ± spread / 100) will not immediately execute it, the bot decides to move the order to feed_price * (1 ± spread / 100).
To that end, it cancels the current order, increments the balance by the amount remaining in the canceled order, and then creates a new order with required price and an amount that is lower between balance and amount.

If the balance field is a number. If the order for the base asset was placed, but after the current check it wasn’t found, then the bot considers an order to be executed. On top of the actions described above, balance for quote asset is incremented by the price of the executed order, and similar checks exist for the quote order.

If the balance field is left blank. Then the bot uses full balance of the account that the bot is running from.

If the balance field is set to “-”, then the asset balance is considered to be 0, and is not changed.

Price calculation. If the get price from market is set, then the price is taken from the market. If the assets are a pair of a smart asset, and core asset (BTS), then the prices are recalculated against base asset using the price, that was taken from the blockchain. For the smartcoin pairs that don’t use the core asset (BTS), the recalculation happens in two steps: the first one calculates price against BTS, and then to the base asset.
For the pairs that only have MPA (or only UIA), there is a check if default price is set. If it is empty, then the bot asks binance.com for a feed. For 2nd tier assets (RUDEX.BTC, OPEN.BTC, etc) the prefixes are dropped. USD matches to USDT. For example the query for OPEN.BTC/OPEN.USD is sent as a BTC/USDT pair.

If the pair doesn’t exist on Binance, then the price is set to 0, and no trading happens.


TrailingStop bot

STEP-BY-STEP INSTRUCTION:

Basic settings:

  • sellAsset & getAsset: are the asset to sell, and to buy respectively;
  • amount: is the amount of asset to sell;
  • stoploss & minAmount: the price after which an order is created, and the minimum amount of asset from getAsset;
  • trailing percent: the maximum difference between stoploss price and current price.

Stoploss field and minAmount are linked and shown only for the ease of setting up the bot.

After starting the bot subscribes to the new block in the blockchain. Every time after receiving a block it checks the market price.

If the market price is higher than stoploss by more than trailing_percent, then the stoploss price is changed by this difference. If the market price is lower than stoploss + trailing_percent / 3, then the order to sell sellAsset with the stoploss price and amount is placed.

After placing the order the bot stops.

That's all for now! We hope that now it will become even easier for you to maintain STEEM / SBD and other DEX coins without making excessive efforts.

We will be glad to see any feedback from you, so don’t hesitate and write comments under this post. Also, we will answer any of your questions if you have any.

Our crew wishes you a pleasant flight, stay in touch and be sure to try these new marvelous tools.

  • RuDex team

Download RuDex open source desktop application

Support our BLCKCHND witness on Bitshares blockchain, your votes support our work!


Sort:  

Free or subscription cost require?

free

Great i will try using it.. do you have a bot for steemit internal market?

16 hours in and one non-bot comment. Good luck.

That's how Steemit works these days

Not really. Maybe it’s a reflection on the content and the blood bath that is the crypto market right now.

Looks like after the initial buy and sell the bot will auto stop? I was thinking it something we can set to continue buying and selling automatic by setting a profit margin of a %.
E.g
Buy verge at 150 sat
Sell verge at 5% increase. Rinse and repeat
Continuously

How and why should i trust this cos it looks interesting to me @blockchained @rudex

It's open source and free to use

@blockchained purchased a 100.00% vote from @promobot on this post.

*If you disagree with the reward or content of this post you can purchase a reversal of this vote by using our curation interface http://promovotes.com

This post has received a 85.67 % upvote from @boomerang.

Congratulations @blockchained!
Your post was mentioned in the Steemit Hit Parade in the following category:

  • Pending payout - Ranked 7 with $ 157,01

Good tutorial! Are these bots only built into the Rudex GUI or are they on all of the exchanges? Also... Is it better to make your spread smaller in order to hit more gains ? I am guessing this because they have a ref reward for all transactions.! :D