Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreTP/SLgetTpSlSigningSpec

getTpSlSigningSpec

Fetch the handler’s EIP-712 signing spec for the POST endpoint (create / edit). The spec drives the domain, types, and primaryType that setQuoteTpSl signs against, so the SDK never hardcodes the schema — it always matches the deployed handler.

The spec is server-published and stable per deployment; cache it indefinitely (the React layer uses staleTime: Infinity). Called internally by setQuoteTpSl; exposed for advanced consumers that sign their own messages.

import { getTpSlSigningSpec } from "@symmio/trading-core"; const spec = await getTpSlSigningSpec(config); // { domain, types, primaryType }

Parameters

chainIdnumberoptional

Target chain id. Defaults to the config’s defaultChainId.

Returns

The EIP-712 typed-data domain + schema. Pass to signTpSlRequest.

Throws

  • SymmError when the chain has no tpsl config.
  • SymmApiError when the HTTP request fails.

Query options

import { getTpSlSigningSpecQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getTpSlSigningSpecQueryOptions(config));

getTpSlSigningSpecQueryOptions takes no required inputs — cache forever. getTpSlSigningSpecQueryKey builds the matching cache key.

Last updated on