Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

State of an order refused by server
 Post subject: State of an order refused by server Post rating: 0   New post Posted: Tue 03 Aug, 2010, 00:08 

User rating: 0
Joined: Fri 25 Jun, 2010, 12:48
Posts: 12
Hello,

I wanna know what is the state of an order that has been refused by the platform ? (like an order passed during the weekend)
It does not seems to be the CANCELED state.

Thanks for any help.


 
 Post subject: Re: State of an order refused by server Post rating: 0   New post Posted: Tue 03 Aug, 2010, 07:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,
it depends from your action. If you where trying to submit an order and it was rejected, then state will be CANCELED. If you where trying to close a filled order and it was rejected, then state will be FILLED.


 
 Post subject: Re: State of an order refused by server Post rating: 0   New post Posted: Tue 03 Aug, 2010, 13:35 

User rating: 0
Joined: Fri 25 Jun, 2010, 12:48
Posts: 12
Mmmh does not seems to help.

I have the following snippet of code :
if (order.getState() != IOrder.State.FILLED && order.getState() != IOrder.State.CANCELED && order.getState() != IOrder.State.CLOSED){
            order.close();
}


But I'm getting this error :
 JFException: Cannot close order in CLOSED or CANCELED state 


Does not seems to be very logic...


 
 Post subject: Re: State of an order refused by server Post rating: 0   New post Posted: Tue 10 Aug, 2010, 09:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Thanks for your attention. We will investigate this.


 
 Post subject: Re: State of an order refused by server Post rating: 0   New post Posted: Thu 15 Sep, 2011, 17:40 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
API Support wrote:
Hello,
it depends from your action. If you where trying to submit an order and it was rejected, then state will be CANCELED. If you where trying to close a filled order and it was rejected, then state will be FILLED.

Hello support,

Based on https://www.dukascopy.com/wiki/images/8/ ... iagram.pdf (at the upper right corner) its seems that if a created order which was rejected by the server (onMessage ORDER_SUBMIT_REJECTED) remains in state CREATED instead of changing to state CANCELED.
Can you please clarify this ?

Best regards
AbsoluteReturner


 
 Post subject: Re: State of an order refused by server Post rating: 0   New post Posted: Fri 16 Sep, 2011, 15:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
AbsoluteReturner wrote:
Based on https://www.dukascopy.com/wiki/images/8/ ... iagram.pdf (at the upper right corner) its seems that if a created order which was rejected by the server (onMessage ORDER_SUBMIT_REJECTED) remains in state CREATED instead of changing to state CANCELED.
Can you please clarify this ?
That was a mistake in the diagram, please find renewed versions of the diagrams here:
https://www.dukascopy.com/wiki/images/1/ ... agram2.pdf
https://www.dukascopy.com/wiki/images/0/ ... agram2.pdf


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com