Earn fee collect
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"vault_id": "cm7oxq1el000e11o8iwp7d0d0"
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"vault_id\": \"cm7oxq1el000e11o8iwp7d0d0\"\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({vault_id: 'cm7oxq1el000e11o8iwp7d0d0'})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect', 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.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vault_id' => 'cm7oxq1el000e11o8iwp7d0d0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect"
payload := strings.NewReader("{\n \"vault_id\": \"cm7oxq1el000e11o8iwp7d0d0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"wallet_id": "fmfdj6yqly31huorjqzq38zc",
"created_at": "2026-01-15T12:00:00.000Z",
"type": "earn_fee_collect",
"caip2": "eip155:8453",
"vault_id": "cm7oxq1el000e11o8iwp7d0d0",
"vault_address": "0x1234567890abcdef1234567890abcdef12345678",
"asset": "usdc",
"asset_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"decimals": 6,
"amount": "12.34",
"raw_amount": "12340000"
}Earn
Earn fee collect
Collect accumulated performance fees from an Aave vault.
POST
/
v1
/
wallets
/
{wallet_id}
/
earn
/
ethereum
/
fees
/
collect
Earn fee collect
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"vault_id": "cm7oxq1el000e11o8iwp7d0d0"
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"vault_id\": \"cm7oxq1el000e11o8iwp7d0d0\"\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({vault_id: 'cm7oxq1el000e11o8iwp7d0d0'})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect', 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.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vault_id' => 'cm7oxq1el000e11o8iwp7d0d0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/fees/collect"
payload := strings.NewReader("{\n \"vault_id\": \"cm7oxq1el000e11o8iwp7d0d0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"wallet_id": "fmfdj6yqly31huorjqzq38zc",
"created_at": "2026-01-15T12:00:00.000Z",
"type": "earn_fee_collect",
"caip2": "eip155:8453",
"vault_id": "cm7oxq1el000e11o8iwp7d0d0",
"vault_address": "0x1234567890abcdef1234567890abcdef12345678",
"asset": "usdc",
"asset_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"decimals": 6,
"amount": "12.34",
"raw_amount": "12340000"
}If your app has gas sponsorship configured, usage of the
/earn/ethereum/fees/collect endpoint
will be gas-sponsored by default. There is no need to
specify additional parameters for sponsorship.Authorizations
Headers
Body
application/json
Input for collecting accumulated fees from an Aave vault.
Response
200 - application/json
Earn fee collect initiated successfully.
Response for an earn fee collect action.
steps
(EVMTransactionWalletActionStep · object | EVMUserOperationWalletActionStep · object | SVMTransactionWalletActionStep · object | TVMTransactionWalletActionStep · object | ExternalTransactionWalletActionStep · object | CustodianTransactionWalletActionStep · object | TempoZoneSettlementWalletActionStep · object | WisdomTreeSettlementWalletActionStep · object)[]
The steps of the wallet action. Only returned if ?include=steps is provided.
A wallet action step consisting of an EVM transaction.
- EVMTransactionWalletActionStep
- EVMUserOperationWalletActionStep
- SVMTransactionWalletActionStep
- TVMTransactionWalletActionStep
- ExternalTransactionWalletActionStep
- CustodianTransactionWalletActionStep
- TempoZoneSettlementWalletActionStep
- WisdomTreeSettlementWalletActionStep
Show child attributes
Show child attributes
Was this page helpful?

