API Reference
Get Requests
API Reference
Get Requests
This API returns all the cross-chain transactions.
GET
/
requests
/
v2
curl --request GET \
--url https://api.relay.link/requests/v2
{
"requests": {
"id": "0xddd6c1a0340e940b7be4f5a4be076df8b7ec7de7b18f9ec6efe4bfffd2f21cf6",
"status": "success",
"user": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
"recipient": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
"data": {
"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>"
}
Query Parameters
Get all requests for a single chain in either direction. Setting originChainId and/or destinationChainId will override this parameter.
Available options:
createdAt
, updatedAt
Response
200 - application/json
Default Response
Note that fallback is returned in the case of a refund
Available options:
refund
, delayed
, waiting
, failure
, pending
, success
Slippage tolerance for the swap. This value is in basis points (1/100th of a percent), e.g. 50 for 0.5% slippage
Available options:
UNKNOWN
, AMOUNT_TOO_LOW_TO_REFUND
, DEPOSIT_ADDRESS_MISMATCH
, DEPOSIT_CHAIN_MISMATCH
, N/A
Total fees in wei
The type of transaction, always set to onchain
Total fees in wei
The type of transaction, always set to onchain
curl --request GET \
--url https://api.relay.link/requests/v2
{
"requests": {
"id": "0xddd6c1a0340e940b7be4f5a4be076df8b7ec7de7b18f9ec6efe4bfffd2f21cf6",
"status": "success",
"user": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
"recipient": "0x456bccd1eaa77d5cc5ace1723b5dcca00d67cdea",
"data": {
"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>"
}