## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.relay.link/llms.txt)

Use this file to discover all available pages before exploring further.

### cURL

```bash
curl --request GET \
  --url 'https://api.relay.link/requests/v2?limit=20&sortBy=createdAt'
```

### JavaScript Fetch

```javascript
const options = {method: 'GET'};

fetch('https://api.relay.link/requests/v2?limit=20&sortBy=createdAt', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python Requests

```python
import requests

url = "https://api.relay.link/requests/v2?limit=20&sortBy=createdAt"

response = requests.get(url)

print(response.text)
```

### Response Example

**Response Code:** 200

```json
{
  "requests": {
    "id": "0xddd6c1a0340e940b7be4f5a4be076df8b7ec7de7b18f9ec6efe4bfffd2f21cf6",
    "status": "success",
    "user": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
    "recipient": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
    "depositAddress": {
      "address": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
      "depositAddressType": "open",
      "depositor": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
      "depositTxHash": "0x34d78ccb41099f0546be1c35541b28ab4c92b498aeb4cae6e849c51c05fe1f1b"
    },
    "data": {
      "subsidizedRequest": false,
      "fees": {
        "gas": "2622672522398",
        "fixed": "10000000000000",
        "price": "39000000000000"
      },
      "feesUsd": {
        "gas": "9057",
        "fixed": "34534",
        "price": "134684"
      },
      "inTxs": [
        {
          "fee": "423218878900",
          "data": {
            "to": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
            "data": "0x5869d8",
            "from": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
            "value": "2651622672522398"
          },
          "hash": "0xe53021eaa63d100b08338197d26953e2219bcbad828267dd936c549ff643aad7",
          "type": "onchain",
          "chainId": 7777777,
          "timestamp": 1713290377
        }
      ],
      "currency": "eth",
      "price": "2600000000000000",
      "usesExternalLiquidity": false,
      "outTxs": [
        {
          "fee": "1837343366480",
          "data": {
            "to": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
            "data": "0x5869d8",
            "from": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
            "value": "2600000000000000"
          },
          "hash": "0x9da7bc54dfe6229d6980fd62250d472f23dfe0f41a1cdc870c81a08b3445f254",
          "type": "onchain",
          "chainId": 8453,
          "timestamp": 1713290383
        }
      ]
    },
    "moonpayId": "9dc342c3-538b-4731-aba7-13ed89acc7ae",
    "createdAt": "2024-04-16T17:59:39.702Z",
    "updatedAt": "2024-04-16T17:59:46.145Z"
  },
  "continuation": "<string>"
}
```

### Headers
- `x-api-key`: Optional API key for authentication and higher rate limits.

### Query Parameters
- `limit`: Maximum number of requests to return per page (default: 20).
- Other parameters include `continuation`, `user`, `hash`, `originChainId`, `destinationChainId`, `id`, `orderId`, `sortBy`, etc.

### Response
- **Status Code:** `200` - application/json
- **200 Response Format:** See above.
