## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.useRequests
Fetch cross-chain Relay transactions
[!WARNING]useRequestsandqueryRequestsread fromGET /requests/v3, which requires a Relay API key sent via thex-api-keyheader. Because these hooks run in the browser, never ship your API key to the client — point `baseApiUrl` at a server-side proxy that injectsx-api-key.
Parameters
| Parameter | Description | Required | |
|---|---|---|---|
| baseApiUrl | Base API URL for the Relay API. /requests/v3 requires an x-api-key, so point this at a server-side proxy that injects the key rather than at https://api.relay.link directly. | ❌ | |
| options | Query parameters that map directly to the requests api | ❌ | |
| queryOptions | Tanstack query options. Refer to the Tanstack docs. | ❌ |
Return Data
The hook returns an object with the base Tanstack Query response. The data property maps to the object returned in the aforementioned requests api.
Usage
import { useRequests } from '@relayprotocol/relay-kit-hooks'
const { data: transactions } = useRequests()
Query Function
import { queryRequests } from '@relayprotocol/relay-kit-hooks'
queryRequests()
This documentation is built and hosted on Mintlify, a developer documentation platform.