Type/to search
0
Follow
0
Followers
How to set execInst on exchange.Sell?
Help
Created 2019-02-10 07:02:42  
 4
 1779

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

Related Recommendations
Comment
All comments (4)

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

    7 years ago

    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.

    7 years ago

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

    7 years ago

    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.

    7 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)