交易所工具技术架构

 

订单消息队列分类 (2018-11-08)

Name

desc



queue_order

网站SPOT下订单

策略/平台 -> 下单服务

queue_order_callback

网站SPOT订单完成状态

下单服务 -> 平台

queue_strategy_instance

策略实例创建(暂时不做)

平台 -> 策略服务

queue_strategy_order_callback

策略SPOT下订单完成状态(修改订单状态,推送给策略服务)

下单服务 -> 策略服务

queue_strategy_orderinfo_callback

策略SPOT订单完成状态更新,给策略服务

定时任务器 -> 策略服务

 

传输协议

Name

message

queue_order

下单

{"createDate":1542027435937,"data":{"accountType":"spot","amount":"1","exchange":"huobi","instanceId":1,"price":"0.1250","symbol":"htusdt","type":"buy-limit","userName":"ACCF8C7128BD245816773ED78DD27A49DB42DF83C96DFDE3511333FF7BE848C6FEC"},"type":"CreateOrderRequest"}

 

 

取消订单

{"createDate":1542029904474,"data":{"exchange":"huobi","instanceId":1,"orderIds":["16543271475"],"type":"canceled","userName":"ACCF8C7128BD245816773ED78DD27A49DB42DF83C96DFDE3511333FF7BE848C6FEC"},"type":"CancelOrderRequest"}

queue_order_callback

 

queue_strategy_instance

 

queue_strategy_order_callback

下单返回状态

{"createDate":1542029795905,"data":{"accountId":0,"accountType":"spot","amount":"1","canceledDate":0,"createDate":1542029795905,"exchange":"huobi","fieldAmount":"0","fieldFees":"0","finishedDate":0,"instanceId":1,"orderId":16543298105,"price":"0.1250","source":"api","status":"submitted","symbol":"htusdt","type":"buy-limit","userName":"ACCF8C7128BD245816773ED78DD27A49DB42DF83C96DFDE3511333FF7BE848C6FEC"},"type":"OrderResponse"}

 

取消订单返回状态

{"createDate":1542029904808,"data":{"exchange":"huobi","instanceId":1,"orderIds":["16543271475"],"type":"canceled","userName":"ACCF8C7128BD245816773ED78DD27A49DB42DF83C96DFDE3511333FF7BE848C6FEC"},"type":"CancelOrderResponse"}

 

 

 

2、模块分类 (2018-11-12)

  • 交易策略
  • 交易所通用
  • 交易下单
  • 用户管理
  • 下单队列
  • websocket行情

你可能感兴趣的:(区块链)