Overview
StockKit is the Trade API surface for on-chain stock, ETF, commodity, forex, and index exposure. It normalizes four structurally different ways of getting that exposure under a single market / action / portfolio interface — so integrators don’t reimplement issuer-specific contracts, dividend models, or trade lifecycles. The four issuers split into two structural categories. Internalize this split before reading anything else — it drives everything from dividend handling to KYC posture.1:1 Collateralized Tokens
Synthetic Perpetuals
Why the Trade API
The Yield API was designed around staking, lending, LP, and other recurring-income shapes. Non-yield tokenized equities and synthetic perps introduce concerns that don’t belong on that surface:Securities semantics
Order lifecycle
enter / exit model doesn’t express.Two structural shapes
api.trade.yield.xyz. KYC handoffs (where applicable) route through api.kyc.yield.xyz for PII isolation and regional residency — the same KYC API used by RWA Kit, so a wallet that’s KYC’d for Dinari fixed-income dShares via the Yield API is recognised when buying Dinari equity dShares here, and vice versa.
API Surfaces
Trade API
https://api.trade.yield.xyz/v1 — market discovery, order placement, position tracking, corporate actions, voting (where supported). Equity / commodity / forex / index perps via Hyperliquid HIP-3 also served here.KYC API
https://api.kyc.yield.xyz/v1 — identity verification, allowlist enrolment, region-segregated PII storage, issuer KYC handoffs. Shared across the Trade API and Yield API.Yield API (RWAKit lives here)
https://api.yield.xyz/v1 — staking, lending, LP, DeFi, and yield-bearing RWAs (T-Bills, MMFs, fixed-income dShares, private credit, yield-bearing notes, basis/carry strategies, yield-bearing stablecoins). Equity dividends are not surfaced here — they’re part of StockKit positions.Perps API (existing)
https://perps.yield.xyz/v1 — crypto perpetual futures and the broader perps catalog. Remains live during the Trade API rollout; will eventually fold into Trade API.Issuer Comparison
The canonical at-a-glance view of every StockKit issuer. Per-issuer detail lives in the Issuer Directory.Asset-Type Index
Find an asset class. See every issuer that offers it and what wrapper they use.- Mega-cap US Equities (Mag 7 & adjacent)
- Other US Equities
- US Broad-Market & Sector ETFs
- International Equities
- Commodities
- Forex, Indices & Specialty
Issuer Directory
Hyperliquid HIP-3 Markets — Live
Hyperliquid HIP-3 Markets — Live
Ondo Global Markets
Ondo Global Markets
USDon. Routing settlement through Ondo’s USDon stablecoin keeps the cash leg fully on-chain and isolates it from broker-dealer settlement timing. From the integrator’s perspective, this is transparent — users deposit USDC and receive the tokenized equity in the same transaction.xStocks (Backed Finance / Kraken)
xStocks (Backed Finance / Kraken)
bIB01, bC3M) that are yield-bearing rather than equity. Those are served via RWA Kit on api.yield.xyz, not here. xStocks (TSLAx, etc.) and bCSPX (the S&P 500 UCITS tracker) are equity-style and live on the Trade API.The Integration Model
Every StockKit market — collateralized or synthetic — follows the same four-phase lifecycle.Discover markets
GET /v1/markets to enumerate enabled markets for your project. Filter on providerId, assetType (equity / etf / commodity / forex / index), network, or structure (collateralized / synthetic_perp).Submit an action
POST /v1/actions with a market ID, user address, and the action payload (open / close / limit / stop-loss / take-profit, or mint / redeem / swap for collateralized issuers). The Trade API returns one or more fully constructed unsigned transactions plus an actionId for status polling.Submit transactions
POST /v1/transactions/{transactionId}/submit. The transaction is broadcast on the appropriate network (HyperEVM, Ethereum, Solana, Base, etc.).Track positions
POST /v1/positions, /v1/balances, and /v1/orders for per-user state. Use GET /v1/actions/{actionId} for action progress (signed → broadcast → confirmed).actions returns a recoverable HTTP 412 if the address is not yet KYC’d. See KYC Precondition Errors.
Identifying Instruments
Every StockKit market is returned byGET /v1/markets with the canonical shape:
Filter Assets
Integration Walkthrough — Hyperliquid HIP-3 (Live)
The Trade API contract is identical for every StockKit market. We use Hyperliquid HIP-3 NVDA as the example because it’s the only live integration today, and it exercises the full action / transaction / position surface.Dashboard setup & API key
- Log in to
dashboard.yield.xyz. - Navigate to Projects → Create Project.
- Inside the project: API Keys → Create API Key.
Enable StockKit markets
- In your project, scroll to the StockKit section.
- Open the Hyperliquid HIP-3 category.
- Search for and select the markets you want enabled (e.g. NVDA, TSLA, GOLD, XYZ100).
- Click Save.
GET /v1/markets for this project’s API key.Discover markets and fetch metadata
{ min, max, default } — leverage bounds per market.kycRequired, geoRestricted, and any project-level overrides.Open a position
POST /v1/transactions/{transactionId}/submit.Manage the position
open_position, close_position, partial_close, place_limit_order, cancel_order, set_stop_loss, set_take_profit, update_leverage, change_margin_mode.Track positions, balances, and orders
marketId, side, size, entryPrice, markPrice, unrealizedPnl, leverage, marginMode, liquidationPrice./v1/positions, /v1/balances, /v1/orders all accept an array of addresses).Builder-fee monetization
HIP-3 markets support builder-code monetization: a per-fill fee up to 10 bps (0.1%) on notional, routed to a project-owned wallet.{"b": "<YOUR_BUILDER_ADDRESS>", "f": 100} in the payload and the builder receives the fee on each fill.
Position Lifecycle & Balance States
StockKit normalizes every position into one of five states, regardless of issuer or structure.Position.distributions[]) is independent of state — distributions can accrue against an Active position regardless of issuer. Pull historical declarations via GET /v1/markets/{marketId}/distributions and per-user paid events via GET /v1/positions/{userId}/{marketId}/distributions.
Error Handling Reference
412 Precondition Failed — KYC required (collateralized issuers)
412 Precondition Failed — KYC required (collateralized issuers)
details.kycUrl. Alternatively, route the user to a DEX-secondary path where available (Dinari dShares, xStocks).422 Unprocessable Entity — leverage or size invalid
422 Unprocessable Entity — leverage or size invalid
[min, max] range, or when the requested size violates margin requirements.Action: surface market.leverage and market.minSize to the user before request submission.409 Conflict — market closed / paused
409 Conflict — market closed / paused
GET /v1/markets/{id} until status.tradingOpen returns to true, or route the user to a 24/7 alternative (Hyperliquid HIP-3 for the same underlying, where one exists).KYC Precondition Errors
When a user attempts a permissioned primary action from a non-allowlisted address, the API returns HTTP 412 Precondition Failed:- Catch the 412.
- Redirect to
details.kycUrl(a hosted flow onapi.kyc.yield.xyzthat proxies to the issuer’s portal). - After KYC confirmation, retry the original action.
(wallet, issuer) pairs across both surfaces.
