Getting Started
This guide will get you all set up and ready to use the Aori API. We'll cover how to get started using one of our SDK's and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of the Execution API.
Interacting with the Aori API currently requires an API key, visit the Aori Developer Portal to receive an integrator ID to be provided tracking and analytics on your integration.
Introduction
URL's | |
---|---|
https://api.aori.io | HTTP API to be able to execute intents. |
wss://api.aori.io | WebSocket API for real time event streaming. |
Endpoints | Method | Description |
---|---|---|
/quote | POST | Request a price quote for cross-chain swaps |
/swap | POST | Submit a signed swap order for execution |
/chains | GET | Get information about supported blockchain networks |
/data/query | GET | Query historical orders with filtering and pagination |
/data/status | GET | Get current status and execution details of an order |
/data/details | GET | Get comprehensive order details with event history |
/stream | Websocket | Real-time WebSocket stream for order events |
Choosing your Client
Before making your first API request, you need to pick which API client you will use.
# Install the TypeScript SDK
npm install @aori-io/aori-ts --save
The recommended way to interact with the Aori API is by using one of our SDKs. Today, Aori offers fine-tuned Typescript and Rust libraries to make your integration as easy as possible and give you the best experience when interacting with Aori.
API Key Authentication
While the Aori API doesn't require authentication for basic usage, we recommend obtaining an API key from the Aori Developer Portal for enhanced tracking and analytics.
Using API Keys
const apiKey = process.env.AORI_API_KEY;
// Include API key in any request
const quote = await getQuote(quoteRequest, 'https://api.aori.io', apiKey);
const swap = await submitSwap(swapRequest, 'https://api.aori.io', apiKey);
Making your first API request
After picking your preferred client, you are ready to make your first call to Aori. Let's start by checking the API health status.
Check Connectivity
curl https://api.aori.io/health
Response
{
"status": "ok"
}
What's next?
Great, now you're set up with the Aori SDK and have made your first request. Here's concepts to explore next to build powerful cross-chain applications:
Quotes
Request pricing for cross-chain swaps with real-time market data. Quotes include all necessary parameters for order creation.
Swaps
Submit signed orders to execute cross-chain swaps. Swaps are atomic operations with guaranteed settlement or refund.
Orders
Work with order structures and lifecycle management. Track orders from creation through completion.
Status Tracking
Monitor order execution in real-time with status updates and transaction hashes for both source and destination chains.
Signatures
Cryptographically sign orders using your private key or wallet to authorize cross-chain swaps securely.
WebSocket Streaming
Monitor order events in real-time with WebSocket connections and event subscriptions for live updates.
Data & Querying
Query historical orders with advanced filtering and pagination for analytics and order management.
Supported Chains
Learn about supported blockchain networks, chain identifiers, and contract addresses.