API Support Forum
OEC API > API Support > Question on Rejected Comment: "Order breaks limits."
Author Topic: Question on Rejected Comment: "Order breaks limits."
(6 messages, Page 1 of 1)
Moderators: VPfau
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: May 02, 2012 @ 09:22 PM             Msg. 1 of 6
What does this mean?

See image for trade details:
http://img194.imageshack.us/img194/6488/orderbl.jpg

John Gagnon
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: May 03, 2012 @ 01:47 AM             Msg. 2 of 6
I got it again last night right after I posted this for OECID: 202300715

John Gagnon
VictorV
Posts: 746
Joined: May 08, 2007


Posted: May 03, 2012 @ 08:53 AM             Msg. 3 of 6
There was a risk violation: "API001498 Max credit = $3,622.57, Order requires $7,087.50 and needs additional credit of ($3,464.93). Cash and credit balance $35,435.07. (Max $35,435.07 | Used $31,812.50)"

You can hook to http://www.openecry.com/api/api/OEC.API.OECClient.OnError.html to catch such messages

Victor Vins
Lead Software Developer
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: May 11, 2012 @ 03:03 PM             Msg. 4 of 6
Thanks Victor.

I have a follow up question.

We have been seeing this error again today. We exited all positions prior to when markets closed around 5PM EST. We noticed our Realized P/L and Total P/L values did not reset when markets opened back up at 6PM EST. Is this by design?

It appears we continue to get "Order breaks limits." rejected trades due to the high Realized P/L values. I would think these values would get reset to 0 on a new market day.

If you could help us understand what is happening here or let us know if it is a bug on your end we would appreciate it.

Regards,
-John

John Gagnon
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: May 11, 2012 @ 03:15 PM             Msg. 5 of 6
For example for trade:

6EM2
OECId: 202309119

DateTime: 5/11/2012 21:32:38.369
COMMAND CREATE Sell 3 6EM2 STP 129.10 LMT 129.08

DateTime: 5/11/2012 21:32:38.388
STATE REJECTED "Order breaks limits."

I believe we had no other 6EM2 trades working at this point, but the trade was rejected to the high Realized P/L and Total P/L recorded from the day previous (prior to 5PM EST close).

Thanks.

John Gagnon
VictorV
Posts: 746
Joined: May 08, 2007


Posted: May 11, 2012 @ 03:31 PM             Msg. 6 of 6
John, there was a bunch unexpired day orders from April that tied margin in your account. I removed them, please try again.

Victor Vins
Lead Software Developer