Documentation Index Fetch the complete documentation index at: https://docs.1tx.fi/llms.txt
Use this file to discover all available pages before exploring further.
List All Protocols
GET /protocols
Retrieve a list of all supported DeFi protocols.
Request
curl "https://api.1tx.fi/api/v1/protocols"
Query Parameters
Parameter Type Required Description chainIdnumber No Filter by chain ID
Response
[
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "Aave" ,
"version" : 3 ,
"displayName" : "Aave V3" ,
"chainId" : 8453 ,
"protocolAddress" : "0x..." ,
"icon" : "aave" ,
"docsUrl" : "https://docs.aave.com" ,
"deprecated" : false ,
"deprecationReason" : null ,
"createdAt" : "2024-01-01T00:00:00Z" ,
"updatedAt" : "2024-01-15T14:30:00Z"
},
{
"id" : "550e8400-e29b-41d4-a716-446655440001" ,
"name" : "Compound" ,
"version" : 3 ,
"displayName" : "Compound V3" ,
"chainId" : 8453 ,
"protocolAddress" : "0x..." ,
"icon" : "compound" ,
"docsUrl" : "https://docs.compound.finance" ,
"deprecated" : false ,
"deprecationReason" : null ,
"createdAt" : "2024-01-01T00:00:00Z" ,
"updatedAt" : "2024-01-15T14:30:00Z"
},
{
"id" : "550e8400-e29b-41d4-a716-446655440002" ,
"name" : "Morpho" ,
"version" : 1 ,
"displayName" : "Morpho Blue" ,
"chainId" : 8453 ,
"protocolAddress" : "0x..." ,
"icon" : "morpho" ,
"docsUrl" : "https://docs.morpho.org" ,
"deprecated" : false ,
"deprecationReason" : null ,
"createdAt" : "2024-01-01T00:00:00Z" ,
"updatedAt" : "2024-01-15T14:30:00Z"
}
]
Response Fields
Field Type Description idstring Unique protocol identifier (UUID) namestring Protocol name (Aave, Compound, Morpho, Euler, Fluid) versionnumber Protocol version number displayNamestring Human-readable protocol name with version chainIdnumber Chain ID where this protocol is deployed protocolAddressstring Main protocol contract address iconstring Icon identifier for UI display docsUrlstring Link to protocol documentation deprecatedboolean Whether this protocol version is deprecated deprecationReasonstring Reason for deprecation (if applicable) createdAtstring ISO 8601 creation timestamp updatedAtstring ISO 8601 last update timestamp
Get Single Protocol
GET /protocols/:id
Retrieve details for a specific protocol.
Request
curl "https://api.1tx.fi/api/v1/protocols/550e8400-e29b-41d4-a716-446655440000"
Path Parameters
Parameter Type Required Description idstring Yes The protocol UUID
Response
The single protocol endpoint returns the protocol object plus its related instruments array.
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "Aave" ,
"version" : 3 ,
"displayName" : "Aave V3" ,
"chainId" : 8453 ,
"protocolAddress" : "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5" ,
"icon" : "aave" ,
"docsUrl" : "https://docs.aave.com" ,
"deprecated" : false ,
"deprecationReason" : null ,
"createdAt" : "2024-01-01T00:00:00.000Z" ,
"updatedAt" : "2024-01-15T14:30:00.000Z" ,
"instruments" : [
{
"instrumentId" : "0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b" ,
"chainId" : 8453 ,
"tokenSymbol" : "USDC"
}
]
}
Get Protocol by Name and Chain
GET /protocols/by-name/:name/chain/:chainId
Retrieve all versions of a protocol on a specific chain.
Request
curl "https://api.1tx.fi/api/v1/protocols/by-name/Aave/chain/8453"
Path Parameters
Parameter Type Required Description namestring Yes Protocol name (Aave, Compound, Morpho, Euler, Fluid) chainIdnumber Yes Chain ID
Response
[
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "Aave" ,
"version" : 3 ,
"displayName" : "Aave V3" ,
"chainId" : 8453 ,
"protocolAddress" : "0x..." ,
"icon" : "aave" ,
"docsUrl" : "https://docs.aave.com" ,
"deprecated" : false ,
"deprecationReason" : null ,
"createdAt" : "2024-01-01T00:00:00Z" ,
"updatedAt" : "2024-01-15T14:30:00Z"
}
]
Get Latest Protocol Version
GET /protocols/by-name/:name/chain/:chainId/latest
Retrieve the latest version of a protocol on a specific chain.
Request
curl "https://api.1tx.fi/api/v1/protocols/by-name/Aave/chain/8453/latest"
Path Parameters
Parameter Type Required Description namestring Yes Protocol name chainIdnumber Yes Chain ID
Response
Returns a single protocol object with the same fields as an item in List All Protocols . Unlike GET /protocols/:id, this endpoint does not include the related instruments array.
Create Protocol
POST /protocols
Add a new protocol version to the registry.
Request Body
Field Type Required Description namestring Yes Protocol name (e.g. “Aave”) versionnumber Yes Protocol version number displayNamestring Yes Human readable name chainIdnumber Yes Chain ID protocolAddressstring Yes Contract address iconstring No Icon identifier docsUrlstring No Documentation URL
curl -X POST "https://api.1tx.fi/api/v1/protocols" \
-H "Authorization: Bearer <your_jwt>" \
-H "Content-Type: application/json" \
-d '{
"name": "Aave",
"version": 3,
"displayName": "Aave V3",
"chainId": 8453,
"protocolAddress": "0x...",
"icon": "aave",
"docsUrl": "https://docs.aave.com"
}'
Response
Returns the created protocol object.
Update Protocol
PUT /protocols/:id
Update an existing protocol’s details.
Path Parameters
Parameter Type Required Description idstring Yes Protocol UUID
Request Body
Same fields as Create Protocol . All fields are optional.
Delete Protocol
DELETE /protocols/:id
Remove a protocol from the registry.
Path Parameters
Parameter Type Required Description idstring Yes Protocol UUID
Deprecate Protocol
POST /protocols/:id/deprecate
Mark a protocol as deprecated without deleting it.
Path Parameters
Parameter Type Required Description idstring Yes Protocol UUID
Request Body
Field Type Required Description reasonstring No Reason for deprecation
TypeScript Example
const BASE_URL = 'https://api.1tx.fi/api/v1' ;
interface Protocol {
id : string ;
name : string ;
version : number ;
displayName : string ;
chainId : number ;
protocolAddress : string ;
icon ?: string ;
docsUrl ?: string ;
deprecated : boolean ;
deprecationReason ?: string ;
createdAt : string ;
updatedAt : string ;
}
// Get all protocols
async function getProtocols ( chainId ?: number ) : Promise < Protocol []> {
const params = chainId ? `?chainId= ${ chainId } ` : '' ;
const response = await fetch ( ` ${ BASE_URL } /protocols ${ params } ` );
return response . json ();
}
// Get protocol by ID
async function getProtocol ( id : string ) : Promise < Protocol > {
const response = await fetch ( ` ${ BASE_URL } /protocols/ ${ id } ` );
return response . json ();
}
// Get latest protocol version
async function getLatestProtocol (
name : string ,
chainId : number
) : Promise < Protocol > {
const response = await fetch (
` ${ BASE_URL } /protocols/by-name/ ${ name } /chain/ ${ chainId } /latest`
);
return response . json ();
}
// Usage
const protocols = await getProtocols ( 8453 );
console . log ( `Found ${ protocols . length } protocols on Base` );
protocols . forEach (( p ) => {
console . log ( ` ${ p . displayName } : ${ p . protocolAddress } ` );
if ( p . deprecated ) {
console . log ( ` ⚠️ Deprecated: ${ p . deprecationReason } ` );
}
});
Next Steps
Instruments API Query DeFi instruments
Chains API Get supported chains