How to subscribe to multiple RICs with my NIProvider
I am implementing my own NIProvider which is essentially something like [this example](https://github.com/Refinitiv/Real-Time-SDK/blob/master/CSharp/Ema/Examples/Training/IProvider/100_Series/100_MP_Streaming/IProvider.cs) but I added a string array `Rics`:
string[] Rics = {"NVDA", "MSFT", "AAPL"};
to simulate updates for multiple names:
public static void Main(string[] args)
{
OmmProvider? provider = null;
AppClient appClient = new AppClient();
FieldList fieldList = new FieldList();
OmmIProviderConfig config = new OmmIProviderConfig();
provider = new OmmProvider(config.Port("14002"), appClient);
while (appClient.ItemHandle == 0) Thread.Sleep(1000);
string[] Rics = {"NVDA", "MSFT", "AAPL"};
for (int i = 0; i < 65536; i++)
{
for (int j = 0; j < Rics.length; ++j) {
fieldList.Clear();
fieldList.AddReal(22, 3991 + i, OmmReal.MagnitudeTypes.EXPONENT_NEG_2);
fieldList.AddReal(30, 10 + i, OmmReal.MagnitudeTypes.EXPONENT_0);
var updMsg = new UpdateMsg().Payload(fieldList.Complete());
updMsg.Name(ric);
provider.Submit(updMsg, appClient.ItemHandle);
Thread.Sleep(1000);
}
}
}
This works fine as long as the consumer can accept all the RICs. But my consumer is something like this:
public class Consumer
{
static void Main()
{
OmmConsumer? consumer = null;
AppClient appClient = new();
OmmConsumerConfig config = new OmmConsumerConfig().Host("localhost:14002").UserName("user");
consumer = new OmmConsumer(config);
string[] Rics = {"AAPL", "MSFT"};
foreach (var ric in Rics)
consumer.RegisterClient(new RequestMsg().ServiceName("DIRECT_FEED").Name(ric), appClient);
Thread.Sleep(60000); // API calls OnRefreshMsg(), OnUpdateMsg() and OnStatusMsg()
consumer?.Uninitialize();
}
}
Which largely models after [this example](https://github.com/Refinitiv/Real-Time-SDK/blob/master/CSharp/Ema/Examples/Training/Consumer/100_Series/100_MP_Streaming/Consumer.cs)
but it adds RICs in a loop:
foreach (var ric in Rics)
consumer.RegisterClient(new RequestMsg().ServiceName("DIRECT_FEED").Name(ric), appClient);
This approach works fine if my consumer connects to LSEG's Real-Time Optimized data platform, RTO will only send updates to my consumer from the RICs I subscribed to (in this particular example, MSFT and AAPL only, NVDA excluded). But if I connect my consumer to my NIProvider above, my own NIProvider will not honor my subscription requests and send all updates (in this particular example, NVDA, MSFT and AAPL).
My question is, how can I implement the same filtering mechanism in my NIProvider?
Best Answer
-
Thank you for reaching out to us.
I think you are using an Interactive Provider (IProvider), not a Non-Interactive Provider (NIProvider).
IProvider must only provide updates to the subcribed RICs. For example, if the consumer subscribes to "AAPL" and "MSFT", it must only provide refreshes and updates of "AAPL" and "MSFT" to that consumer.
To use a Non-Interactive Provider (NIProvider), you need to have RTDS (ADH or ADS POP) on your enviornment.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛