Cross-Chain Bridges
Monitor bridge activity, volume, and liquidity across chains.
Try it Live
Open in Swagger UI โ to test these endpoints interactively.
Endpointsโ
| Endpoint | Description | Price |
|---|---|---|
GET /api/defi/bridges | All bridges | $0.01 |
GET /api/bridges/volume | Bridge volumes | $0.01 |
GET /api/defi/bridgesโ
List all cross-chain bridges with TVL and supported chains.
Requestโ
curl https://api.web3identity.com/api/defi/bridges
Query Parametersโ
| Parameter | Type | Default | Description |
|---|---|---|---|
chain | string | - | Filter bridges supporting this chain |
minTvl | number | - | Minimum TVL filter |
sort | string | tvl | Sort by: tvl, volume24h |
limit | number | 100 | Max results |
Responseโ
{
"bridges": [
{
"id": "stargate",
"name": "Stargate",
"slug": "stargate",
"chains": [
"ethereum",
"arbitrum",
"optimism",
"polygon",
"avalanche",
"fantom",
"bsc",
"base"
],
"tvl": 456789012,
"tvlChange24h": 1.2,
"volume24h": 12345678,
"volume7d": 89012345,
"transactions24h": 1234,
"logo": "https://icons.llama.fi/stargate.png",
"url": "https://stargate.finance"
},
{
"id": "across",
"name": "Across Protocol",
"slug": "across",
"chains": [
"ethereum",
"arbitrum",
"optimism",
"polygon",
"base"
],
"tvl": 123456789,
"tvlChange24h": -0.5,
"volume24h": 5678901,
"volume7d": 34567890,
"transactions24h": 567,
"logo": "https://icons.llama.fi/across.png",
"url": "https://across.to"
},
{
"id": "synapse",
"name": "Synapse",
"slug": "synapse",
"chains": [
"ethereum",
"arbitrum",
"optimism",
"polygon",
"avalanche",
"bsc",
"fantom"
],
"tvl": 234567890,
"tvlChange24h": 0.8,
"volume24h": 8901234,
"volume7d": 56789012,
"transactions24h": 890,
"logo": "https://icons.llama.fi/synapse.png",
"url": "https://synapseprotocol.com"
}
],
"total": 3,
"timestamp": "2026-02-08T16:30:00Z"
}
GET /api/bridges/volumeโ
Get detailed bridge volume data by chain and time period.
Requestโ
curl "https://api.web3identity.com/api/bridges/volume?bridge=stargate"
Query Parametersโ
| Parameter | Type | Default | Description |
|---|---|---|---|
bridge | string | - | Bridge slug |
chain | string | - | Specific chain |
period | string | 24h | Time period: 24h, 7d, 30d |
Responseโ
{
"bridge": "stargate",
"name": "Stargate",
"period": "24h",
"totalVolume": 12345678,
"totalTransactions": 1234,
"volumeByChain": {
"ethereum": {
"volume": 5678901,
"transactions": 456,
"inflow": 3456789,
"outflow": 2222112
},
"arbitrum": {
"volume": 2345678,
"transactions": 345,
"inflow": 1234567,
"outflow": 1111111
},
"optimism": {
"volume": 1234567,
"transactions": 234,
"inflow": 678901,
"outflow": 555666
},
"polygon": {
"volume": 987654,
"transactions": 123,
"inflow": 456789,
"outflow": 530865
}
},
"volumeByToken": {
"USDC": 6789012,
"USDT": 3456789,
"ETH": 1234567,
"DAI": 865310
},
"routes": [
{
"from": "ethereum",
"to": "arbitrum",
"volume": 2345678,
"transactions": 234,
"avgAmount": 10024
},
{
"from": "arbitrum",
"to": "ethereum",
"volume": 1234567,
"transactions": 123,
"avgAmount": 10037
}
],
"timestamp": "2026-02-08T16:30:00Z"
}
Bridge Comparisonโ
| Bridge | Chains | Speed | Fees | Security Model |
|---|---|---|---|---|
| Stargate | 10+ | Fast (1-15 min) | 0.04-0.06% | Layered security |
| Across | 5+ | Very fast (<2 min) | Variable | Optimistic oracle |
| Synapse | 15+ | Medium (5-30 min) | 0.03-0.05% | Multi-party computation |
| Hop | 7+ | Fast (5-15 min) | Variable | Bonded transfers |
SDK Examplesโ
JavaScriptโ
import { Web3IdentityClient } from '@web3identity/sdk';
const client = new Web3IdentityClient();
// Get all bridges
const bridges = await client.getBridges({ sort: 'volume24h' });
console.log('Top bridges by 24h volume:');
bridges.bridges.forEach((bridge, i) => {
console.log(`${i + 1}. ${bridge.name}`);
console.log(` Volume: $${(bridge.volume24h / 1e6).toFixed(2)}M`);
console.log(` TVL: $${(bridge.tvl / 1e6).toFixed(2)}M`);
console.log(` Chains: ${bridge.chains.length}`);
});
// Find bridges supporting specific chain
const baseBridges = await client.getBridges({ chain: 'base' });
console.log(`\nBridges supporting Base: ${baseBridges.bridges.length}`);
// Get volume breakdown
const volume = await client.getBridgeVolume({
bridge: 'stargate',
period: '7d'
});
console.log(`\nStargate 7-day volume: $${(volume.totalVolume / 1e6).toFixed(2)}M`);
console.log('Top routes:');
volume.routes.slice(0, 5).forEach(route => {
console.log(` ${route.from} โ ${route.to}: $${(route.volume / 1e6).toFixed(2)}M`);
});
Pythonโ
from web3identity import Client
client = Client()
# Get all bridges
bridges = client.get_bridges(sort='tvl')
print("Top bridges by TVL:")
for bridge in bridges['bridges'][:10]:
print(f"{bridge['name']}: ${bridge['tvl'] / 1e6:.2f}M TVL")
print(f" 24h Volume: ${bridge['volume24h'] / 1e6:.2f}M")
# Find cheapest bridge for a route
def find_best_bridge(from_chain, to_chain):
bridges = client.get_bridges(chain=from_chain)
suitable = [
b for b in bridges['bridges']
if to_chain in b['chains']
]
# Sort by volume (proxy for reliability)
return sorted(suitable, key=lambda x: x['volume24h'], reverse=True)
best = find_best_bridge('ethereum', 'arbitrum')
print(f"\nBest Ethereum โ Arbitrum bridge: {best[0]['name']}")
# Get volume data
volume = client.get_bridge_volume(bridge='across', period='24h')
print(f"\nAcross 24h volume: ${volume['totalVolume'] / 1e6:.2f}M")
cURL Examplesโ
# Get all bridges
curl https://api.web3identity.com/api/defi/bridges
# Sort by volume
curl "https://api.web3identity.com/api/defi/bridges?sort=volume24h"
# Find bridges supporting Base
curl "https://api.web3identity.com/api/defi/bridges?chain=base"
# Get Stargate volume
curl "https://api.web3identity.com/api/bridges/volume?bridge=stargate"
# Get 7-day volume
curl "https://api.web3identity.com/api/bridges/volume?bridge=stargate&period=7d"
# Get chain-specific volume
curl "https://api.web3identity.com/api/bridges/volume?bridge=across&chain=arbitrum"
Rate Limitsโ
| Tier | Rate Limit | Notes |
|---|---|---|
| Free | 100 requests/day | No payment required |
| Paid | Unlimited | $0.01 per call via x402 |
Common Use Casesโ
Bridge Aggregatorโ
// Find best bridge for a route
async function findBestBridge(fromChain, toChain, token) {
const bridges = await client.getBridges({ chain: fromChain });
const suitable = bridges.bridges.filter(b =>
b.chains.includes(toChain)
);
// Enrich with volume data
const withVolume = await Promise.all(
suitable.map(async bridge => {
const volume = await client.getBridgeVolume({
bridge: bridge.slug,
period: '24h'
});
const route = volume.routes.find(r =>
r.from === fromChain && r.to === toChain
);
return {
...bridge,
routeVolume: route?.volume || 0,
routeTxs: route?.transactions || 0
};
})
);
// Sort by route volume (liquidity indicator)
return withVolume.sort((a, b) => b.routeVolume - a.routeVolume);
}
const best = await findBestBridge('ethereum', 'base', 'USDC');
console.log(`Best bridge: ${best[0].name}`);
Cross-Chain Activity Monitorโ
// Track bridge flows across ecosystem
async function monitorBridgeActivity() {
const bridges = await client.getBridges({ sort: 'volume24h' });
const activity = await Promise.all(
bridges.bridges.slice(0, 5).map(async bridge => {
const volume = await client.getBridgeVolume({
bridge: bridge.slug,
period: '24h'
});
// Identify net flow direction
const flows = Object.entries(volume.volumeByChain).map(([chain, data]) => ({
chain,
netFlow: data.inflow - data.outflow
}));
return {
bridge: bridge.name,
totalVolume: volume.totalVolume,
hotChains: flows.sort((a, b) => Math.abs(b.netFlow) - Math.abs(a.netFlow)).slice(0, 3)
};
})
);
return activity;
}
Related Endpointsโ
- DeFi Protocols โ Protocol data
- DeFi TVL โ Historical TVL
- Gas Prices โ Transaction costs
- Token Prices โ Token pricing