Loading ...

How to set execInst on exchange.Sell?

Author: gmgphil, Created: 2019-02-10 07:02:42, Updated:

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


More

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");

小小梦 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.

小小梦 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.

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");