TypeScript SDK
Choose a pinned SDK release or current source, then verify the integration.
The public repository includes typed clients, validation, bounded retries, settlement checks, no-spend live tests, broker examples, and a separate Hyperliquid testnet-agent package. Install the verified v0.8.0 GitHub tarball for a pinned SDK; repository main currently contains unreleased v0.8.1 source.
At a glance
- x402
- 10 JSON methods Current source has ten JSON methods; v0.8.0 has nine. Three PNG products use HTTP.
- MCP
- 6 tools Typed helpers: one free catalog and five paid tools. listTools() is the live inventory.
- Examples
- 10+ commands REST, WebSockets, x402, MCP, brokers, plus three guarded Hyperliquid testnet agents.
Why It Matters
What traders and researchers should take away
- Typed methods reduce route, parameter, and schema mistakes before a payment or downstream decision.
- The public-boundary tests make it explicit which calls use Omni and which call Hyperliquid directly.
- Broker examples demonstrate a safe research/execution split instead of handing order authority to a data seller.
How it works
What the product uses behind the scenes
- Current v0.8.1 repository source requires Node.js 22.12 or newer. The pinned v0.8.0 tarball declares Node.js >=20; do not apply that older requirement to current source. The root Omni web application uses its own Node version policy.
- OmniClient covers keyed REST, OmniWebSocketClient covers ticketed AI News, and HyperliquidPublicClient/HyperliquidWebSocketClient call public Hyperliquid directly.
- OmniX402Client validates inputs before payment and verifies service/schema discriminants plus PAYMENT-RESPONSE after settlement.
- OmniMcpClient denies paid calls by default and requires an approvePayment callback in addition to the independent per-call cap.
- Current source adds BundleBudget for full-plan admission: explicit total budget, independent per-call ceiling, shared-instance reservations and same-operation promise reuse. This helper is not in the v0.8.0 release artifact.
Notes
Things to know
- npm install @omni-terminal/sdk will not work until registry publication. The v0.8.0 artifact lacks premarketRoundup(), premarketRoundupData(), BundleBudget and the :free scripts; these examples require current source.
- test:live is no-spend, but RUN_PAID_EXAMPLES=true authorizes the example purchase set when a funded EVM_PRIVATE_KEY is present.
- Use the :demo broker commands without credentials first. Coinbase dry-run uses authenticated preview; Robinhood dry-run constructs an unsigned payload without transmitting it.
- LIVE_TRADING=true changes broker behavior and must remain absent during initial setup.
Install the verified release or verify source
Build the exact package and examples currently reviewed in the public repository.
npm install https://github.com/InTheta/omni-universe-sdks/releases/download/v0.8.0/omni-terminal-sdk-0.8.0.tgz
# Or verify the current source tree:
git clone https://github.com/InTheta/omni-universe-sdks.git
git -C omni-universe-sdks checkout --detach 763bbd2e85a248118be0a45d391326a02a24de2d
cd omni-universe-sdks/packages/typescript
npm ci
npm run typecheck
npm test
npm run build
npm run test:boundary
npm run test:live- The npm install command installs a library in your consumer project; it does not install the repository verification commands. Clone source for npm run verify, test:live, and example:*.
- Copy .env.example to .env only when you are ready to add credentials locally.
- The boundary check rejects private hosts and credentials embedded in the distributable package.
- The live suite verifies public contracts and unpaid challenges without setting RUN_PAID_EXAMPLES.
Client map
Choose the narrow client that owns the resource you need.
- HyperliquidPublicClient and HyperliquidWebSocketClient: direct public Hyperliquid instruments, candles, mids, trades, and books; no Omni key.
- OmniClient and OmniWebSocketClient: Omni-owned AI News, Ask Omni, and ticketed public WebSocket products; Omni API key where documented.
- OmniX402Client: ten pay-per-request JSON products with official x402 v2 signing and receipt validation.
- OmniMcpClient: free discovery and five typed paid tools, with application-owned payment approval. listTools() shows any other read-only tools the server offers.
- CoinbaseAdvancedTradeClient and RobinhoodCryptoClient: optional broker adapters kept separate from Omni research.
Contract versions and route boundaries
SDK versions are not API versions. These published contract versions were checked on 15 October 2026; fetch the schema again when integrating.
SDK release artifact: v0.8.0 (GitHub tarball; not npm-published)
SDK main source: v0.8.1 (unreleased)
REST / WS schema: v1.4.0 — https://omniterminal.app/openapi.yaml
x402 schema: v0.11.0 — https://omniterminal.app/openapi-x402.yaml
Native MCP: https://omniterminal.app/api/x402/mcp
GET /health free service health
GET /api/v1/news/health free News readiness
GET /api/v1/news[/{symbol}] News-scoped x-api-key
POST /api/v1/news/ws-ticket News-scoped x-api-key
GET /ws/v1/news?ticket=... single-use ticket; WebSocket upgrade
POST /api/v1/ask-omni general API key; see operation security
GET /api/hl/public-profile public wallet read
GET /integrations/defillama/v1/builder-fees integration access policy- Do not substitute a News key for a general API key, browser session, vault bearer, or venue trading authority. Keys go in headers, never long-lived WebSocket URLs.
- Terminal browser routes, public keyed REST, x402 HTTP, and native MCP are separate access paths. Use the server URL and security requirements declared on the operation.
- Public Hyperliquid candles and books in this SDK call Hyperliquid directly; they are not evidence of an Omni entitlement or Omni data-plane health.
- Use schema discriminants, freshness and component status to validate responses; OpenAPI examples are representative, not guaranteed current market values.
Environment and spending controls
Start with no secrets, then add one authority at a time.
OMNI_APP_URL=https://omniterminal.app
OMNI_MCP_URL=https://omniterminal.app/api/x402/mcp
X402_MAX_PAYMENT_USD=0.010
RUN_PAID_EXAMPLES=false
LIVE_TRADING=false
# Add only when deliberately testing paid research:
# EVM_PRIVATE_KEY=0x...
# Add broker credentials only for the matching broker example.- Use a dedicated low-balance EVM wallet for paid research, separate from broker and trading wallets.
- Set RUN_PAID_EXAMPLES=true only for the command you intend to fund, then unset it.
- The source all-routes HTTP example attempts eleven purchases, including both latest and dated roundup queries across ten JSON products. The default $0.010 per-call cap rejects the $0.100 roundup. Do not increase it just to make the example finish; select and approve the exact product deliberately.
- X402_MAX_PAYMENT_USD caps each call, not the total process budget.
Runnable example index
Each example is committed next to the package it imports.
npm run example:rest
npm run example:ws
npm run example:news-ws
npm run example:x402
npm run example:mcp
npm run example:coinbase
npm run example:robinhood- examples/x402-all-routes.ts and examples/mcp-all-tools.ts default to free/no-spend behavior.
- examples/agents/research.ts lets both broker examples select x402 REST or native MCP research.
- Coinbase performs authenticated preview before any live submission.
- Robinhood dry-run returns the v2 order path and proposed order body without signing or transmitting an order request.
Guarded Hyperliquid testnet agents
A separate package pins every market-data, signing, order, and cancel request to testnet.
# After building the pinned source SDK above:
cd ../../examples/testnet-agents
npm ci
export RUN_TESTNET_ORDERS=false CONFIRM_TESTNET_ORDER= RUN_PAID_RESEARCH=false
export HL_TESTNET_PRIVATE_KEY= EVM_PRIVATE_KEY=
npm run verify
npm run test:live
npm run example:momentum
npm run example:mean-reversion
npm run example:omni-risk:demo- Momentum and mean-reversion use live testnet candles; Omni Risk uses bounded x402 REST or MCP research.
- These commands force HOLD or capped ALO preview and omit the signed-order probe. Follow the dedicated testnet-agent guide for the canonical installation and funded prerequisites.
- A separately authorized funded lifecycle caps notional at $25, verifies the passive order, cancels it immediately, and verifies removal.
- Never reuse a mainnet key; x402 payer and Hyperliquid testnet keys remain separate.
References
Implementation references
SDK README
https://github.com/InTheta/omni-universe-sdks/blob/main/packages/typescript/README.mdCanonical release installation, source status, client map, examples, and verification commands.
SDK package manifest
https://github.com/InTheta/omni-universe-sdks/blob/main/packages/typescript/package.jsonDefines package version, scripts, engines, exports, and locked dependencies.
SDK tests
https://github.com/InTheta/omni-universe-sdks/tree/main/packages/typescript/testCovers inputs, response contracts, payment boundaries, MCP, WebSockets, and brokers.
Hyperliquid testnet agents
https://github.com/InTheta/omni-universe-sdks/tree/main/examples/testnet-agentsRunnable, testnet-pinned momentum, mean-reversion, and Omni-risk examples.