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.

issues with standalone jforex api and partial fills
 Post subject: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Tue 19 Oct, 2010, 16:21 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
When a partial fill is received on an order, the order completely
disappears from engine.getOrders() list. In addition, partial fill
doesn't ever reflect total order size, only fill size. The order
also returns null using engine.getOrder() - this works fine before
the partial fill is received. If I restart API, or edit order in
JForex app, the order reappears via OnMessage and is added back to the
getOrders() list (ALTHOUGH it returns as an OPENED order, not
FILLED - with the remaining size as total order size). From
everything I've tried, I can only assume that this must be some sort
of bug. To confirm the loss of the order to the API, I was even able to submit another order with the same id or label and see both appearing live simultaneously in the standalone JForex platform order window. My API version is 2.6.17.

Some other smaller questions I've come up with:

* is it possible to retrieve the exact commission charge that will
be applied to an execution?

* how can I gain access to the url links for portfolio statements
(as accessible in JForex)?

* Why would I get an error if trying to change an
unfilled bid or offer that is simply sitting on the limit order book
(I receive a message that I can't change the size on order placed with
PLACE_BID or PLACE_OFFER)


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Thu 28 Oct, 2010, 07:22 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Unfortunately we weren't able to repeat the issue.
You can use IOrder.getAmount() to retrieve the filled amount of order and IOrder.getRequestedAmount() to retrieve the full amout of the order.
At the moment it's not possible to retrieve the exact commission charge that will be applied to an execution.
You can get the access to your portfolio statement only through JForex platform.
PLACE_BID and PLACE_OFFER orders are sent to execution immediately and by the time server receives the command to change their amount they may already be executed, that is why in order to change the amount of these types of orders you need to cancel and resubmit them with the desirable amount.


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Thu 28 Oct, 2010, 22:11 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
1. Is it possible you tried to reproduce the problem with the newer API 2.6.21 shipping with JForex (where perhaps it's fixed)? I downloaded JForexClientLibrary.zip again, and the version is still only at 2.6.17. I've included an exact log file so you can see for yourself what is happening. Notice how the total orders returned via engine.getOrders().size() went from 5 to 4, with the partially-filled order dissappearing from the list. Also note that even in Jforex, there is no reference to the fact that the original order size was 0.005, not to mention when I lowered the price in JForex to save the remaining order for your review, it was issued a completely new OrderID. My client (Ext ID), however, is still showing as L11_1.

2. As I am performing a platform integration, it doesn't make sense to force traders to HAVE to run JForex, in ADDITION to my platform, to access the portfolio statements. Perhaps there is someone else you can direct me to so that I may discuss accessing that functionality.

3. I noticed summaryComission among the order fields in the log, and I was curious what that is used for?


***engine.getOrders().size() = 5
2010-10-28 16:45:15.534 DEBUG e - Order update recived [54855440]
2010-10-28 16:45:15.534 DEBUG l - Starting processing of order message [{"isBOcr":true,"isFOK":false,"dmsg":{"d_api":"1288298272454","type":"delta"},"userId":"177676","timestamp":"1288298715097","check_time":"1288298272459","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"CANCELLED","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.0040","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855440","notes":"","priceClient":"0.74101","ioc":false,"createdDate":"1288298272458","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4443971872457","side":"BUY","type":"order","parentId":"54855440","strategyId":"tymdc.FullMarketDepth JForex API"}]
2010-10-28 16:45:15.534 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855440","type":"orderGroup","orders":[{"isBOcr":true,"isFOK":false,"dmsg":{"d_api":"1288298272454","type":"delta"},"userId":"177676","timestamp":"1288298715097","check_time":"1288298272459","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"CANCELLED","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.0040","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855440","notes":"","priceClient":"0.74101","ioc":false,"createdDate":"1288298272458","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4443971872457","side":"BUY","type":"order","parentId":"54855440","strategyId":"tymdc.FullMarketDepth JForex API"}]}]
BID ACCEPTED: Parent Order #54855440 PLACE BID 0.004 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF
2010-10-28 16:45:15.597 DEBUG e - Order update recived [54855861]
2010-10-28 16:45:15.597 DEBUG o - Starting processing of notify message [{"timestamp":"1288298715158","userId":"177676","text":"BID ACCEPTED: Parent Order #54855440 PLACE BID 0.004 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF","notifCode":"STRING_MESSAGE","extSysId":"L11_1","orderId":"54855861","positionId":"177676NZD/CHF","level":"INFO","type":"notification"}]
2010-10-28 16:45:15.597 DEBUG e - Order [54855861] is new
msg: MessageType NOTIFICATION Text STRING_MESSAGE-BID ACCEPTED: Parent Order #54855440 PLACE BID 0.004 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF Related order [L11_1]-OPENED / NZD/CHF / 0.74101 / 0.0040 / 0.0040
2010-10-28 16:45:15.597 DEBUG e - Pending opening order found [54855861, PLACE_BID, 0.74105]
2010-10-28 16:45:15.597 DEBUG e - Order group update recived [177676NZD/CHF]
2010-10-28 16:45:15.597 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298715157","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.004","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855861","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298715098","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","type":"order","parentId":"54855440"}]
2010-10-28 16:45:15.597 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855440","type":"orderGroup","orders":[{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298715157","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.004","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855861","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298715098","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","type":"order","parentId":"54855440"}]}]
2010-10-28 16:45:15.597 DEBUG PlatformOrderImpl - updating order as a response to EXECUTING order update message
msg: MessageType ORDER_CHANGED_OK Text Related order [L11_1]-OPENED / NZD/CHF / 0.74105 / 0.0040 / 0.0040
2010-10-28 16:45:15.597 DEBUG q - Starting processing of order group message [{"dmsg":{"d_api":"1288298715170","type":"delta"},"timestamp":"1288298715157","userId":"177676","status":"OPEN","summaryComission":"0.0407034 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74101","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.735469","orders":[]}]
2010-10-28 16:45:15.597 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"dmsg":{"d_api":"1288298715170","type":"delta"},"timestamp":"1288298715157","userId":"177676","status":"OPEN","summaryComission":"0.0407034 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74101","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.735469","orders":[]}]
***engine.getOrders().size() = 5
2010-10-28 16:45:20.050 INFO aa - jah: [{"timestamp":"1288298715597","datumType":"message","clientTime":"1288298715597","message":"BID ACCEPTED: Parent Order #54855440 PLACE BID 0.004 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF"}]
***engine.getOrders().size() = 5
2010-10-28 16:45:20.550 DEBUG aa - Trade Log (200) :https://demo-login.dukascopy.com/aDDS/export/tradeLog.php?check=4d2771c4f6b1aa11b63989aaed8d1b80&login=XXXXXXXXX1&tzOffsetSeconds=14400
***engine.getOrders().size() = 5
OFFER ACCEPTED: #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF
2010-10-28 16:45:50.081 DEBUG o - Starting processing of notify message [{"timestamp":"1288298749659","userId":"177676","text":"OFFER ACCEPTED: #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF","notifCode":"STRING_MESSAGE","extSysId":"jfjnbodah","orderId":"54855914","positionId":"177676NZD/CHF","level":"INFO","type":"notification"}]
2010-10-28 16:45:50.097 DEBUG e - Order update recived [54855914]
2010-10-28 16:45:50.097 DEBUG e - Order [54855914] is new
2010-10-28 16:45:50.097 DEBUG e - Pending opening order found [54855914, PLACE_OFFER, 0.74105]
2010-10-28 16:45:50.097 DEBUG e - Order group update recived [177676NZD/CHF]
2010-10-28 16:45:50.097 DEBUG e - Order update recived [54855861]
2010-10-28 16:45:50.113 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298749560","type":"delta"},"userId":"177676","timestamp":"1288298749658","extIp":"xx.xx.xx.xx","check_time":"1288298749566","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855914","orderGroupId":"177676NZD/CHF","amount":"0.001","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"jfjnbodah","orderId":"54855914","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749565","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898749856","side":"SELL","type":"order","parentId":"54855914"}]
2010-10-28 16:45:50.113 DEBUG e - Pending opening order found [54855861, PLACE_BID, 0.74105]
2010-10-28 16:45:50.113 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855914","type":"orderGroup","orders":[{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298749560","type":"delta"},"userId":"177676","timestamp":"1288298749658","extIp":"xx.xx.xx.xx","check_time":"1288298749566","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855914","orderGroupId":"177676NZD/CHF","amount":"0.001","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"jfjnbodah","orderId":"54855914","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749565","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898749856","side":"SELL","type":"order","parentId":"54855914"}]}]
2010-10-28 16:45:50.113 DEBUG PlatformOrderImpl - transiting order from CREATED state to OPENED as a response to EXECUTING order update message
msg: MessageType ORDER_SUBMIT_OK Text Related order [jfjnbodah]-OPENED / NZD/CHF / 0.74105 / 0.0010 / 0.0010
2010-10-28 16:45:50.113 DEBUG q - Starting processing of order group message [{"dmsg":{"d_api":"1288298749675","type":"delta"},"timestamp":"1288298749658","userId":"177676","status":"OPEN","summaryComission":"0.0407034 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74101","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.735469","orders":[]}]
2010-10-28 16:45:50.113 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"dmsg":{"d_api":"1288298749675","type":"delta"},"timestamp":"1288298749658","userId":"177676","status":"OPEN","summaryComission":"0.0407034 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74101","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.735469","orders":[]}]
2010-10-28 16:45:50.113 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298749667","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.0030","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855861","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298715098","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","type":"order","parentId":"54855440"}]
2010-10-28 16:45:50.113 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855440","type":"orderGroup","orders":[{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298749667","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"EXECUTING","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.0030","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"L11_1","orderId":"54855861","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298715098","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","type":"order","parentId":"54855440"}]}]
Order FILLED at 0.74105 CHF (Parent Order #54855440 PLACE BID 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF
2010-10-28 16:45:50.128 DEBUG e - Order update recived [54855915]
2010-10-28 16:45:50.128 DEBUG o - Starting processing of notify message [{"timestamp":"1288298749677","userId":"177676","text":"Order FILLED at 0.74105 CHF (Parent Order #54855440 PLACE BID 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF","notifCode":"ORDER_FILLED","extSysId":"L11_1","orderId":"54855915","positionId":"177676NZD/CHF","level":"INFO","type":"notification"}]
2010-10-28 16:45:50.128 DEBUG e - Filled opening order found [54855915, BUY, 1288298749673, 0.74105]
msg: MessageType NOTIFICATION Text ORDER_FILLED-Order FILLED at 0.74105 CHF (Parent Order #54855440 PLACE BID 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF Related order [L11_1]-OPENED / NZD/CHF / 0.74105 / 0.0040 / 0.0040
2010-10-28 16:45:50.128 DEBUG e - Order group update recived [177676NZD/CHF]
2010-10-28 16:45:50.128 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298749673","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"FILLED","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.001","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"origAmount":"0.001","extSysId":"L11_1","orderId":"54855915","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749672","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","pricePosOpen":"0.741010","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","instrument":"NZD/CHF","priceClientInitial":"0.74105","type":"order","parentId":"54855440"}]
2010-10-28 16:45:50.128 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855440","type":"orderGroup","orders":[{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298715031","type":"delta"},"userId":"177676","timestamp":"1288298749673","extIp":"xx.xx.xx.xx","check_time":"1288298715099","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"FILLED","rootId":"54855440","orderGroupId":"177676NZD/CHF","amount":"0.001","mgr_id":"0","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"origAmount":"0.001","extSysId":"L11_1","orderId":"54855915","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749672","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","pricePosOpen":"0.741010","oco":false,"execTimeoutMillis":"4441898714569","side":"BUY","instrument":"NZD/CHF","priceClientInitial":"0.74105","type":"order","parentId":"54855440"}]}]
2010-10-28 16:45:50.128 DEBUG PlatformOrderImpl - transiting order from OPENED to FILLED state as a response to FILLED order update message
msg: MessageType ORDER_FILL_OK Text Related order [L11_1]-FILLED / NZD/CHF / 0.74105 / 0.0010 / 0.0010
2010-10-28 16:45:50.128 DEBUG q - Starting processing of order group message [{"dmsg":{"d_api":"1288298749690","type":"delta"},"timestamp":"1288298749673","userId":"177676","status":"OPEN","summaryComission":"0.0542727 USD","amount":"0.002","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741010","orders":[]}]
2010-10-28 16:45:50.128 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"dmsg":{"d_api":"1288298749690","type":"delta"},"timestamp":"1288298749673","userId":"177676","status":"OPEN","summaryComission":"0.0542727 USD","amount":"0.002","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741010","orders":[]}]
2010-10-28 16:45:50.128 DEBUG PlatformOrderImpl - updating global position with data from order group update message
msg: MessageType ORDER_CHANGED_OK Text null Related order [177676NZD/CHF]-FILLED / NZD/CHF / 0.74101 / 0.0020 / 0.0020
Order FILLED at 0.74105 CHF (Parent Order #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF
2010-10-28 16:45:50.253 DEBUG e - Order update recived [54855916]
2010-10-28 16:45:50.253 DEBUG o - Starting processing of notify message [{"timestamp":"1288298749722","userId":"177676","text":"Order FILLED at 0.74105 CHF (Parent Order #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF","notifCode":"ORDER_FILLED","extSysId":"jfjnbodah","orderId":"54855916","positionId":"177676NZD/CHF","level":"INFO","type":"notification"}]
2010-10-28 16:45:50.253 DEBUG e - Filled opening order found [54855916, SELL, 1288298749718, 0.74105]
msg: MessageType NOTIFICATION Text ORDER_FILLED-Order FILLED at 0.74105 CHF (Parent Order #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF Related order [jfjnbodah]-OPENED / NZD/CHF / 0.74105 / 0.0010 / 0.0010
2010-10-28 16:45:50.253 DEBUG e - Order group update recived [177676NZD/CHF]
2010-10-28 16:45:50.253 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298749560","type":"delta"},"userId":"177676","timestamp":"1288298749718","extIp":"xx.xx.xx.xx","check_time":"1288298749566","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"FILLED","rootId":"54855914","orderGroupId":"177676NZD/CHF","amount":"0.001","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"origAmount":"0.001","extSysId":"jfjnbodah","orderId":"54855916","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749717","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","pricePosOpen":"0.741023","oco":false,"execTimeoutMillis":"4441898749856","side":"SELL","instrument":"NZD/CHF","priceClientInitial":"0.74105","trailingLimit":"0","type":"order","parentId":"54855914"}]
2010-10-28 16:45:50.253 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"orderGroupId":"54855914","type":"orderGroup","orders":[{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298749560","type":"delta"},"userId":"177676","timestamp":"1288298749718","extIp":"xx.xx.xx.xx","check_time":"1288298749566","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"FILLED","rootId":"54855914","orderGroupId":"177676NZD/CHF","amount":"0.001","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"origAmount":"0.001","extSysId":"jfjnbodah","orderId":"54855916","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749717","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","pricePosOpen":"0.741023","oco":false,"execTimeoutMillis":"4441898749856","side":"SELL","instrument":"NZD/CHF","priceClientInitial":"0.74105","trailingLimit":"0","type":"order","parentId":"54855914"}]}]
2010-10-28 16:45:50.253 DEBUG PlatformOrderImpl - transiting order from OPENED to FILLED state as a response to FILLED order update message
msg: MessageType ORDER_FILL_OK Text Related order [jfjnbodah]-FILLED / NZD/CHF / 0.74105 / 0.0010 / 0.0010
2010-10-28 16:45:50.253 DEBUG q - Starting processing of order group message [{"dmsg":{"d_api":"1288298749735","type":"delta"},"timestamp":"1288298749718","userId":"177676","status":"OPEN","summaryComission":"0.067842 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741023","orders":[]}]
2010-10-28 16:45:50.253 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"dmsg":{"d_api":"1288298749735","type":"delta"},"timestamp":"1288298749718","userId":"177676","status":"OPEN","summaryComission":"0.067842 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741023","orders":[]}]
2010-10-28 16:45:50.253 DEBUG PlatformOrderImpl - updating global position with data from order group update message
msg: MessageType ORDER_CHANGED_OK Text null Related order [177676NZD/CHF]-FILLED / NZD/CHF / 0.741023 / 0.0030 / 0.0030
***engine.getOrders().size() = 4
2010-10-28 16:45:50.550 INFO aa - jah: [{"timestamp":"1288298750081","datumType":"message","clientTime":"1288298750081","message":"OFFER ACCEPTED: #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC - Position #177676NZD/CHF"},{"timestamp":"1288298750128","datumType":"message","clientTime":"1288298750128","message":"Order FILLED at 0.74105 CHF (Parent Order #54855440 PLACE BID 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF"},{"timestamp":"1288298750253","datumType":"message","clientTime":"1288298750253","message":"Order FILLED at 0.74105 CHF (Parent Order #54855914 PLACE OFFER 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF"}]
OFFER #54855914 FILLED FULLY
2010-10-28 16:45:51.081 DEBUG e - Order update recived [54855914]
2010-10-28 16:45:51.081 DEBUG o - Starting processing of notify message [{"timestamp":"1288298749921","userId":"177676","text":"OFFER #54855914 FILLED FULLY","notifCode":"OFFER_CANCELED_FILLED","extSysId":"jfjnbodah","orderId":"54855914","positionId":"177676NZD/CHF","level":"INFO","type":"notification"}]
2010-10-28 16:45:51.081 DEBUG b - Saving closed order [Order info:
orderGroupId: 54855914
opened: true
closed: true
isOco: false
pendingOrders: {}
entryOrder:
orderId: 54855916
label: jfjnbodah
side: SELL
openPrice: 0.74105
creationTime: 1288298749717
fillTime: 1288298749718
openSlippage: null
amount: 1000.000
stopLossPrice: -1
stopLossSlippage: null
stopLossOrderId: null
stopLossByBid: false
takeProfitPrice: -1
takeProfitSlippage: null
takeProfitOrderId: null
goodTillTime: 0
executing: false
comment: null
mergedFrom: null
close data map: {}]
2010-10-28 16:45:51.081 DEBUG l - Starting processing of order message [{"isBOcr":false,"isFOK":false,"dmsg":{"d_api":"1288298749560","type":"delta"},"userId":"177676","timestamp":"1288298749919","extIp":"xx.xx.xx.xx","check_time":"1288298749566","expTrans":false,"loginId":"144791","pbpo":true,"isMcOrder":false,"state":"CANCELLED","rootId":"54855914","orderGroupId":"177676NZD/CHF","amount":"0.0000","sessId":"f7ce06ad-51de-4d51-a307-80422b2bbb7e","trades":[],"pBroker":[],"extSysId":"jfjnbodah","orderId":"54855914","notes":"","priceClient":"0.74105","ioc":false,"createdDate":"1288298749565","hsexUser":false,"dir":"OPEN","execBlacklist":[],"otype":false,"intIp":"xx.xx.xx.xx","instrument":"NZD/CHF","oco":false,"execTimeoutMillis":"4441898749856","side":"SELL","type":"order","parentId":"54855914"}]
2010-10-28 16:45:51.128 DEBUG aa - Trade Log (200) :https://demo-login.dukascopy.com/aDDS/export/tradeLog.php?check=4d2771c4f6b1aa11b63989aaed8d1b80&login=XXXXXXXXX1&tzOffsetSeconds=14400
2010-10-28 16:45:51.316 DEBUG e - Order group update recived [177676NZD/CHF]
2010-10-28 16:45:51.316 DEBUG q - Starting processing of order group message [{"dmsg":{"d_api":"1288298749932","type":"delta"},"timestamp":"1288298749919","userId":"177676","status":"OPEN","summaryComission":"0.067842 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741023","orders":[]}]
2010-10-28 16:45:51.316 DEBUG PlatformOrderImpl - processing OrderGroupMessage [{"dmsg":{"d_api":"1288298749932","type":"delta"},"timestamp":"1288298749919","userId":"177676","status":"OPEN","summaryComission":"0.067842 USD","amount":"0.003","orderGroupId":"177676NZD/CHF","price":"0.74105","isOcoMerge":false,"instrument":"NZD/CHF","side":"SHORT","type":"orderGroup","pricePO":"0.741023","orders":[]}]
***engine.getOrders().size() = 4
2010-10-28 16:46:01.128 INFO aa - jah: [{"timestamp":"1288298751081","datumType":"message","clientTime":"1288298751081","message":"OFFER #54855914 FILLED FULLY"}]
2010-10-28 16:46:01.284 DEBUG aa - Trade Log (200) :https://demo-login.dukascopy.com/aDDS/export/tradeLog.php?check=4d2771c4f6b1aa11b63989aaed8d1b80&login=XXXXXXXXX1&tzOffsetSeconds=14400
***engine.getOrders().size() = 4

WHAT HAPPENED TO ORDER 54855440 ??? it's still live in JForex, but NOT via API (getOrders().size() now = 4)
in JForex: 2010-10-28 20:45:15 - L11_1 - 177676NZD/CHF - 54855861 - NZD/CHF - BUY - NZD 0.003 (WAS 0.004) - 0.74105 - LIMIT - PLACED - GTC

If you want to see the order yourself, I lowered the price so you can still see it live in the demo account.
And NOTE - it DOES reappear upon shutting down and restarting the API.
** When I tried lowering the price of the order to save it in JForex, and it gave a new Order ID??? That dosen't seem correct either??!!
** NEW ORDER ID 54857093 used to be 54855861.


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Fri 29 Oct, 2010, 22:44 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
Here's another question that I had. Why is there no OnMessage notification for events such as these:

"System is currently unavailable. Please try later or contact Support Desk".

It's clearly appearing in the debug output log, but this (and other similar messages) are not passed
into the strategy's OnMessage event so that my strategy can be aware of it as well. How can I get access
to these important status messages?


2010-10-29 17:17:05.948 DEBUG ab - Submitting bid/offer order [{"timestamp":"1288387025948","extSysId":"L11_1A","instrument":"NZD/CHF","type":"orderGroup","orders":[{"state":"CREATED","pbpo":true,"amount":"0.0050","extSysId":"L11_1A","priceClient":"0.74101","hsexUser":false,"dir":"OPEN","instrument":"NZD/CHF","side":"BUY","type":"order","strategyId":"tymdc.FullMarketDepth JForex API"}]}]
Order PLACE BID 5000 NZD/CHF @ 0.74101 EXPIRES:GTC is sent at 2010-10-29 21:17:05.948 GMT by the strategy "FullMarketDepth": from the local computer
WARNING
2010-10-29 17:17:06.307 DEBUG o - Starting processing of notify message [{"timestamp":"1288387025224","userId":"176734","loginId":"143849","text":"System is currently unavailable. Please try later or contact Support Desk","notifCode":"SYSTEM_UNAVAILABLE","level":"WARNING","type":"notification"}]
2010-10-29 17:17:13.713 INFO aa - jah: [{"timestamp":"1288387025948","datumType":"message","clientTime":"1288387025948","message":"Order PLACE BID 5000 NZD/CHF @ 0.74101 EXPIRES:GTC is sent at 2010-10-29 21:17:05.948 GMT by the strategy \"FullMarketDepth\": from the local computer"},{"timestamp":"1288387026307","datumType":"message","clientTime":"1288387026307","message":"WARNING"}]
2010-10-29 17:17:14.213 DEBUG aa - Trade Log (200) :https://demo-login.dukascopy.com/aDDS/export/tradeLog.php?check=9198f0207cc54187e567d62169595cc4&login=xxxxxxxxxe&tzOffsetSeconds=14400


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Wed 03 Nov, 2010, 03:56 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
I just tried out the new standalone JForex API 2.6.21 release that was recently posted, and I still seem to be having the same partial fill issues described above.


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Wed 03 Nov, 2010, 13:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Thanks for the full logs and good description of the problem.

You have a global account. Orders on global account works differently. When order is fully filled it disappears from the system, this is the "end of live" of the order.

Quote:
WHAT HAPPENED TO ORDER 54855440 ??? it's still live in JForex, but NOT via API (getOrders().size() now = 4)

From the information you provided it's not clear what happened with order 54855440. I think it still exists in partially filled state (state == FILLED, getAmount() < getRequestedAmount()).

getOrders().size() returns 4, because order 54855914 PLACE OFFER amount 0.001 was fully filled and it's amount merged with the global position.

Quote:
As I am performing a platform integration, it doesn't make sense to force traders to HAVE to run JForex, in ADDITION to my platform, to access the portfolio statements. Perhaps there is someone else you can direct me to so that I may discuss accessing that functionality.

We do not provide such an access besides the platform. You can contact us at [email protected] if this kind of functionality is important to you, maybe we can find some way

Quote:
I noticed summaryComission among the order fields in the log, and I was curious what that is used for?

This is our internal messages, we do not discuss it.

Quote:
"System is currently unavailable. Please try later or contact Support Desk"

Hmm, are you sure? There should be message in onMessage with the type NOTIFICATION


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Fri 05 Nov, 2010, 04:48 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
Thank you for your response.

When getOrders().size() returned 5, order 54855914 DID NOT EXIST YET (it was executed immediately at the inside price), and never even had time to appear on the getOrders() list.
The 5 orders reflected only the global orders that you described, along with the PLACE BID (which disappears upon partial fill).
It definitely sounds like I've uncovered a bug here, especially since the still-LIVE, partially-filled order, does reappear on the getOrders() list upon shutting down and restarting the API.

Quote:
getOrders().size() returns 4, because order 54855914 PLACE OFFER amount 0.001 was fully filled and it's amount merged with the global position.


Definitely sure this didn't appear in onMessage. In fact, if you see my log file, notice that I logged all messages received by OnMessage to the console as well. Here's an example:

msg: MessageType NOTIFICATION Text ORDER_FILLED-Order FILLED at 0.74105 CHF (Parent Order #54855440 PLACE BID 0.001 mil. NZD/CHF @ 0.74105 EXPIRES: GTC) - Position #177676NZD/CHF Related order [L11_1]-OPENED / NZD/CHF / 0.74105 / 0.0040 / 0.0040

However, notice how this line had NO associated "msg:" ouput, hence, no OnMessage event was passed in:
2010-10-29 17:17:06.307 DEBUG o - Starting processing of notify message [{"timestamp":"1288387025224","userId":"176734","loginId":"143849","text":"System is currently unavailable. Please try later or contact Support Desk","notifCode":"SYSTEM_UNAVAILABLE","level":"WARNING","type":"notification"}]

Quote:
"System is currently unavailable. Please try later or contact Support Desk"


I was also curious about the fact you said I have a "global account". If I've been developing this interface for a "global account", and a client tries opening a different type of account (I suppose, a hedging-capable account?),
that could potentially cause some severe problems if I'm expecting positions to behave a certain way.
Is there a way to query for the account type? I was wondering why I didn't seem to have to deal with order merging as a potential issue (not that I'm complaining about that).


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Fri 12 Nov, 2010, 15:02 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You are definitely correct about order disappearing from the list.
We found the reason and it will be fixed as soon as possible. Thank you for the provided information!

Support wrote:
Is there a way to query for the account type?

IAccount.isGlobal() will return true if account type is "global"


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Tue 23 Nov, 2010, 21:07 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
any update on when this will be resolved? thanks.


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Thu 13 Jan, 2011, 07:23 

User rating: 0
Joined: Tue 19 Oct, 2010, 16:12
Posts: 7
I just tried out the latest API version 2.6.30 and this same critical problem is STILL occurring!
Has any progress been made on this issue? Having an live order disappear from the list
after receiving a partial fill via the API is a pretty bad issue.


 
 Post subject: Re: issues with standalone jforex api and partial fills Post rating: 0   New post Posted: Fri 28 Jan, 2011, 13:48 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please check now with the latest JForex API 2.6.33


 

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