|
|
 |

07-07-2009, 03:46 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 23
|
|
|
changes to API
are there going to be any changes made to the API when the new FIFO rules starts on August 1? do we need to do anything with our platform?
|

07-07-2009, 09:36 PM
|
|
Moderator
|
|
Join Date: Jan 2006
Posts: 1,990
|
|
|
If you are a client of FXCM US, and you are using one of the functions that is going to be disallowed for those users (e.g. stops, limits, closing trades by ticket id etc), then yes, you would be required to either adapt your application to not use those functions, or transfer your account out of the US to one of our other entities if you would prefer to keep those functions.
|

07-10-2009, 12:56 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 23
|
|
|
New API
I think you missed the most important part of his questions, will the API change, and when can we get the new API so that we can make the platform compliant with the new rule changes?
|

07-16-2009, 11:30 AM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 23
|
|
|
API changes
When will The new API be released for the changes coming as of august 1?
|

07-16-2009, 11:32 AM
|
|
Moderator
|
|
Join Date: Jan 2006
Posts: 1,990
|
|
|
The current release is compatible. It has OCO support.
|

07-31-2009, 09:59 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 3
|
|
|
Just to make sure that I am on the right track.
The current functions such as:
Market orders and Stop/Limit entry orders.
will continue to function in the same manner after 1 Aug.
Is this correct or do I need to download any new modification to the platform?
Thnx Jess
|

08-04-2009, 06:11 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 4
|
|
|
Hi,
Can any one tell me how to implement OCO order? I cant find any function in Java Trading API which allows me to create OCO order.
Thanks..
Last edited by hytech; 08-04-2009 at 06:13 AM..
|

08-04-2009, 10:08 AM
|
|
Moderator
|
|
Join Date: Jan 2006
Posts: 1,990
|
|
Here is some example code: you can see the full example in QATest.testOCO()
Code:
OrderList ol = new OrderList();
ol.setContingencyType(ContingencyTypeFactory.OCO);
OrderSingle eo = MessageGenerator.generateStopLimitEntry(
null,
aMarketDataSnapshot.getAskClose() + .01150,
OrdTypeFactory.STOP,
mCollateralReport.getAccount(),
mCollateralReport.getQuantity(),
SideFactory.BUY,
"EUR/USD",
"entry order - contingency - stop loss");
ol.addOrder(eo);
mOrderRequests.add(eo.getSecondaryClOrdID());
eo = MessageGenerator.generateStopLimitEntry(
null,
aMarketDataSnapshot.getAskClose() - .01150,
OrdTypeFactory.LIMIT,
mCollateralReport.getAccount(),
mCollateralReport.getQuantity(),
SideFactory.BUY,
"EUR/USD",
"entry order - contingency - limit profit");
ol.addOrder(eo);
mOrderRequests.add(eo.getSecondaryClOrdID());
try {
mRequestId = mFxcmGateway.sendMessage(ol);
System.out.println("client: submitting OCO order = " + mRequestId);
} catch (Exception e) {
e.printStackTrace();
}
|

08-05-2009, 09:48 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 4
|
|
|
Thanks for quick reply.
It appears that FXCM Trading Station(FTS) has not implemented OCO orders this way.In case of FTS, my observation says whole logic for OCO orders has been written in FTS not in server end.
The fact is that when you create OCO order in FTS , FTS just replaces those entry orders with same entry orders values and create some logical relationship between those. Upon execution on one of entry orders, all related entry orders are canceled.
I just want to know if I am correct or not. If I am not right , please put some light as to how FTS has implemented OCO orders.
waiting for your reply.
Thanks.
|

08-05-2009, 09:53 AM
|
|
Moderator
|
|
Join Date: Jan 2006
Posts: 1,990
|
|
|
no that is not correct.
|

08-06-2009, 01:02 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 4
|
|
Quote:
Originally Posted by FXCM Help
no that is not correct.
|
Thanks moderator.
where am I missing ? Please put some explainations on this . FXCM Server responses say that entry orders are just replaced when FXCM Trading Station (FTS) creates OCO orders and when one of them executes , all related entry orders are canceled.
Now If I am wrong means FXCM Server is not giving the accurate information in case of OCO orders.
Please help me to implement OCO orders as FTS has implemented it.
|

08-06-2009, 10:30 AM
|
|
Moderator
|
|
Join Date: Jan 2006
Posts: 1,990
|
|
|
If you are wondering how to move an entry order in or out of an OCO group you can use OrderCancelReplaceRequest.
To move an existing entry order to a new OCO group:
OrderCancelReplaceRequest ocrr = MessageGenerator.generateOrderReplaceRequest(
"modify oco",
ep.getOrderID(),
ep.getSide(),
ep.getOrdType(),
ep.getPrice(),
ep.getAccount());
ocrr.setContingencyType(ContingencyTypeFactory.OCO );
try {
fxcmGateway.sendMessage(ocrr);
} catch (Exception e) {
e.printStackTrace();
}
To add an existing entry order to an existing OCO group:
OrderCancelReplaceRequest ocrr = MessageGenerator.generateOrderReplaceRequest(
"modify oco",
ep.getOrderID(),
ep.getSide(),
ep.getOrdType(),
ep.getPrice(),
ep.getAccount());
ocrr.setFXCMContingencyID("5920");
ocrr.setContingencyType(ContingencyTypeFactory.OCO );
try {
fxcmGateway.sendMessage(ocrr);
} catch (Exception e) {
e.printStackTrace();
}
To remove an OCO order from an OCO group:
OrderCancelReplaceRequest ocrr = MessageGenerator.generateOrderReplaceRequest(
"modify oco",
ep.getOrderID(),
ep.getSide(),
ep.getOrdType(),
ep.getPrice(),
ep.getAccount());
ocrr.setFXCMContingencyID(ep.getFXCMContingencyID( ));
try {
fxcmGateway.sendMessage(ocrr);
} catch (Exception e) {
e.printStackTrace();
}
|
 |
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|