Wednesday, June 20, 2018

china futures ctp realtime server docker image description

what
used this docker image,to receive china futures ctp realtime data.

How

1. docker:
docker image see: https://hub.docker.com/r/pkrss/ctp-market/

docker template:
    image: docker.io/pkrss/ctp-market:latest
    environment: (change below values if your need)
      - users.simnow.mdInvesterID="{your account id, liked 065206}"
      - users.simnow.mdInvesterPassword="{your simnow password}"
      - users.simnow.mdBrokerID="9999"
      - users.simnow.mdFrontAddr="tcp://218.202.237.33:10012"
      - users.simnow.mdInvesterPassword="tcp://218.202.237.33:10002"
      - sys_log_filePath=
      - sys_wsSrv_port=8086

2. web socket client:
websocket client docker ip:8086, send json string to regist realtime data:
{"cat": "quote","oper": "realtime", "data", {"stk":"*"}}
you can change * to your want symbol, liked: "rb1809".
After that your can receive multiple realtime data liked:
{"data":{"time":1529452800,"id":"rb1809","name":"螺纹钢1809","price":3911.0,"open":3850.0,"prevClose":3861.0,"close":null,"difVol":0,"vol":4810,"updnPrice":28,"updnPricePer":0.721,"positions":6408,"settlement":3881.0,"prevSettlement":3883.0,"high":3915.0,"low":3845.0,"buy1":3900.0,"sell1":3912.0,"buy1vol":5,"sell1vol":2},"cat":"quote","oper":"realtime"}


Last
Thanks!

Monday, June 11, 2018

bitcoin auto trade software free publish


exchange

i publish one auto trade software for bitcoin encrycoin, it can support below exchange:

i tested: "bitmex.com","hitbtc.com","okex.com","binance.com"

and i not tested but may be supported: "bitmex.com","hitbtc.com","okex.com","huobi.com","bitstamp.net","kraken.com","zb.com","bitfinex.com","binance.com","poloniex.com","coinex.com","bithumb.com","gate.io","bittrex.com","gdax.com","wex.nz","big.one"


download
your can download binary from github: https://github.com/pkrss/autotrader
if your want to get source, can send me 10 eth, then email to me to get the source.

docker
see: https://hub.docker.com/r/pkrss/autotrade/
docker environments list sample:
        - name: accounts_bitmex_apiKey
          value: 'your api key'
        - name: accounts_bitmex_apiSecKey
          value: 'your api secure key'
        - name: accounts_bitmex_exchange
          value: 'bitmex.com'

        - name: conditions_bitmex-simple
          value: '{"type": "simple","target":{"account": "bitmex","currency": "XBT","baseCurrency": "USD"},"parameter":{"leverTradeSide": "buy","leverTrade": true,"vol": 5,"buyPrice": 7649,"sellPrice": 7675}}'

        - name: strategies-product
          value: '{"type":"simple","orderInvalidSeconds":120,"orderSellRetry":false,"intervalSeconds":20,"conditions":["bitmex-simple"]}'

        - name: sys_srvaddr
          value: '0.0.0.0:8080'
        - name: sys_tmp_savePath
          value: '/tmp/data/save/{key}'
above accounts_{accountName}_apiKey, can change or add your self multiple account name.
conditions_{conditionName}, can change or add your self multiple condition name.
strategies-product, can change this child "conditions" value to add your own conditions name.

or direct put environment:
        - name: config_json
          value: {your custom conf/config.json file full content}
above {your custom conf/config.json file full content} can see here

history
20180614 add docker support: https://hub.docker.com/r/pkrss/autotrade/
20180611 github: https://github.com/pkrss/autotrader