how do i create the limit order(ticket) from API?

Options

I tried to set the limit ordey by using

ORDER hOrder = new ORDER();

hOrder.PriceType = "limit";

hOrder.Price = "110.20";

but after submitted successfully, I checked in REDI UI, it shows price desc as "MKT".

but when i created from REDI UI, it shows price desc as "LMT 112.20".

Is that something I am missing from API side?

Tagged:

Best Answer

  • JManoharan
    JManoharan Explorer
    Answer ✓

    Found the answer. I need to set limit price after set the exchange in code. like this

    ptOrder.Exchange = "*ticket"; //PT is a bunch of tickets

    if (limit > 0) ptOrder.Price = limit; //ptOrder.Exchange must be set before ptOrder.Price (otherwise this will be ignored)

    It works as expected