Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width70%

Cache Service

This 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.

Installation

A 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. 

Removal

If you need to remove the cache service you can easily do this using the Control Panel - Uninstall Programs option and remove the Xignite Cache.

Logs

The app will write logs for each day it is running to the ProgramData folder: 

📁 C:\ProgramData\Bannister Lake\Xignite Cache\logs

Settings

Some settings are saved in a settings file in the ProgramData folder

📁 C:\ProgramData\Bannister Lake\Xignite Cache

Automatic Backup

The 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 List

  • Service shutdown
  • When off-hours end

Data Cache

  • Service shutdown
  • After every 5 updates it saves if new data has been received
  • When off-hours end

Stock List

The 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 Control

The service can be stopped and started using windows command line statements:


Code Block
languagepowershell
themeFadeToGrey
titleUse CMD prompt with Administrator rights
:: STOP service
net stop BLXigniteCache

:: START service
net start BLXigniteCache

Anchor
offhours
offhours
Off-Hours Defined

The 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




Column
width30%


Panel
borderColor#0070b1
bgColor#FFFFFF
borderWidth1

In this section:

Table of Contents
indent15px

Include Page
Promos Top
Promos Top



...