get_bridge_transactions
Retrieve bridge transaction data by specifying a bridge ID, date range, and optional filters like source chain or address to analyze cross-chain activity.
Instructions
GET /transactions/{id}
Get all transactions for a bridge within a date range.
Parameters:
id: bridge ID (can be retrieved from /bridges)
start_timestamp: start timestamp (Unix Timestamp) for date range
end_timestamp: end timestamp (Unix Timestamp) for date range
source_chain: filter by source chain (e.g., 'Polygon')
address: filter by address in format {chain}:{address}
limit: limit number of transactions returned (max 6000)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| start_timestamp | No | ||
| end_timestamp | No | ||
| source_chain | No | ||
| address | No | ||
| limit | No |
Implementation Reference
- defillama_server.py:570-603 (handler)Handler function for the 'get_bridge_transactions' tool. It constructs parameters based on inputs and makes an API request to DefiLlama's /transactions/{id} endpoint to retrieve bridge transactions.@mcp.tool() async def get_bridge_transactions( id: int, start_timestamp: Optional[int] = None, end_timestamp: Optional[int] = None, source_chain: Optional[str] = None, address: Optional[str] = None, limit: Optional[int] = None ) -> str: """GET /transactions/{id} Get all transactions for a bridge within a date range. Parameters: id: bridge ID (can be retrieved from /bridges) start_timestamp: start timestamp (Unix Timestamp) for date range end_timestamp: end timestamp (Unix Timestamp) for date range source_chain: filter by source chain (e.g., 'Polygon') address: filter by address in format {chain}:{address} limit: limit number of transactions returned (max 6000) """ params = {} if start_timestamp is not None: params['starttimestamp'] = start_timestamp if end_timestamp is not None: params['endtimestamp'] = end_timestamp if source_chain is not None: params['sourcechain'] = source_chain if address is not None: params['address'] = address if limit is not None: params['limit'] = limit result = await make_request('GET', f'/transactions/{id}', params) return str(result)