question

Upvotes
Accepted
46 2 1 3

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

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?

rest-apiredi-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
46 2 1 3

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea