Loading ...

关于如何在BitMEX挂仅被动成交做市单和批量下单(IO范例)

Author: botvsing, Created: 2019-04-17 15:46:32, Updated: 2019-04-19 15:25:48

使用IO函数,具体参数参考BitMEX文档:https://www.fmz.com/bbs-topic/3666

做市单(仅被动成交)

var id = exchange.IO("api", "POST", "/api/v1/order", "symbol=XBTUSD&side=Buy&orderQty=1&price=5000&execInst=ParticipateDoNotInitiate")

批量挂单

var bulk = []
bulk.push({symbol:'XBTUSD', side:'Buy', orderQty:100, price:5000, execInst:'ParticipateDoNotInitiate'})
bulk.push({symbol:'XBTUSD', side:'Buy', orderQty:200, price:5100, execInst:'ParticipateDoNotInitiate'})
var param = "orders=" + JSON.stringify(bulk)
var ids = exchange.IO("api", "POST", "/api/v1/order/bulk", param)
Log(ids)

撤销所有订单

exchange.IO("api","DELETE","/api/v1/order/all","symbol=XBTUSD")

Related

More