Orkid SDK & Widget
@orkid-labs/sdk โ TypeScript client for the Orkid gasless swap API
(quote โ execute flow, Permit2 signing helpers, CLI).
@orkid-labs/widget โ white-label React swap widget embedding the same
engine.
Install
npm install @orkid-labs/sdk # TS client + CLI
npm install @orkid-labs/widget # React widget
SDK flow
import { OrkidClient } from "@orkid-labs/sdk"
const client = new OrkidClient({
apiKey: process.env.ORKID_API_KEY, // free at orkidlabs.xyz/partner
baseUrl: "https://orkidlabs.xyz", // or "sandbox" mode
})
const quote = await client.quote({
from: "USDC", to: "WETH", amount: "25", chain: "base",
})
// quote.swapUrl โ hand to user to sign, or drive execute() with
// the user's signer for non-custodial execution
Swaps execute gasless via Permit2: the solver pays gas, the user signs a
message. Routes aggregate Tycho pool liquidity + RFQ market makers with
MEV protection.
Widget
Drop-in React component wrapping the same engine โ white-label styling
hooks; check orkid-widget/ for props.
MCP alternative
For agents that speak MCP rather than TypeScript, the same engine is
exposed at https://orkidlabs.xyz/api/mcp (orkid_quote,
orkid_bridge_quote, orkid_swap_link, orkid_chains) โ x402
pay-per-call, no key needed, or npx -y orkid-swap-mcp for stdio.
Links