create account

πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop by blockchained

View this thread on: hive.blogpeakd.comecency.com
· @blockchained · (edited)
$181.34
πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop
![](https://cdn.steemitimages.com/DQmPawrrwFhG9Xmkbsv2hcxhV2xHC8UszoHfEhXiHNU9qzp/image.png)

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

https://youtu.be/NAgqtjWbQyA

## 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

https://youtu.be/eVe5D-MsKDw

## 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

---

# <center>[Download RuDex open source desktop application](https://github.com/blckchnd/rudex-ui/releases)<center>

---

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

---



<center>[![](https://steemitimages.com/0x0/https://steemit-production-imageproxy-thumbnail.s3.amazonaws.com/DQmfUWRwgN5eapYHZxWybXwqSu659KQ2Ld6TpdrKqVfAek2_1680x8400)](https://market.rudex.org)</center>
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 119 others
properties (23)
authorblockchained
permlinkannouncement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop
categoryblockchain
json_metadata{"tags":["blockchain","bitshares","rudex","bot","dex"],"image":["https://cdn.steemitimages.com/DQmPawrrwFhG9Xmkbsv2hcxhV2xHC8UszoHfEhXiHNU9qzp/image.png","https://img.youtube.com/vi/NAgqtjWbQyA/0.jpg","https://img.youtube.com/vi/eVe5D-MsKDw/0.jpg","https://steemitimages.com/0x0/https://steemit-production-imageproxy-thumbnail.s3.amazonaws.com/DQmfUWRwgN5eapYHZxWybXwqSu659KQ2Ld6TpdrKqVfAek2_1680x8400"],"links":["https://youtu.be/NAgqtjWbQyA","https://youtu.be/eVe5D-MsKDw","https://github.com/blckchnd/rudex-ui/releases","https://market.rudex.org"],"app":"steemit/0.1","format":"markdown"}
created2018-11-21 19:01:27
last_update2018-11-22 15:26:21
depth0
children16
last_payout2018-11-28 19:01:27
cashout_time1969-12-31 23:59:59
total_payout_value136.465 HBD
curator_payout_value44.876 HBD
pending_payout_value0.000 HBD
promoted5.000 HBD
body_length5,901
author_reputation71,574,916,426,158
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,691,086
net_rshares293,463,817,350,855
author_curate_reward""
vote details (183)
@arcange ·
Congratulations @blockchained!
Your post was mentioned in the [Steemit Hit Parade](https://steemit.com/hit-parade/@arcange/daily-hit-parade-20181121) in the following category:

* Pending payout - Ranked 7 with $ 157,01
properties (22)
authorarcange
permlinkre-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181121t174012000z
categoryblockchain
json_metadata""
created2018-11-22 16:40:36
last_update2018-11-22 16:40:36
depth1
children0
last_payout2018-11-29 16:40:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length220
author_reputation1,146,631,502,104,474
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,741,935
net_rshares0
@boomerang ·
This post has received a 85.67 % upvote from @boomerang.
properties (22)
authorboomerang
permlinkre-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t010206
categoryblockchain
json_metadata""
created2018-11-22 01:02:06
last_update2018-11-22 01:02:06
depth1
children0
last_payout2018-11-29 01:02:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation1,273,205,827,891
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,704,203
net_rshares0
@christoryan ·
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
properties (22)
authorchristoryan
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20190215t080422057z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2019-02-15 08:04:21
last_update2019-02-15 08:04:21
depth1
children0
last_payout2019-02-22 08:04:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length250
author_reputation4,253,059,677,623
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,893,888
net_rshares0
@fliteboardeox ·
intresting
properties (22)
authorfliteboardeox
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t120240856z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-22 12:02:42
last_update2018-11-22 12:02:42
depth1
children0
last_payout2018-11-29 12:02:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation211,416,169
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id75,727,531
net_rshares0
@kfantox ·
How and why should i trust this cos it looks interesting to me @blockchained @rudex
πŸ‘  
properties (23)
authorkfantox
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t013706940z
categoryblockchain
json_metadata{"tags":["blockchain"],"users":["blockchained","rudex"],"app":"steemit/0.1"}
created2018-11-22 01:37:21
last_update2018-11-22 01:37:21
depth1
children1
last_payout2018-11-29 01:37:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length83
author_reputation77,122,080,274
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,705,387
net_rshares573,324,711
author_curate_reward""
vote details (1)
@blockchained ·
It's open source and free to use
properties (22)
authorblockchained
permlinkre-kfantox-re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t122612258z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 12:26:12
last_update2018-11-23 12:26:12
depth2
children0
last_payout2018-11-30 12:26:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation71,574,916,426,158
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,782,223
net_rshares0
@kypo ·
Bots are useful
πŸ‘Ž  
properties (23)
authorkypo
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t093106613z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 09:31:27
last_update2018-11-23 09:31:27
depth1
children0
last_payout2018-11-30 09:31:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length15
author_reputation58,899,995,509,053
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,776,511
net_rshares-9,951,094,876
author_curate_reward""
vote details (1)
@mazzle ·
$0.05
16 hours in and one non-bot comment. Good luck.
πŸ‘  
properties (23)
authormazzle
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t112343123z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-22 11:23:42
last_update2018-11-22 11:23:42
depth1
children2
last_payout2018-11-29 11:23:42
cashout_time1969-12-31 23:59:59
total_payout_value0.036 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length47
author_reputation24,508,902,114,236
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,725,819
net_rshares77,179,971,017
author_curate_reward""
vote details (1)
@skreza ·
$0.16
That's how Steemit works these days
πŸ‘  ,
properties (23)
authorskreza
permlinkre-mazzle-re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t022137176z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 02:21:42
last_update2018-11-23 02:21:42
depth2
children1
last_payout2018-11-30 02:21:42
cashout_time1969-12-31 23:59:59
total_payout_value0.122 HBD
curator_payout_value0.040 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length35
author_reputation12,357,028,398,386
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,763,140
net_rshares265,702,981,001
author_curate_reward""
vote details (2)
@mazzle ·
Not really. Maybe it’s a reflection on the content and the blood bath that is the crypto market right now.
properties (22)
authormazzle
permlinkre-skreza-re-mazzle-re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t033202911z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 03:32:03
last_update2018-11-23 03:32:03
depth3
children0
last_payout2018-11-30 03:32:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length106
author_reputation24,508,902,114,236
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,765,369
net_rshares0
@promobot ·
re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t004534990z
@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
properties (22)
authorpromobot
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t004534990z
categoryblockchain
json_metadata{"app":"postpromoter/2.0.0"}
created2018-11-22 00:45:39
last_update2018-11-22 00:45:39
depth1
children0
last_payout2018-11-29 00:45:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length221
author_reputation9,020,628,089,607
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,703,661
net_rshares0
@rexusmo ·
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
πŸ‘  
properties (23)
authorrexusmo
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t223042278z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 22:30:48
last_update2018-11-23 22:30:48
depth1
children0
last_payout2018-11-30 22:30:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length264
author_reputation23,656,950,019,305
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,806,530
net_rshares20,099,780,180
author_curate_reward""
vote details (1)
@skreza ·
$0.16
Free or subscription cost require?
πŸ‘  , ,
properties (23)
authorskreza
permlinkre-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t022102873z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 02:21:06
last_update2018-11-23 02:21:06
depth1
children2
last_payout2018-11-30 02:21:06
cashout_time1969-12-31 23:59:59
total_payout_value0.119 HBD
curator_payout_value0.039 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length34
author_reputation12,357,028,398,386
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,763,122
net_rshares260,419,859,343
author_curate_reward""
vote details (3)
@blockchained ·
free
properties (22)
authorblockchained
permlinkre-skreza-re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181123t122124962z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-23 12:21:27
last_update2018-11-23 12:21:27
depth2
children1
last_payout2018-11-30 12:21:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation71,574,916,426,158
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,782,020
net_rshares0
@skreza ·
$0.12
Great i will try using it.. do you have a bot for steemit internal market?
πŸ‘  
properties (23)
authorskreza
permlinkre-blockchained-re-skreza-re-blockchained-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181124t115400808z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2018-11-24 11:54:06
last_update2018-11-24 11:54:06
depth3
children0
last_payout2018-12-01 11:54:06
cashout_time1969-12-31 23:59:59
total_payout_value0.117 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length74
author_reputation12,357,028,398,386
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,830,229
net_rshares249,768,826,399
author_curate_reward""
vote details (1)
@tts ·
To listen to the audio version of this article click on the play image.
[![](https://s18.postimg.org/51o0kpijd/play200x46.png)](http://ec2-52-72-169-104.compute-1.amazonaws.com/blockchained__announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop.mp3)
Brought to you by [@tts](https://steemit.com/tts/@tts/introduction). If you find it useful please consider upvoting this reply.
properties (22)
authortts
permlinkre-announcement-of-a-public-trading-bots-from-rudex-spreadtrade-and-trailingstop-20181122t012236
categoryblockchain
json_metadata""
created2018-11-22 01:22:36
last_update2018-11-22 01:22:36
depth1
children0
last_payout2018-11-29 01:22:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length401
author_reputation-4,535,154,553,995
root_title"πŸ“’ πŸ€– Announcement of a public trading bots from RuDex: SpreadTrade and TrailingStop"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,704,905
net_rshares0