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.

How to get InstrumentGroup
 Post subject: How to get InstrumentGroup Post rating: 0   New post Posted: Thu 30 Apr, 2020, 16:38 

User rating: 0
Joined: Tue 28 Jan, 2020, 03:34
Posts: 4
Location: SwazilandSwaziland
I see there a class InstrumentGroup under com.dukascopy.api.instrument package, I want to collect all InstrumentGroup instance, and all instruments in each groups, I didn't find the api, please guide.


 
 Post subject: Re: How to get InstrumentGroup Post rating: 0   New post Posted: Tue 26 May, 2020, 17:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello.

Map<IInstrumentGroup, List<Instrument>> instrumentsByGroup = Arrays.stream(Instrument.values()).filter(instrument -> instrument.getGroup() != null).collect(Collectors.groupingBy(Instrument::getGroup));

Please check:
https://www.dukascopy.com/client/javado ... getGroup--
https://www.dukascopy.com/client/javado ... truments--

Kind regards.


 

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