Skip to main content
The Cross-chain API quotes, executes, and tracks intents from your server. It runs on the same OMS API hosts as the Payments API and authenticates with your OMS publishable key.

Authentication

Send your OMS publishable key in the Api-Key header on every request. Create keys in the OMS Dashboard.
The key’s mode selects the host. A sandbox key (pk_sdbx_...) is rejected on the production host, and a live key (pk_live_...) is rejected on the sandbox host.

Base URL

Every operation is a POST to the base URL followed by the operation name, with a JSON body. Read operations use POST as well.

TypeScript client

The @0xtrails/api package wraps every operation with typed requests and responses.
The client reads the key’s mode and sends requests to the matching host. Method names are the operation names in camel case: QuoteIntent is intents.quoteIntent(). Token amounts in the client are bigint values in the token’s smallest unit.

Intent lifecycle

A quote that is not executed within 15 minutes cannot be executed. Request a new quote instead. Terminal receipts include a statusReason that names the limit that was hit, such as slippage or a deposit timeout.

Operations

Quotes and execution

QuoteIntent, ExecuteIntent, AbortIntent, and the Tron and Solana operations

Status and history

GetIntentReceipt, WaitIntentReceipt, GetIntent, SearchIntents, GetIntentHistory

Routes and discovery

Chains, tokens, routes, prices, and currencies

Errors

Error format and codes