Possible to regulate the pacing of RTD data requests?

d0rian

Active Member
Joined
May 30, 2015
Messages
313
Office Version
  1. 365
[FONT=&quot]I'm requesting stock quote data via RTD from my brokerage's server, but they have a limit of 50 quote-requests / second, and the server disconnects you if you exceed that. The worksheet is currently set to execute 500 rows of formulas at once (each requesting 1 symbol quote), which I need to change so that no more than 50 get requested each second.[/FONT]

[FONT=&quot]I could probably change my VBA to incorporate all sorts of pausing and incremental copy/pasting to copy over 49 formulas at a time, then pause for 1.5 seconds, then request the next batch of 49 (and repeat that 10 times), but that seems clunky -- I thought perhaps that maybe there was a global setting in Excel somewhere I could set so that no matter how many formulas I copy over at once, I can tell Excel to "queue" all 500 requests, but only send 49 to the server each 1.5 seconds...is it possible to regulate the speed of RTD requests that get transmitted so that I don't exceed the server's max and get booted?[/FONT]
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Well, no -- maybe I didn't make the distinction clear enough (or maybe it's one that simply doesn't make sense), but I initially thought I'd have to revise my code with a bunch of wait/delay timing commands, before it dawned on me that maybe I could instead leave the VBA completely untouched if there were some kind of global setting in Excel (or single line of code I could add somewhere) that would essentially act as a master throttle / pacing-regulator for any RTD messages going out. That seemed like the sort of thing I wouldn't be surprised if Excel had as an option somewhere. Seemed like a far more streamlined method to solve the problem: instead of running VBA code that would take a full 20 seconds to execute, the pacing would instead be simply handled by allowing the original code to run, but having a single choke-point to regulate the max # of RTD messages sent so that they get 'queued' but only actually sent out at the speed I want.
 
Upvote 0

Forum statistics

Threads
1,223,961
Messages
6,175,652
Members
452,664
Latest member
alpserbetli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top