Claim rewards
curl --request GET \
--url https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mainnet": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"optimism": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"arbitrum": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"polygon": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"gnosis": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"base": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"unichain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"swellchain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"celo": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"worldchain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"berachain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"ink": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"bsc": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"hyperliquid": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"plasma": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"avalanche": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"katana": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"linea": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"mega-eth": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"monad": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"etherlink": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"robinhood": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
}
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Transactions
Claim rewards
Generates a claim rewards transaction for a user, returning transaction payloads needed to claim rewards from protocols.
GET
/
v2
/
transactions
/
rewards
/
claim
/
{userAddress}
Claim rewards
curl --request GET \
--url https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/v2/transactions/rewards/claim/{userAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mainnet": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"optimism": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"arbitrum": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"polygon": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"gnosis": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"base": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"unichain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"swellchain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"celo": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"worldchain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"berachain": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"ink": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"bsc": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"hyperliquid": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"plasma": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"avalanche": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"katana": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"linea": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"mega-eth": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"monad": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"etherlink": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
},
"robinhood": {
"currentActionIndex": 123,
"actions": [
{
"name": "<string>",
"tx": {
"to": "<string>",
"chainId": 1,
"data": "<string>",
"value": "<string>"
},
"simulation": {
"url": "<string>",
"tokensReceived": {},
"tokensSpent": {}
}
}
]
}
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Authorizations
Path Parameters
User address to claim rewards for
Pattern:
^0x[a-fA-F0-9]{40}$Query Parameters
DEPRECATED: This parameter is deprecated and no longer functional
Array of claim IDs to be claimed
Minimum string length:
1Response
Default Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

