OpenAPI Specification
Machine-readable API spec and how to use it.
Orkid provides an OpenAPI 3.1 specification for all public API endpoints.
Download
The OpenAPI spec is included in the @orkid-labs/sdk package:
npm install @orkid-labs/sdkThe file is at node_modules/@orkid-labs/sdk/openapi.yaml.
You can also download it directly: openapi.yaml.
Endpoints covered
| Endpoint | Method | Description |
|---|---|---|
/api/v1/route | POST | Get an executable quote |
/api/v1/solve | POST | Execute a gasless swap |
/api/v1/account | GET | Partner account info |
/api/v1/usage | GET | Usage events |
/api/v1/rebates | GET | Rebate ledger |
/api/v1/confirm | POST | Confirm user-pays-gas tx |
/api/v1/bridge/chains | GET | Bridge-supported chains |
/api/v1/bridge/tokens | GET | Curated bridgeable tokens per chain |
/api/v1/bridge/quote | POST | Executable cross-chain bridge quote |
/api/v1/bridge/status | GET | Deposit lifecycle status |
/api/v1/bridge/track | POST | Register a deposit for tracking |
Using the spec
Generate a client
Use openapi-generator to generate a client in your language:
npx @openapitools/openapi-generator-cli generate \
-i openapi.yaml \
-g typescript-fetch \
-o ./orkid-clientSupported languages include TypeScript, Python, Go, Rust, Java, Ruby, and more.
Import into Postman / Insomnia
Import the openapi.yaml file into Postman or Insomnia to get a pre-configured collection with all endpoints, schemas, and example payloads.
Validate against the spec
Use a validator to check your requests match the expected schema:
npx @redocly/cli lint openapi.yamlVersioning
The OpenAPI spec follows the API version. The current version is 1.0.0. Breaking changes will increment the major version and be announced in the changelog.
Source
The SDK source (including openapi.yaml) is available at github.com/orkid-labs/orkid-sdk.