Orkid

CLI

The orkid command-line tool for testing integration without writing code.

The SDK ships an orkid binary for testing integration without writing code.

Setup

# via npx once published, or `node dist/cli.js` inside this repo
export ORKID_API_KEY=<your-40-hex-key>
# export ORKID_API_URL=https://orkidlabs.xyz   # optional override

Commands

orkid quote --from USDC --to WETH --amount 25 --chain base
orkid tokens --chain base --search USDC
orkid account          # partner account info + rebate rate
orkid usage            # your account's usage events
orkid usage --event-type solve --period 2026-09
orkid rebates          # your accrued monthly rebates
orkid rebates --period 2026-09
orkid status           # API health check

Global flags

FlagDescription
--api-key <key>Override ORKID_API_KEY env var
--base-url <url>Override ORKID_API_URL env var
--jsonRaw JSON output
-h, --helpShow help

Sandbox usage

To target the sandbox, pass --base-url:

orkid --base-url https://sandbox.orkidlabs.com --api-key <sandbox-key> status
orkid --base-url https://sandbox.orkidlabs.com --api-key <sandbox-key> quote --from USDC --to WETH --amount 25 --chain base

Live solve

Live solve requires a funded wallet with a Permit2 allowance and viem installed:

npm i viem
export ORKID_PRIVATE_KEY=0x...
orkid solve --from USDC --to WETH --amount 25 \
  --from-address 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 --from-decimals 6 \
  --to-address 0x4200000000000000000000000000000000000006 --to-decimals 18

The default is a dry-run. Pass --execute to submit the live swap.

Confirm a user-pays-gas swap

For below-minimum swaps where the user pays gas, confirm the transaction after it's mined:

orkid confirm <txHash> --chain base

This is automatic after solve --execute fallbacks.

On this page