avatar of gmgphil gmgphil
关注 私信
0
关注
0
关注者

How to set execInst on exchange.Sell?

创建于: 2019-02-10 07:02:42, 更新于:
comments   4
hits   1522

function main(){ exchange.SetContractType(“XBTUSD”) exchange.SetDirection(“sell”) exchange.Sell(3600, 20, {‘execInst’: ‘ParticipateDoNotInitiate’}) Sleep(10000) }

Why is this not posted as Postonly, aka ParticipateDoNotInitiate?

Thanks

相关推荐
全部留言
avatar of gmgphil
gmgphil
Thank you, that helped so far. But how to get a variable inside? i tryed alot already: exchange.IO("api","POST","/api/v1/order","symbol=XBTUSD&side=Sell&orderQty=//HOWTOGETVARHERE//&price=//HOWTOGETVAR2HERE//&ordType=Limit&execInst=ParticipateDoNotInitiate");
2019-02-12 02:11:23
avatar of 发明者量化-小小梦
发明者量化-小小梦
The function named "exchange.Sell" is called the send limit order for bitmex api . It`s not avaliable by send a json like this "{'execInst': 'ParticipateDoNotInitiate'}" if you want to send a ParticipateDoNotInitiate order , you can used the api named "exchange.IO" directly.
2019-02-11 18:08:43
avatar of 发明者量化-小小梦
发明者量化-小小梦
OK,you are welcome . Which variable do you want use? the order id of exchange.IO return ? i am guessing that you mean the variable "orderQty" and "price". does this api "/api/v1/order" need params or not? It is based on which kinds of order you want send. More information please check the bitmex`s api doc. for example, the market order ,you don't need price parameters.
2019-02-12 11:07:51
avatar of gmgphil
gmgphil
Thank you, that helped so far. But how to get a variable inside? i tryed alot already: exchange.IO("api","POST","/api/v1/order","symbol=XBTUSD&side=Sell&orderQty=//HOWTOGETVARHERE//&price=//HOWTOGETVAR2HERE//&ordType=Limit&execInst=ParticipateDoNotInitiate");
2019-02-12 02:11:39