Bridge API
Endpoints for cross-chain bridge operations using the Across protocol.
Endpoints
Get Bridge Routes
GET /bridge/routes
Retrieve available bridge routes for a token pair across chains.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
sourceChainId | number | Yes | Origin chain ID |
destChainId | number | Yes | Destination chain ID |
tokenAddress | string | Yes | Token to bridge |
Response:
{
"routes": [
{
"sourceChain": 1,
"destChain": 42161,
"token": "USDC",
"estimatedTime": "2-10 minutes",
"available": true
}
]
}
Get Bridge Fees
GET /bridge/fees
Calculate bridge fees for a specific route and amount.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
sourceChainId | number | Yes | Origin chain ID |
destChainId | number | Yes | Destination chain ID |
tokenAddress | string | Yes | Token address |
amount | string | Yes | Amount to bridge |
Response:
{
"totalFee": "2.50",
"relayerFee": "1.50",
"lpFee": "1.00",
"estimatedReceived": "997.50"
}
Get Bridge Limits
GET /bridge/limits
Get minimum and maximum transfer limits for a bridge route.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
sourceChainId | number | Yes | Origin chain ID |
destChainId | number | Yes | Destination chain ID |
tokenAddress | string | Yes | Token address |
Execute Bridge Deposit
POST /bridge/deposit
Initiate a bridge transfer.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
sourceChainId | number | Yes | Origin chain ID |
destChainId | number | Yes | Destination chain ID |
tokenAddress | string | Yes | Token to bridge |
amount | string | Yes | Amount to bridge |
walletAddress | string | Yes | Sender address |
destinationAddress | string | No | Recipient address (defaults to sender) |