Author Topic: BTSBOTS 重新启动了  (Read 5264 times)

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
测试完之后,建议在“充值/提现”那里加一页,就像巨蟹的那样,或者直接加在巨蟹那页里面,提供所有 btsbots 支持的币种之间的直接兑换服务。
BitShares committee member: abit
BitShares witness: in.abit

Offline btstip

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
  • BitShares: btstip-io
Hey ebit, here are the results of your tips...
  • alt: has been credited 1 ROSE
Curious about ShareBits? Visit us at http://sharebits.io and start tipping BTS on https://bitsharestalk.org/ today!
Created by hybridd

Offline ebit

  • Committee member
  • Hero Member
  • *
  • Posts: 1905
    • View Profile
  • BitShares: ebit
#sharebits alt 1 ROSE
telegram:ebit521
https://weibo.com/ebiter

Offline 当年很厉害

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
BTS粉里有SB!

Offline kinglaw0577

  • Full Member
  • ***
  • Posts: 95
    • View Profile
    • BitShares Richlist
☆bitshares Richlist富豪榜 http://richlist.btsabc.org
☆BTSABC wallet online比特帝国在线钱包 https://bit.btsabc.org

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
手续费成本怎么样
下单手续费吗?现在是10BTS每单,如果是VIP用户,成本是2BTS。如果下单没成交,取消好像会返回,这点还不确认。
下单频率可以调整的,threshold 参数设为 0.01,价格偏离超过0.01 才重新下单,代码中做了很多滤波算法处理过滤无必要的频繁下单
不管是不是“VIP用户”,下单手续费10BTS,撤单全额返还。
全额成交或者部分成交手续费不详。
BitShares committee member: abit
BitShares witness: in.abit

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
手续费成本怎么样
下单手续费吗?现在是10BTS每单,如果是VIP用户,成本是2BTS。如果下单没成交,取消好像会返回,这点还不确认。
下单频率可以调整的,threshold 参数设为 0.01,价格偏离超过0.01 才重新下单,代码中做了很多滤波算法处理过滤无必要的频繁下单

Offline huafei

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
手续费成本怎么样

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
帐号exchange.btsbots 在市场 BOTSCNY/BTS 测试
有兴趣的可以围观
这是当前正在使用的相关配置文件
config.json
Code: [Select]
{
    "account": "exchange.btsbots",
    "cli_wallet": {
        "host" : "localhost",
        "port" : 9092,
        "rpc_user" : "",
        "rpc_passwd" : "",
        "wallet_unlock" : ""
    },
    "addition_spread": 0.01,
    "threshold": 0.01,
    "price_factor": {
        "CNY": 1.0,
        "BTS": 1.00,
        "USD": 1.05
    }
}
profile.json
Code: [Select]
{
    "quota_in_usd": 50,
    "market": [
        ["BTS", "BOTSCNY"]
        ],
    "asset": {
        "BTS": {
            "weight": 8.0,
            "spread": [0.007, 0.12]
        },
        "BOTSCNY": {
            "weight": 4.0,
            "spread": [0.005, 0.1]
        },
        "CNY": {
            "weight": 2.0,
            "spread": [0.005, 0.1]
        },
        "USD": {
            "weight": 2.0,
            "spread": [0.005, 0.1]
        },
        "GOLD": {
            "weight": 1.0,
            "spread": [0.005, 0.1]
        },
        "SILVER": {
            "weight": 1.0,
            "spread": [0.005, 0.1]
        }
    }
}

Offline wuxuqiang

  • Sr. Member
  • ****
  • Posts: 377
    • View Profile
    • 比特股中文网
  • BitShares: web1024
我是"比特股中文网"站长:吴序强  欢迎光临我们大家的网站:http://www.BtsABC.org   比特股网页钱包(帝国版):https://bit.btsabc.org

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
这个交易机器人是用来提供做市服务的。
首先从各个交易所获取的交易信息,分析得到当前最合适的买价/卖价。
然后根据个人设置的资产权重等参数,从资产占比情况,得到一个买卖价格的溢价。
最后根据个人本地设置的额外溢价,以及额外的价格比率,计算得到用户期望的买/卖价

在测试期间,建议账户内余额放少一点,以免造成经济损失。

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
这次对整个架构做了全新的设计,可以提供交易机器人服务,使用步骤如下:
1. 需要在 linux 下运行一个 cli_wallet,并导入交易帐号(以后可以省略这一布,不需要安装任何钱包)
2. 安装 btsbots 客户端:
Code: [Select]
pip3 install btsbots --upgrade
配置 config.json 文件,指定钱包API地址等信息,可参考以下链接:
https://github.com/pch957/btsbots/blob/master/config-example.json
以下信息和交易有关,其中 addition_spread 是本地配置的一个额外的价格调整,
threshold 决定了价格偏离重下单的阈值
price_factor 是自己定义的锚定参数,比如美元你可以设定为 1.05~1.1 比较合适

Code: [Select]
    "addition_spread": 0.005,
    "threshold": 0.01,
    "price_factor": {
        "CNY": 1.0,
        "USD": 1.05
    }

3. 启动机器人,可以查看交互信息
Code: [Select]
btsbots --config config.json run_trade
4. 需要充值才能激活使用,测试阶段不收成交手续费,每个市场每天收费1美元,可接受所有锚定资产,按市价换算成美元计算。
再开一个终端,运行以下命令,在上面的交易机器人终端可以看到充值反馈信息。
Code: [Select]
btsbots --config config.json recharge 1 USD
5. 充值完后还无法交易,需要上传自己的交易信息。
配置 profile.json 文件,参考以下链接
https://github.com/pch957/btsbots/blob/master/profile-example.json
"quota_in_usd" 配置了每单最大下单限额,按美元计价
market 中配置的是自己要交易的市场,支持所有锚定资产及BOTSCNY, TRADE.BTC, OPENBTC, METAEX.BTC
market 中涉及的资产,必须在 "asset"项中配置,主要配置资产占比权重,以及两个 spread 值。
比如 [0.005, 0.08] 的意思是, 当资产占比和权重正好匹配时,按(1+ 0.005) 的价格溢价卖,当资产占比趋于0的时候,按 (1+0.08)溢价卖
Code: [Select]
{
    "quota_in_usd": 100,
    "market": [
        ["BTS", "TCNY"],
        ["BTS", "USD"]
        ],
    "asset": {
        "BTS": {
            "weight": 3.0,
            "spread": [0.007, 0.12]
        },
        "TCNY": {
            "weight": 1.0,
            "spread": [0.005, 0.08]
        },
        "USD": {
            "weight": 1.0,
            "spread": [0.005, 0.1]
        }
    }
}
配置完后,运行以下命令上传配置文件
Code: [Select]
btsbots --config config.json --profile profile.json update_profile
当上传完毕后,回到交易客户端,可以看到相关信息,正常情况就会开始下单了