Health of the Local API
Build your request
Change the values and the command follows. The token is never typed here: the command reads it from the SPECTRE_LOCAL_API_TOKEN environment variable. Run it in your own terminal.
curl 'http://127.0.0.1:48180/v1/health' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
bearerTokenAuthorizationBearer <token>The Local API token: spt_ and 64 hex characters. Copy it from Settings App → General → Local API. It is accepted only in the Authorization header. The names listed with an operation are the scopes it requires. The token of the terminal carries all of them.
The status and the counters of the Local API.
application/json- response
status*stringok while the API answers.
uptime_ms*integerint64clients*integerStream connections.
streams*integerPairs the API serves now.
api_only_instruments*integerHow many of them are opened only for the API.
dropped_events*integerMarket events that reached no client because the terminal was overloaded.
int64dropped_frames*integerFrames dropped for clients that read too slowly.
int64overflow_closes*integerStream connections closed with code 4008.
int64stream_available*booleanWhether the terminal was built with market data. Without it the stream and market operations answer unsupported.
curl 'http://127.0.0.1:48180/v1/health' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "status": "ok", "uptime_ms": 1234, "clients": 1, "streams": 3, "api_only_instruments": 2, "dropped_events": 0, "dropped_frames": 0, "overflow_closes": 0, "stream_available": true}API version, build and limits GET
The version of the API, the build of the terminal, the scopes of the token, the limits and the topics of the stream. A terminal built without market data lists only `workspace` and `settings` in `topics`. Market topics and market operations answer `unsupported` then.
List connections GET
Next Page