Cache ServiceThis application installs as a windows service and runs in the background to build and manage a cache of recent off-hours stock values that are not otherwise available from the Xignite API. The cache is intended to keep data to service requests for the current day up to the previous 24 hours. It requests off-hours values from the Xignite API during off-hours only. InstallationA installer app is provided that installs and starts the service automatically. If uninstalled the service will be stopped and removed. You can see the service running in the Windows Services list.
This is what the properties page for the service will look like.
RemovalIf you need to remove the cache service you can easily do this using the Control Panel - Uninstall Programs option and remove the Xignite Cache. LogsThe app will write logs for each day it is running to the ProgramData folder: 📁 C:\ProgramData\Bannister Lake\Xignite Cache\logs SettingsSome settings are saved in a settings file in the ProgramData folder 📁 C:\ProgramData\Bannister Lake\Xignite Cache Automatic BackupThe service holds the active cache data and stock list in memory for quick retrieval while it's running. The list of stocks and current cache data are also occasionally saved to a backup file in the ProgramData folder. 📁 C:\ProgramData\Bannister Lake\Xignite Cache This allows the service to be stopped and restarted without losing data that had already been accumulated. However if the service is stopped during off-hours you may miss out on stock values that occur while the service is stopped. When?The following describes when the service save its active stock list and data cache to files: Stock ListData Cache- Service shutdown
- After every 5 updates it saves if new data has been received
- When off-hours end
Stock ListThe list of stocks that are selected for off-hours caching are saved to the 📄 stocks.txt file in this folder: 📁 C:\ProgramData\Bannister Lake\Xignite Cache If already you have a list of stocks that you want to use from another machine or say a copy of the ticker stock list - you can manually edit this file and when the service is restarted - it will read the list and start caching all stocks in the list. Command Line ControlThe service can be stopped and started using windows command line statements:
Code Block |
---|
language | powershell |
---|
theme | FadeToGrey |
---|
title | Use CMD prompt with Administrator rights |
---|
| :: STOP service
net stop BLXigniteCache
:: START service
net start BLXigniteCache | Off-Hours DefinedThe off-hours are currently defined based on the documentation from the Xignite API. https://www.xignite.com/product/BATS-real-time-stock-quotes-data#/DeveloperResources/request/GetExtendedQuotes Info |
---|
Data coverage for these output values include Pre-Market hours 4:00 a.m. to 9:30 a.m. EST and After Market hours 4:00 p.m. to 8:00 p.m. EST |
|