Skip to content

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

FieldTypeRequiredDescription
fromAssetAddressstringYesSource asset contract address
fromChainstringYesSource chain (e.g., "base", "ethereum")
toAssetAddressstringYesDestination asset contract address
toChainstringYesDestination chain (e.g., "avalanche")
fromAmountstringYesAmount of fromAssetAddress to bridge (e.g., "100")
routeIdstringYesRoute 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 routeId from 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 400 with details explaining the rule. If an asset cannot be resolved right now, the request returns 503 and should be retried

References