Authentication
Send your OMS publishable key in theApi-Key header on every request. Create keys in the OMS Dashboard.
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.
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 operationsStatus and history
GetIntentReceipt, WaitIntentReceipt, GetIntent, SearchIntents, GetIntentHistoryRoutes and discovery
Chains, tokens, routes, prices, and currencies
Errors
Error format and codes