REST API overview
The Tayho API is the supported application boundary for indexed reads, live unsigned calculations, relayed writes, and realtime ticket issuance.
Do not infer or construct a production hostname. Until Tayho publishes one, the SDK requires an
explicit
apiUrl for environment: "production". Read GET /v1/config before relying on a
deployment feature.
Request conventions
Send JSON request bodies withContent-Type: application/json. Integers that map to EVM integer
types are encoded as unsigned decimal strings in raw REST payloads. The SDK converts supported
numeric response fields to bigint.
Every authenticated request sends:
X-Request-ID using 8–128 letters, digits, dots, underscores, colons, or hyphens.
Otherwise the API generates one. The resulting x-request-id is the correlation value to include
in a support request.
Pagination and consistency
List endpoints accept the query parameters shown in their generated operation reference. A response can contain:- Treat
cursoras opaque. Pass it back unchanged only to the same operation and filter set. - A missing or
nullcursor means there is no next page. checkpointidentifies the indexed chain boundary represented by the response. It can benullbefore an indexed checkpoint is available.- Do not compare cursors or construct one from IDs.
Indexed and live sources
Responses can includex-tayho-source:
Live quote, risk, simulation, and action-preparation reads can fail independently of indexed
history. A live response is not a transaction guarantee; preparation still validates bounds and the
relayer still executes against current chain state.
Idempotent writes
Relayed action, intent, batch-intent, and cancellation operations require anIdempotency-Key. Use 8–128 safe characters and keep the same value with the same signed body.
The SDK creates one key per prepared action or order and reuses both the signed envelope and key
when submit() is called again. If a transport failure is ambiguous, retry the same prepared
object. Do not prepare a replacement just to retry.
An accepted order can report duplicate: true; this means the existing submission was recovered.
It does not mean another order was created.
Receipt capabilities
Action and intent intake returns a status identifier plus a receipt capability. Status calls must send that receipt exactly as returned. Treat it as sensitive application state:- do not log it in analytics or place it in a public URL;
- do not share it between users;
- keep it available until the lifecycle is terminal; and
- use it for protected realtime
action:orintent:channels when needed.
Errors
Public failures use an HTTP status plus a stable lowercase code where available. Responses can also includeretry-after, x-ratelimit-limit, and x-ratelimit-scope.
- Correct
400/422validation failures before retrying. - Correct
401credentials and403scope/restriction failures. - Back off after
429for at leastRetry-After. - Retry safe reads after
502/503with bounded exponential backoff. - Retry signed submissions only with the original body and idempotency key.