Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 779 Bytes

SYMBOLS_EXCHANGES.md

File metadata and controls

17 lines (11 loc) · 779 Bytes

Symbols and Exchanges

The IOpenfeedClient.subscribe method allows you to subscribe to individual symbols and exchanges, depending on your needs.

Subscriptions by symbol are the most lightweight as they only subscribe to a few symbols at a time. Subscriptions by exchanges will subscribe to everything on a single exchange at once.

To subscribe to just a few symbols, all you need is to pass the list of symbols in the Subscribe method symbols argument:

client.subscribe(Service.REAL_TIME, SubscriptionType.ALL, 1, ["MSFT", "GOOG"]);

To subscribe to a data coming from an exchange wholesale, pass the list of exchanges you are interested in in the call to Subscribe:

client.subscribe(Service.REAL_TIME, SubscriptionType.ALL, 1, null, null, ["CME"]);