Skip to main content
Retrieve a paginated list of DeFi protocols available on a specific blockchain network. Use the chainKey from the Chains endpoint to specify which chain to query.
Cost: Free (0 credits)

Endpoint

GET https://api.octav.fi/v1/chains/:chainKey/protocols

Parameters

chainKey
string
required
The chain identifier (e.g. ethereum, solana, arbitrum). Must match a chain’s key field from the Chains endpoint.
/v1/chains/ethereum/protocols
page
integer
default:"1"
Page number for pagination
  • Minimum: 1
limit
integer
default:"20"
Number of protocols per page
  • Minimum: 1
  • Maximum: 100

Response

Returns a paginated list of protocol objects.

Top-Level Fields

data
array
Array of protocol objects (see fields below)
pagination
object
Pagination metadata:
  • page — Current page number
  • limit — Items per page
  • hasMore — Whether more pages are available

Protocol Fields

uuid
string
Unique protocol identifier
key
string
Protocol key (e.g. "aave", "uniswap v3")
name
string
Display name (e.g. "Aave", "Uniswap V3")
imgSmall
string
URL to small protocol icon
imgLarge
string
URL to large protocol icon
isUserProtocol
boolean
true if this is a user-created custom protocol. Custom protocols only appear on page 1 and are listed before system protocols.

Example Request

curl "https://api.octav.fi/v1/chains/ethereum/protocols?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "data": [
    {
      "uuid": "abc12345-1234-5678-9abc-def012345678",
      "key": "aave",
      "name": "Aave",
      "imgSmall": "https://images.octav.fi/tokens/small/aave_small_icon.png",
      "imgLarge": "https://images.octav.fi/tokens/large/aave_large_icon.png",
      "isUserProtocol": false
    },
    {
      "uuid": "def67890-1234-5678-9abc-def012345678",
      "key": "uniswap v3",
      "name": "Uniswap V3",
      "imgSmall": "https://images.octav.fi/tokens/small/uniswap_small_icon.png",
      "imgLarge": "https://images.octav.fi/tokens/large/uniswap_large_icon.png",
      "isUserProtocol": false
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "hasMore": true
  }
}

Pagination

The endpoint uses page-based pagination. Use page and limit to navigate through results.
  • Default behavior: Returns 20 protocols per page starting from page 1
  • hasMore flag: Indicates whether additional pages exist
  • User protocols: Custom user-created protocols are prepended on page 1 only
  • Ordering: System protocols are returned in a consistent order
Fetch all protocols for a chain by iterating until hasMore is false:
async function getAllProtocols(chainKey) {
  const allProtocols = [];
  let page = 1;
  let hasMore = true;

  while (hasMore) {
    const response = await fetch(
      `https://api.octav.fi/v1/chains/${chainKey}/protocols?page=${page}&limit=100`,
      { headers: { 'Authorization': `Bearer ${apiKey}` } }
    );

    const result = await response.json();
    allProtocols.push(...result.data);
    hasMore = result.pagination.hasMore;
    page++;
  }

  return allProtocols;
}

const protocols = await getAllProtocols('ethereum');
console.log(`Total protocols on Ethereum: ${protocols.length}`);

Use Cases

Build a protocol selection dropdown for your UI:
async function loadProtocolOptions(chainKey) {
  const response = await fetch(
    `https://api.octav.fi/v1/chains/${chainKey}/protocols?limit=100`,
    { headers: { 'Authorization': `Bearer ${apiKey}` } }
  );

  const { data: protocols } = await response.json();

  return protocols.map(protocol => ({
    value: protocol.key,
    label: protocol.name,
    icon: protocol.imgSmall,
    isCustom: protocol.isUserProtocol
  }));
}

// Populate dropdown when user selects a chain
const options = await loadProtocolOptions('ethereum');

Error Responses

Invalid query parameters.
{
  "error": "Validation Failed",
  "details": {
    "message": "\"limit\" must be less than or equal to 100"
  }
}
Common causes:
  • page is less than 1
  • limit exceeds 100
Authentication failed.
{
  "error": "Unauthorized",
  "message": "Invalid API key"
}
Solution: Check your API key in the Authorization header
The specified chain key does not exist.
{
  "message": "Chain with key 'xyz' not found"
}
Solution: Use the Chains endpoint to discover valid chain keys
Rate limit exceeded.
{
  "error": "Rate limit exceeded",
  "message": "You have exceeded your rate limit",
  "retry_after": 60
}
Solution: Wait for the specified time or implement retry logic