fmex pending mining

Recently fmex pending order on-line mining for lodging wrote a program, "follow Handicap avoid turnover," 0 pull out the cost of wool.

Code https://github.com/xiaoxiaoleo/fmexminer

Instructions:

Configure the API KEY FMEX

  1. The setting folder are copied to the $ HOME directory and configure your API KEY in setting / fmex_test.json inside
{
        "ID": "这里填key",
        "Secret": "这里填secret"

}

Switch to a production environment, edit fmex_guadan.py

    conn_setting = {
        "会话数": 3,
        "服务器": "REAL", #REAL是生产环境 TESTNET是测试环境
        "代理地址": "",
        "代理端口": '',
        "symbols":symbol
    }

Pending configuration parameters

  • According to their needs change fmex_guadan.py

        "volume": 900,                  #一笔挂单量,单位USD
        "interval":2,                   #每隔多少秒循环一次挂单函数
        "minimum_distance": 40,         #离盘口的最小距离,单位USD
        "guadan_max_count": 15,         #单方向挂单最大数量
  • * Guadan_max_count setting range 15-25, that is to say the total amount of almost lodging, minimum_distance depending on market fluctuations are not so big about 30-50, usually about 35 to, volume bigger the better, interval of about two seconds, no problem. The program object is to avoid the pending transaction, it does not automatically process the project position code.
  • * This program is based vnpy frame, all logic in fmexminer / vnpy / app / fmex_miner_guadan / engine.py file.

run

  • python3.7 fmex_guadan.py

After lodging the program is closed, due to the pending order more, you can execute the program to clean up the order to cancel all pending orders.

  • python3.7 fmex_clean_order.py

Guess you like

Origin www.cnblogs.com/xiaoxiaoleo/p/11797477.html