StellarBot 使用教程 by ety001

View this thread on steempeak.com
· @ety001 · (edited)
$96.43
StellarBot 使用教程
> 前记:写教程对我来说一直都是很痛苦的事情,所以一直各种拖延。

[StellarBot](https://stellarbot.top) 是我开发的一个开源做市机器人。机器人的逻辑很简单,就是低买高卖。在开始教程前,先提前熟悉一下以下在程序中出现的核心词:

* 基础资产 (base asset)
* 买入比 (buy rate)
* 对手资产 (counter asset)
* 卖出比 (sell rate)

除了这四个核心词以外,就是 **注意一下所有的计算都是以 XLM 为单位的**。

*建议新生成一个试验账户来跑机器人,而不是直接用你的主账户。*

## 教程部分

1.打开你的 *Stellar* 钱包(这里我使用的是 [Stellar Desktop Client](https://wallet.stellar.chat/)),找到你钱包的私钥。

![](https://steemitimages.com/DQme9xqh9UqYms6yvENKhbY9D8hBRna8YgP5WNT1vqwFCK6/image.png)

2.复制你的私钥,打开机器人的配置界面,添加保存。(注意:机器人 **只会明文保存** 你的私钥在你的浏览器里面,**不会发送给任何人任何地方** 。但是你依然 **需要保证你的电脑是安全的** ,不会被别人使用。)

![1.gif](https://steemitimages.com/DQmXQHFgyZMdnKviiYxQE6gmYh1RTwBJiZADRjUyt56nA45/1.gif)

当看到显示出你的钱包地址,以及你的 *XLM* 余额后,就意味着添加成功了。

3.添加信任网关和货币

![2.gif](https://steemitimages.com/DQmXe95PBdsZzM7oLy8xeiCQG8jzQBYLZoRTre15DbseGuQ/2.gif)

4.修改货币的最大持有量

![3.gif](https://steemitimages.com/DQmXcuusN7KeonS6dLroXm4SCRc8PxEZYMSXyq6hGa5ucgc/3.gif)

5.删除网关(前提需要该网关下的货币为0才能删除)

![4.gif](https://steemitimages.com/DQmaU3fz5aQRJEd6CGaTDhDnf5bDPfALJYATNKuR6CbMMLd/4.gif)

6.增加机器人交易对(只有添加了交易对后,机器人启动后才会工作)

![5.gif](https://steemitimages.com/DQmW7h5csjntPex1CkdVNEig9S83d7UfKAHXYGdYoHeXT3c/5.gif)

7.配置交易对参数(这里是核心)

![6.gif](https://steemitimages.com/DQmWLesd6BpxgSZzvkrUz66JZpW87c6AvR8UBqEt2teqQaK/6.gif)

机器人的交易逻辑就是按照下面的公式计算买单价格:


> 买单价格 = 当前最高买价 * (1 - `买入比 (buy rate)` /100)


买入 `基础资产 (base asset)` 的数量,是按照 `价值(XLM)` 来计算的,比如你的 `基础资产 (base asset)` 是 `XLM`,那么你的买入数量就是 `价值(XLM)`。如果 `基础资产 (base asset)` 是非 `XLM` 货币,那么将会按照该货币兑 `XLM` 的价格和 `价值(XLM)` 来计算出应该买入多少该货币。

机器人下卖单的逻辑跟下买单差不多,卖单价格公式:

> 卖单价格 = 当前最低卖价 * ( 1 + `卖出比 (sell rate)` / 100)

卖出 `基础资产 (base asset)` 的数量,也是按照 `价值(XLM)` 来计算的。

8.删除交易对

![7.gif](https://steemitimages.com/DQmYUv8eB1XRN1p3cVLAxmSwPHhfBqz3eVCt7SYpjqCtWbq/7.gif)

9.启动机器人,开始交易。启动后,请保持浏览器打开,电脑不要自动休眠。**请一定注意电脑不会被其他人使用,因为你的私钥是明文存储在浏览器里的!!!!**

![9.gif](https://steemitimages.com/DQmXAyV7P8uUJ71qRdK3tTRQKBjN5686r7goDNT5MRk6LJk/9.gif)

10.如果想查看交易对的交易信息,可以在页面下部选择对应的交易对查看。

![8.gif](https://steemitimages.com/DQmNnn9QgGRqKe3T33amdXKu4vEHjUEetq5wmv9ERf786Hu/8.gif)

---
---

## 问题反馈

* 可以到这里提 [issue](https://github.com/ety001/stellar-bot/issues)
* 可以发问题邮件到 work#domyself.me (把#换成@)
* 可以在这里留言
* 到 [Telegram Group](https://t.me/joinchat/EGkaWhMSOna0dEKULvA8FA) @ety001 。

#### 不接受QQ或者微信,因为聊天记录不利于归档,谢谢。


---
---

**感谢你的阅读,我是中文区见证人之一,欢迎通过 [SteemConnect](https://v2.steemconnect.com/sign/account-witness-vote?witness=ety001&approve=1) 来给我投票,或者打开 <https://steemit.com/~witnesses> 页面,输入 *ety001* 进行投票。**

![2.gif](https://steemitimages.com/DQmZfJo3F8NXpFx7nenQA3zTU9jg6YoRQvfyeeHgSYpdqr4/2.gif)

**中文区的见证人目前有:**
支持一下他们(按字母顺序),*一人可以有30票*:
- @abit | [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=abit)
- @bobdos| [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=bobdos)
- @ety001| [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=ety001)
- @justyy |[投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy)
- @skenan |[投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=skenan)

---

**Thank you for reading.  I'm a witness. I would really appreciate your witness vote! You can vote by [SteemConnect](https://v2.steemconnect.com/sign/account-witness-vote?witness=ety001&approve=1). Or open <https://steemit.com/~witnesses> page, input *ety001* to vote.**

![2.gif](https://steemitimages.com/DQmZfJo3F8NXpFx7nenQA3zTU9jg6YoRQvfyeeHgSYpdqr4/2.gif)
👍  , , , , , , , , , , , , , , , , , , , , , , , , ,
👎  
properties (23)
post_id39,177,085
authorety001
permlinkstellarbot
categorycn
json_metadata"{"format": "markdown", "links": ["https://stellarbot.top", "https://wallet.stellar.chat/", "https://github.com/ety001/stellar-bot/issues", "https://t.me/joinchat/EGkaWhMSOna0dEKULvA8FA", "https://v2.steemconnect.com/sign/account-witness-vote?witness=ety001&approve=1", "https://steemit.com/~witnesses", "https://steemconnect.com/sign/account_witness_vote?approve=1&witness=abit", "https://steemconnect.com/sign/account_witness_vote?approve=1&witness=bobdos", "https://steemconnect.com/sign/account_witness_vote?approve=1&witness=ety001", "https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy", "https://steemconnect.com/sign/account_witness_vote?approve=1&witness=skenan"], "app": "steemit/0.1", "tags": ["cn", "stellar-bot", "cn-dev", "cn-programming", "programming"], "users": ["ety001", "abit", "bobdos", "justyy", "skenan"], "image": ["https://steemitimages.com/DQme9xqh9UqYms6yvENKhbY9D8hBRna8YgP5WNT1vqwFCK6/image.png"]}"
created2018-03-18 03:47:00
last_update2018-03-19 15:46:54
depth0
children7
net_rshares28,350,025,614,630
last_payout2018-03-25 03:47:00
cashout_time1969-12-31 23:59:59
total_payout_value72.880 SBD
curator_payout_value23.549 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,459
author_reputation190,546,071,796,324
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (27)
@cha0s0000 ·
膜拜
properties (22)
post_id39,179,609
authorcha0s0000
permlinkre-ety001-stellarbot-20180318t041144459z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-18 04:11:45
last_update2018-03-18 04:11:45
depth1
children0
net_rshares0
last_payout2018-03-25 04:11:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2
author_reputation30,982,118,529,863
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@maiyude ·
膜拜
properties (22)
post_id39,193,837
authormaiyude
permlinkre-ety001-stellarbot-20180318t063430423z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-18 06:34:33
last_update2018-03-18 06:34:33
depth1
children0
net_rshares0
last_payout2018-03-25 06:34:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2
author_reputation21,161,943,744,615
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@oflyhigh ·
这个了不起!
properties (22)
post_id39,196,915
authoroflyhigh
permlinkre-ety001-stellarbot-20180318t070421995z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-18 07:04:24
last_update2018-03-18 07:04:24
depth1
children0
net_rshares0
last_payout2018-03-25 07:04:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length6
author_reputation1,148,153,621,496,884
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@lemooljiang ·
$1.67
不明觉厉!
👍  ,
properties (23)
post_id39,246,986
authorlemooljiang
permlinkre-ety001-stellarbot-20180318t140901071z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-18 14:08:57
last_update2018-03-18 14:08:57
depth1
children0
net_rshares496,807,906,037
last_payout2018-03-25 14:08:57
cashout_time1969-12-31 23:59:59
total_payout_value1.256 SBD
curator_payout_value0.415 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length5
author_reputation263,700,595,848,611
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@facai ·
膜拜
properties (22)
post_id39,342,168
authorfacai
permlinkre-ety001-stellarbot-20180319t025547522z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-19 02:55:48
last_update2018-03-19 02:55:48
depth1
children0
net_rshares0
last_payout2018-03-26 02:55:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2
author_reputation85,769,589,859
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@sailei1 ·
这个好,省事不浪费时间
properties (22)
post_id39,443,019
authorsailei1
permlinkre-ety001-stellarbot-20180319t154447823z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-19 15:44:51
last_update2018-03-19 15:44:51
depth1
children0
net_rshares0
last_payout2018-03-26 15:44:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length11
author_reputation344,085,733,826
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@xtk ·
厉害了我的哥
properties (22)
post_id39,443,057
authorxtk
permlinkre-ety001-stellarbot-20180319t154458844z
categorycn
json_metadata"{"app": "steemit/0.1", "tags": ["cn"]}"
created2018-03-19 15:45:03
last_update2018-03-19 15:45:03
depth1
children0
net_rshares0
last_payout2018-03-26 15:45:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length6
author_reputation0
root_title"StellarBot 使用教程"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000