Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing required parameter accountID to the PricingCandlesRequest #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.oanda.v20</groupId>
<artifactId>v20</artifactId>
<version>3.0.25</version>
<version>3.0.26</version>

<packaging>jar</packaging>

Expand Down
4 changes: 3 additions & 1 deletion src/com/oanda/v20/pricing/PricingCandlesRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.math.BigDecimal;

import com.oanda.v20.Request;
import com.oanda.v20.account.AccountID;
import com.oanda.v20.instrument.CandlestickGranularity;
import com.oanda.v20.instrument.WeeklyAlignment;
import com.oanda.v20.primitives.DateTime;
Expand All @@ -21,7 +22,8 @@ public class PricingCandlesRequest extends Request {
* <p>
* @param instrument Name of the Instrument
*/
public PricingCandlesRequest(InstrumentName instrument) {
public PricingCandlesRequest(AccountID accountID, InstrumentName instrument) {
this.setPathParam("accountID", accountID);
this.setPathParam("instrument", instrument);

}
Expand Down
5 changes: 3 additions & 2 deletions src/com/oanda/v20/pricing/PricingContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,11 @@ public PricingGetResponse get(PricingGetRequest request)
* @see RequestException
* @see ExecuteException
*/
public PricingCandlesResponse candles(InstrumentName instrument)

public PricingCandlesResponse candles(AccountID accountID, InstrumentName instrument)
throws RequestException, ExecuteException
{
PricingCandlesRequest request = new PricingCandlesRequest(instrument);
PricingCandlesRequest request = new PricingCandlesRequest(accountID, instrument);
return candles(request);
}

Expand Down