Dukascopy
 
 
Wiki JStore Search Login

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

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

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

partial fill size is missing in the api
 Post subject: partial fill size is missing in the api Post rating: 0   New post Posted: Wed 27 Apr, 2016, 11:28 

User rating: 1
Joined: Wed 10 Sep, 2014, 19:25
Posts: 19
Location: Austria,
Buying 1000 FRA.IDX and then sell 1000 looks like this in the messages window:

2016-04-27 10:20:03 Partial fill: 440 of 1000 @ 4542 for #407215719 SELL 440 FRA.IDX/EUR @ MKT MAX SLIPPAGE 0.05 - Position #106339308
2016-04-27 10:20:03 Order ACCEPTED: #407215719 SELL 1000 FRA.IDX/EUR @ MKT MAX SLIPPAGE 0.05 - Position #106339308
2016-04-27 10:19:54 Order FILLED at 4543.8494 (#407215600 BUY 1000 FRA.IDX/EUR @ MKT) - Position #106339308
2016-04-27 10:19:54 Order ACCEPTED: #407215600 BUY 1000 FRA.IDX/EUR @ MKT - Position #106339308

-------------------
How to query the "Partial fill: 440 of 1000" in the api? Absolutely nothing indicate the partial fill size?


 
 Post subject: Re: partial fill size is missing in the api Post rating: 0   New post Posted: Wed 27 Apr, 2016, 11:33 

User rating: 1
Joined: Wed 10 Sep, 2014, 19:25
Posts: 19
Location: Austria,
I would expect order.getCloseHistory()[0].getAmount() to be 440 (the partial closed amount), but it is not, it is 1000.


 
 Post subject: partial fills are hidden in the api Post rating: 0   New post Posted: Wed 27 Apr, 2016, 14:55 

User rating: 1
Joined: Wed 10 Sep, 2014, 19:25
Posts: 19
Location: Austria,
Still no clue how to get the actual fill amount, especially if there are multiple partial fills on the same order.
Maybe you should add method "getFilledAmount()" to ICloseOrder, or how else this info can be acquired?


 
 Post subject: Re: partial fill size is missing in the api Post rating: 0   New post Posted: Thu 28 Apr, 2016, 10:35 

User rating: 1
Joined: Wed 10 Sep, 2014, 19:25
Posts: 19
Location: Austria,
Still looking query the partial fills through the jforex api, both for realtime and historical.
Can the support show how it is done?


 
 Post subject: Re: partial fill size is missing in the api Post rating: 0   New post Posted: Wed 15 Jun, 2016, 14:31 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,

As far as we understood, you would like to see partial amount of partially submitted order.
Look at example how to do it easily:
    public void getFillOrders(List<IOrder> orderList) {
        for (IOrder order : orderList) {
            console.getOut().println("Order amount: " + order.getRequestedAmount());
            for (IFillOrder o : order.getFillHistory()) {
                console.getOut().println("Order ID: "+ order.getId()+" Order Label: " + order.getLabel());
                console.getOut().println("Fill: " + o.getAmount());
            }

            for(ICloseOrder o : order.getCloseHistory()) {
                console.getOut().println("Close: " + o.getAmount());
            }
        }
    }

Good luck and have a nice day


 

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