From 87b6e5a2388e3d44fc4d798305063e152bf5bc7d Mon Sep 17 00:00:00 2001 From: Nassem Zaher Date: Mon, 17 May 2021 20:30:36 +0300 Subject: [PATCH 1/3] Update PricingContext.java fixing candles to accommodate the account id so the {accountID} will be replaced with the right givven account id --- src/com/oanda/v20/pricing/PricingContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/oanda/v20/pricing/PricingContext.java b/src/com/oanda/v20/pricing/PricingContext.java index cfe9ccd..c0a8da6 100644 --- a/src/com/oanda/v20/pricing/PricingContext.java +++ b/src/com/oanda/v20/pricing/PricingContext.java @@ -199,10 +199,10 @@ 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); } From 791ddc62495a5428db9793acc4cfd733624190fd Mon Sep 17 00:00:00 2001 From: Nassem Zaher Date: Mon, 17 May 2021 20:32:30 +0300 Subject: [PATCH 2/3] Update PricingCandlesRequest.java fixing candles to accommodate the account id so the {accountID} will be replaced with the right given account id --- src/com/oanda/v20/pricing/PricingCandlesRequest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/oanda/v20/pricing/PricingCandlesRequest.java b/src/com/oanda/v20/pricing/PricingCandlesRequest.java index bffa818..000b55c 100644 --- a/src/com/oanda/v20/pricing/PricingCandlesRequest.java +++ b/src/com/oanda/v20/pricing/PricingCandlesRequest.java @@ -21,8 +21,9 @@ public class PricingCandlesRequest extends Request { *

* @param instrument Name of the Instrument */ - public PricingCandlesRequest(InstrumentName instrument) { + public PricingCandlesRequest(AccountID accountID,InstrumentName instrument) { this.setPathParam("instrument", instrument); + this.setPathParam("accountID", accountID); } From 8d04ab285a40ae7cb8f0e094189b0f7ea65b37c8 Mon Sep 17 00:00:00 2001 From: Mike Bird <56395462+mike-oanda@users.noreply.github.com> Date: Thu, 27 May 2021 09:30:21 +0100 Subject: [PATCH 3/3] Update PricingCandlesRequest.java Formatting --- src/com/oanda/v20/pricing/PricingCandlesRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/oanda/v20/pricing/PricingCandlesRequest.java b/src/com/oanda/v20/pricing/PricingCandlesRequest.java index 000b55c..deb691e 100644 --- a/src/com/oanda/v20/pricing/PricingCandlesRequest.java +++ b/src/com/oanda/v20/pricing/PricingCandlesRequest.java @@ -21,7 +21,7 @@ public class PricingCandlesRequest extends Request { *

* @param instrument Name of the Instrument */ - public PricingCandlesRequest(AccountID accountID,InstrumentName instrument) { + public PricingCandlesRequest(AccountID accountID, InstrumentName instrument) { this.setPathParam("instrument", instrument); this.setPathParam("accountID", accountID);