Stats
An interface to store and track time-series statistics. There are several system level statistics already tracked, which can be viewed over at Stats module (Grafana). However, this interface allows users to measure and track their own statistics throughout the life-cycle of the algo server. Stats methods do not take 'symbol' as a parameter because they are meant to apply to system as a whole. If want to track stats per individual symbol, you can just name the measurements appropriately, i.e. Stats.push('AMC-interval', 19.8);
#
Stats.pushStats.push(measurement, value)
Stores a specified measurement as time-series measurement with the current timestamp. The storage database of choice is InfluxDB and visualization is done with Grafana dashboard which can be accessed on the main screen (Stats)
#
ParametersParameter | Type | Description |
---|---|---|
measurement | String | the name of the measurement (be careful about spelling errors) |
value | Number | a numeric value for the measurement |
#
Return valuesNone
- JavaScript
- Python
#
Stats.tagWorks just like Stats.push
above but allows for tagging measurements with additional metadata.
Stats.tag(measurement, value, tagName, tagValue)
#
ParametersParameter | Type | Description |
---|---|---|
measurement | String | the name of the measurement (be careful about spelling errors) |
value | Number | a numeric value for the measurement |
tagName | String | An additional tag for the measurement (may come handy for queries) |
tagValue | String | A value associated with the tag |
#
Return valuesNone
- JavaScript
- Python