3
关注
1228
关注者

Make Post-Only order and bulk orders on BitMEX through IO

创建于: 2019-04-18 13:55:58, 更新于: 2019-04-18 13:58:55
comments   0
hits   1852

Make Post-Only order and bulk orders on BieMEX Use IO function,refer to BitMEX doc:https://www.fmz.com/bbs-topic/3666

Post-Only order

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

bulk orders

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)

Cancel all orders

exchange.IO("api","DELETE","/api/v1/order/all","symbol=XBTUSD")
相关推荐
更多内容