Submit Bridge
Submit a bridge transaction using a route from a bridge quote.
Endpoint
Portfolio API: POST https://ddp.definitive.fi/v2/portfolio/bridge
Organization API: Replace
/v2/portfolio/with/v2/organization/portfolios/{portfolioId}/. See Portfolio vs. Organization API.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| fromAssetAddress | string | Yes | Source asset contract address |
| fromChain | string | Yes | Source chain (e.g., "base", "ethereum") |
| toAssetAddress | string | Yes | Destination asset contract address |
| toChain | string | Yes | Destination chain (e.g., "avalanche") |
| fromAmount | string | Yes | Amount of fromAssetAddress to bridge (e.g., "100") |
| routeId | string | Yes | Route ID from bridge quote response |
Request Body Examples
// 1. Get quote
const quoteResponse = await AuthHelpers.signAndSend({
path: "/v2/portfolio/bridge/quote",
method: "POST",
body: {
fromAssetAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
fromChain: "base",
toAssetAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
toChain: "avalanche",
fromAmount: "100",
},
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
// 2. Extract routeId and submit bridge
const routeId = quoteResponse.routes[0].routeId;
const bridgeResponse = await AuthHelpers.signAndSend({
path: "/v2/portfolio/bridge",
method: "POST",
body: {
fromAssetAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
fromChain: "base",
toAssetAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
toChain: "avalanche",
fromAmount: "100",
routeId,
},
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});Response
{
"success": true
}Notes
- Use
routeIdfrom a recent quote (quotes expire and should be used quickly) - Supported pairs: the same ticker on both chains (for example ETH on Ethereum to ETH on Base; WETH to ETH does not qualify), or a stablecoin ticker on each side (USDC, USDCe, USDT, USDTe, USDT0, USDG). Tickers are matched case-insensitively
- A pair outside that rule returns
400withdetailsexplaining the rule. If an asset cannot be resolved right now, the request returns503and should be retried