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.

Subscribing to EURGBP subscribes to GBPUSD as well
 Post subject: Subscribing to EURGBP subscribes to GBPUSD as well Post rating: 0   New post Posted: Tue 19 Sep, 2017, 20:07 

User rating: 0
Joined: Mon 29 May, 2017, 17:19
Posts: 21
Location: Germany,
hey,

I`ve been trying to subscribe like this: instruments.add(instrument.EURGBP);
However, every time I do that, I get quotes for EURGBP AND GBPUSD when I subscribe to EURGBP only.
If I subscribe to EURUSD instead, I just get quotes for EURUSD. In my code, I never add GBPUSD.
I am using JForex-API-2.13.39.

I guess this is a bug in JForex?


 
 Post subject: Re: Subscribing to EURGBP subscribes to GBPUSD as well Post rating: 1   New post Posted: Wed 20 Sep, 2017, 11:12 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
Not sure, but i suspect this is intended behavior - some API methods provide values evaluated in USD (e.g. profit/loss in USD) and mapping from target currency (in your case it is GBP) into USD requires current pricing for GBP/USD. API may only get that pricing via implicit subscription to GBP/USD. In case of EURUSD target currency is already USD.


 
 Post subject: Re: Subscribing to EURGBP subscribes to GBPUSD as well Post rating: 1   New post Posted: Wed 20 Sep, 2017, 13:35 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
mtnfx is correct


 

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