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.

Meaning of 'IOrder.getOriginalAmount()' vs. 'IOrder.getRequestedAmount()'
 Post subject: Meaning of 'IOrder.getOriginalAmount()' vs. 'IOrder.getRequestedAmount()' Post rating: 0   New post Posted: Mon 08 Oct, 2018, 20:20 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
Just once again came across these two methods and once again catched myself with the thought that I do not understand difference between them.
Can someone explain?

Here is the self-documentation from API Java file
    /**
     * Returns original constant amount of the order. The value is set on order submit and cannot be changed later.
     * @see IEngine#submitOrder(String, Instrument, com.dukascopy.api.IEngine.OrderCommand, double)
     *
     * @return original amount of the order
     */
    double getOriginalAmount();

    /**
     * Returns requested amount
     *
     * @return amount requested
     */
    double getRequestedAmount();


There is one more 'amount' whose meaning seems to be clear.
    /**
     * Returns amount of the order. For orders in {@link State#OPENED} state returns amount requested. For orders in {@link State#FILLED}
     * state will return filled amount. Filled amount can be different from requested amount (partial fill).
     *
     * @return amount of the order
     */
    double getAmount();


 
 Post subject: Re: Meaning of 'IOrder.getOriginalAmount()' vs. 'IOrder.getRequestedAmount()' Post rating: 0   New post Posted: Fri 30 Nov, 2018, 17:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
getRequestedAmount() always returns full order amount, which was requested by Engine. getOriginalAmount() returns amount which was filled when order was submitted.
Example, you send order with amount 1000, it was immediately fulfilled. Both original and requested amount will be 1000. Another case, you send order with 1000, but initially was filled only 700. Then requested amount will be 1000, original amount 700.


 

Jump to:  

  © 1998-2024 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