get_bridge_transactions
Retrieve all transactions for a specific bridge within a date range. Filter results by source chain, address, or limit the number of transactions returned.
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 |
|---|---|---|---|
| address | No | ||
| end_timestamp | No | ||
| id | Yes | ||
| limit | No | ||
| source_chain | No | ||
| start_timestamp | No |
Implementation Reference
- defillama_server.py:570-603 (handler)The handler function for the 'get_bridge_transactions' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function constructs parameters and makes a GET request to the DefiLlama API endpoint '/transactions/{id}' 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)