-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTwsRtdServerTopicIdMap.cs
38 lines (33 loc) · 1.15 KB
/
TwsRtdServerTopicIdMap.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright (C) 2018 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
* and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. */
namespace TwsRtdServer
{
// class to map topicId to connectionStr/mktDataRequestId/topicStr
// required to quickly access connectionStr/mktDataRequestId/topicStr by topicId
class TwsRtdServerTopicIdMap
{
private string m_connectionStr = ""; // connection string
private int m_twsReqId = -1; // TWS API reqMktData reqId
private string m_topicStr = ""; // topic string
// constructor
public TwsRtdServerTopicIdMap(string connectionStr, int twsReqId, string topicStr)
{
m_connectionStr = connectionStr;
m_twsReqId = twsReqId;
m_topicStr = topicStr;
}
// gets
public string ConnectionStr()
{
return m_connectionStr;
}
public int TwsReqId()
{
return m_twsReqId;
}
public string TopicStr()
{
return m_topicStr;
}
}
}