Sprache auswählen

Live market data / 100 requests

  • Knortzsch
  • Autor
  • Beiträge: 2

Live market data / 100 requests wurde erstellt von Knortzsch

Posted 2 Jahre 4 Monate her #45
Hello,

I am building an Excel with Xewion TWS to list live data from assets and the option chain of each asset.
However, I am receiving many times an error message in the TWS that I exceeded the 100 requests, see the screenshot.

​​​​​​​ 

In your manual I read that there are measurements created from your side, eg. message queue, to limit the outgoing requests to the TWS.

What exactly counts under the 100 requests allowance? What kind of requests from excel are falling under this? Can you classify which requests build up to 100? Is it per asset, per strike price, per date... I need a bit more information to understand how I can avoid reaching this 100 cap given by the TWS.

Thank you.
von Knortzsch

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Support
  • Beiträge: 11

Support antwortete auf Live market data / 100 requests

Posted 2 Jahre 4 Monate her #46
Hello,
TWS is talking here about market data lines. Whenever you request an instrument's real time market data either from TWS or through the API this counts as market data line. In general you can say: each symbol with realtime data counts as one marketdata line.
By default IB gives each user 100 market data lines so you can simultanuously have real time data for 100 symbols. IB does not make any difference whether you "see" a ticker in TWS or in XEWION (or any other program) via API. Unfortunatly TWS does not provide any information via API how many tickers are allready in use. The number of used tickers may also change.
Example:
If you configured TWS to show you some indexes in the header in realtime, each ticker counts as one market data line. Now you open the option trader for symbol you will see the option chain. Depending on your screen size you will see in the chain let's say 20 strikes -> 40 tickers (20 puts and 20 calls). If you scroll the option chain in TWS after a few seconds the scrolled out strikes will be "unsubscribed" (and will not count as market data line) but you scrolled in som other strikes which will show you real time data and now count as market data line (puts + calls).

One way to get out is to reduce the number of symbols requesting real time data (either in TWS or in XEWION). In XEWION there is the possibility to use snapshot data. You can convert the formulas by selecting the cells and do right click to get the context menue. Restriction: Snapshot data do not have the full set of available fields like realtime data. You also will receive only data which are available over a time span of 11 seconds for each symbol, so there is a chance that you do not get really all data of a symbol.
Another way to overcome the 100 market data lines is to purchase "booster packs" from IB.

To get a feeling how many tickers you allready use in TWS you can press "Ctrl Alt =" on your keybord. (working on english keybord only!!!)

Your second question about message queue
​​​​​​​TWS only accepts 50 messages per second via API. You don't have to take care about this - XEWION handels this. The only thing you should consider: If you request for example snapshot data for 1000 symbols the result may take a little bit. Requesting 1000 symbols means 1000 API message - 50/sec -> 20 seconds in total to request plus a few seconds needed by TWS to send the response. Doing so you will see the messsage queue counter in the ribbon will increase by 1000 and then goind donw to 0 (when all request has been sent).

Hope this explains the message you get in TWS.

Greetings from Austria (UTC + 2)
Erich



 
von Support

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Knortzsch
  • Autor
  • Beiträge: 2

Knortzsch antwortete auf Live market data / 100 requests

Posted 2 Jahre 4 Monate her #47
Danke. 

Können Sie den Prozess der Momentaufnahme vom Snapshot genauer erklären?

Habe ich das richtig verstanden, dass Live Data für 11 Sekunden gesammelt wird und dann die Data zur Verfügung gestellt wird oder wie ist diese 11 Sekunden Regel zu verstehen?

​​​​​​​lg
von Knortzsch

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Support
  • Beiträge: 11

Support antwortete auf Live market data / 100 requests

Posted 2 Jahre 4 Monate her #48
Hello,
exactly.
XEWION sends a request for streaming data snapshots to TWS. TWS will try to get the requested data and will return all available data. The time span TWS tries to get data (from the datafarms of IB) is 11 seconds. This setting comes from IB and cannot be changed. So whatever TWS can get within 11 seconds it will return to XEWION. After 11 seconds TWS says: "Hey - I'm not able to get data for more fields for that symbol" and finish sending mor data of that symbol.
The snapshot function in XEWION provides as field "LastSnapshotDateTime" where you can see the date and time when your requested the snapshot.
If you need data for many symbols to do your calculation (eg options) and it's enough to refresh the data from time to time this is an excellent way to overcome the limitation of 100 concurrent real time symbols.

Greetings from Austria (UTC + 2)
Erich
von Support

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 1.684 Sekunden