getEnigmaPriceServiceHealth
Probe the chain’s Enigma price service for liveness. Returns the service’s own health payload — useful for status pages and CI smoke tests. Takes no inputs beyond an optional chain override.
import { getEnigmaPriceServiceHealth } from "@symmio/trading-core";
const health = await getEnigmaPriceServiceHealth(config, {});Parameters
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId.
Returns
EnigmaPriceServiceHealthThe service’s health payload. Typed as unknown — the service does not publish a stable health schema, so treat it as
an opaque liveness signal (a resolved promise means the endpoint responded).
Query options
import { getEnigmaPriceServiceHealthQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getEnigmaPriceServiceHealthQueryOptions(config, {}));The options bag is optional — getEnigmaPriceServiceHealthQueryOptions(config) works too. The getEnigmaPriceServiceHealthQueryKey builder likewise accepts no inputs.
Last updated on