Skip to content

price range request not working #15

@mwelzl

Description

@mwelzl

Calling
response = ctx.pricing.getPriceRange(request);
(where ctx is the context and response is of type PricingGetPriceRangeResponse)
gives me:
com.oanda.v20.ExecuteException: No key {instrument} found in path '/v3/pricing/range'

I believe I have correctly initialized the PricingGetPriceRangeRequest object, including the instrument, like this:
PricingGetPriceRangeRequest request = new PricingGetPriceRangeRequest(new InstrumentName("EUR_USD"), new DateTime(beginTime+".0"));

Here, beginTime is a long value in milliseconds; I did try it with a PricingGetRequest and ctx.pricing.get, and there it works fine with the same value for "beginTime".

pricing.get needs the AccountId, and getPriceRange does not... could it be that the missing AccountID parameter is the mistake? When getPriceRange didn't work, I switched to using ctx.pricing.candles, which works, because I locally applied PR #14 - also there, the AccountID parameter was missing, and adding it fixed it, so I suspect that this might be the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions