Get list of earn opportunities
Get list of earn opportunities (vaults).
GET
/
earn
/
opportunities
TypeScript
const response: Promise<FireblocksResponse<GetOpportunitiesResponse>> = fireblocks.earn.getEarnOpportunities(earnApiGetEarnOpportunitiesRequest);CompletableFuture<ApiResponse<GetOpportunitiesResponse>> response = fireblocks.earn().getEarnOpportunities(pageCursor, pageSize, sortBy, order);response = fireblocks.earn.get_earn_opportunities(page_cursor, page_size, sort_by, order);curl --request GET \
--url https://api.fireblocks.io/v1/earn/opportunitiesconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/earn/opportunities', 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.fireblocks.io/v1/earn/opportunities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.fireblocks.io/v1/earn/opportunities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/earn/opportunities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "opp-usdc-eth-001",
"providerId": "MORPHO",
"type": "VAULT",
"chainId": "1",
"address": "0x1234567890123456789012345678901234567890",
"name": "USDC Core",
"symbol": "mUSDC",
"principalAsset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"decimals": 6,
"assetId": "USDC_ETH"
},
"positionAsset": {
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"symbol": "mUSDC",
"decimals": 18,
"assetId": "MORPHO_USDC_VAULT_ETH"
},
"totalAssets": "50000000.0",
"liquidity": "1200000.0",
"apy": {
"native": 4.25,
"gross": 4.4,
"net": 4.05
},
"performanceFee": "0.10",
"exposure": [],
"managementFee": "0.01"
}
],
"total": 1,
"next": "",
"prev": ""
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Query Parameters
Cursor for the next or previous page of results.
Number of items per page.
Required range:
1 <= x <= 100Field to sort results by.
Sort order (ASC or DESC).
Available options:
ASC, DESC Example:
"ASC"
Response
OK
Page of lending opportunities for this query.
Show child attributes
Show child attributes
Example:
[
{
"id": "opp-usdc-eth-001",
"providerId": "MORPHO",
"type": "VAULT",
"chainId": "1",
"address": "0x1234567890123456789012345678901234567890",
"name": "USDC Core",
"symbol": "mUSDC",
"principalAsset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"decimals": 6,
"assetId": "USDC_ETH"
},
"positionAsset": {
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"symbol": "mUSDC",
"decimals": 18,
"assetId": "MORPHO_USDC_VAULT_ETH"
},
"totalAssets": "50000000.0",
"liquidity": "1200000.0",
"apy": { "native": 4.25, "gross": 4.4, "net": 4.05 },
"performanceFee": "0.10",
"exposure": [],
"managementFee": "0.01"
}
]
Total number of items matching the query.
Example:
1
Opaque cursor for the next page; empty when there is no next page.
Example:
""
Opaque cursor for the previous page; empty when there is no previous page.
Example:
""
Was this page helpful?
⌘I
TypeScript
const response: Promise<FireblocksResponse<GetOpportunitiesResponse>> = fireblocks.earn.getEarnOpportunities(earnApiGetEarnOpportunitiesRequest);CompletableFuture<ApiResponse<GetOpportunitiesResponse>> response = fireblocks.earn().getEarnOpportunities(pageCursor, pageSize, sortBy, order);response = fireblocks.earn.get_earn_opportunities(page_cursor, page_size, sort_by, order);curl --request GET \
--url https://api.fireblocks.io/v1/earn/opportunitiesconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/earn/opportunities', 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.fireblocks.io/v1/earn/opportunities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.fireblocks.io/v1/earn/opportunities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/earn/opportunities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "opp-usdc-eth-001",
"providerId": "MORPHO",
"type": "VAULT",
"chainId": "1",
"address": "0x1234567890123456789012345678901234567890",
"name": "USDC Core",
"symbol": "mUSDC",
"principalAsset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"decimals": 6,
"assetId": "USDC_ETH"
},
"positionAsset": {
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"symbol": "mUSDC",
"decimals": 18,
"assetId": "MORPHO_USDC_VAULT_ETH"
},
"totalAssets": "50000000.0",
"liquidity": "1200000.0",
"apy": {
"native": 4.25,
"gross": 4.4,
"net": 4.05
},
"performanceFee": "0.10",
"exposure": [],
"managementFee": "0.01"
}
],
"total": 1,
"next": "",
"prev": ""
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}