question

Upvotes
Accepted
46 2 1 5

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 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
46 2 1 5

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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