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.

traded instrument list
 Post subject: traded instrument list Post rating: 0   New post Posted: Wed 06 Feb, 2013, 19:03 

User rating: 0
Joined: Tue 05 Feb, 2013, 19:48
Posts: 13
How can I query the traded instrument list?
The com.dukascopy.api.Instrument contains not traded instruments also.

Thanks,
Stassen


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Fri 08 Feb, 2013, 08:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#Instrument_tradability


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Fri 08 Feb, 2013, 10:01 

User rating: 0
Joined: Tue 05 Feb, 2013, 19:48
Posts: 13
Does the platform use this method also? It subscribes for every instruments possible and wait 30 second?
What I would like to get is the selectable instrument list which is visible in the jforex platform.

Thanks,
Stassen


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Fri 08 Feb, 2013, 10:07 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Then it's another thing - subscribed instruments, see:
https://www.dukascopy.com/wiki/#Subscribe_to_an_instrument


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Fri 08 Feb, 2013, 11:27 

User rating: 0
Joined: Tue 05 Feb, 2013, 19:48
Posts: 13
The com.dukascopy.api.Instrument enum contains 66 forex pairs.

What you are saying is that I need to subscribe for all the 66 , and wait 30 sec for the IInstrumentStatusMessage?

Isn't there either an Instrument[] availableInstruments();
or an bool IsTradeable(Instrument name) type of direct method somewhere?

Thanks,
Stassen


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Fri 08 Feb, 2013, 17:07 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi stassen:

I'm facing same problem here, and so far i can see, i can't find any way to get only the tradable instruments... one way i find to get over this problem is:

private String myNotAllowedInstruments = "CHF/PLN EUR/BRL EUR/HUF EUR/MXN "
            + "EUR/RUB EUR/ZAR HUF/JPY MXN/JPY NZD/SGD USD/BRL USD/CZK USD/HUF "
            + "USD/RON ZAR/JPY";

for (Instrument i : Instrument.values()){
                if (myNotAllowedInstruments.contains(i.toString())){
                    continue;
                }

// process your code here

}



I have to get all this not tradable instruments with try/error...

I miss also some method to get only tradable instruments.

I hope that helps...

Best regards

JL


 
 Post subject: Re: traded instrument list Post rating: 0   New post Posted: Sat 09 Feb, 2013, 11:57 

User rating: 0
Joined: Tue 05 Feb, 2013, 19:48
Posts: 13
Thanks for the help JL, hardcoding can be a solution /as long as the list does not change/.

Regards,
Stassen


 

Jump to:  

  © 1998-2025 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