Skip to main content

Quickstart

This guide creates a provider-neutral Tayho client, validates the development deployment, and reads the current markets. It performs no transaction and needs no wallet.

Before you begin

You need:
  • Bun, Node.js, or another modern JavaScript runtime with fetch.
  • A Tayho development API key. Keys are created by Tayho operators on request; there is no public key-creation endpoint.
  • The development-preview @tayho/sdk package supplied with your integration or available in this monorepo. A public npm release is not currently advertised.
Browser applications use an origin-restricted publishable key beginning with th_pk_. A secret key beginning with th_sk_ is server-only and must never be bundled into client code.

1. Install the SDK

Inside this monorepo, install the workspace and import @tayho/sdk normally:
For an external integration, install the approved package artifact provided by Tayho. Do not depend on an unverified package using the same name.

2. Create a client

The development client uses https://api.testnet.tayho.io unless apiUrl is explicitly overridden. Overrides must use HTTPS except for localhost and 127.0.0.1.

3. Validate the deployment

configuration() verifies that the API environment matches the requested environment. When an RPC reader is configured, it also verifies the RPC chain before returning.

4. Read markets

Amounts and onchain identifiers are decoded to bigint. Cursors are opaque strings: persist and return them unchanged rather than parsing or constructing them.

Add direct onchain reads

API reads are sufficient for history and aggregation. Add RPC configuration when your application prepares actions or needs execution-critical state directly from HyperEVM:
RPC URLs stay inside your application and are never sent to Tayho. The built-in reader supports only chain ID, block number, balance, receipt, and pinned-block eth_call; it cannot scan logs, broadcast transactions, or forward arbitrary provider methods.

Handle failures

Respect retryAfterSeconds when present. Authentication, forbidden scope, invalid request, and chain mismatch errors require configuration changes rather than blind retries.

Next steps

SDK configuration

Add EIP-1193, viem, ethers, or native RPC adapters.

Read data

Explore markets, positions, portfolio, vault, staking, orders, and transactions.

Submit actions

Prepare, inspect, sign, and relay account, vault, and staking writes.

REST authentication

Understand scopes, quotas, idempotency, and receipts.
Last modified on July 23, 2026