⚙️Protocols
Address Position for All Protocols
The Protocols API returns all tokens held by the wallet address, plus the associated positions for each protocol. The naming convention are defined by each protocol and may not be comparable across protocols.
The protocols are specific to each chain and is a required parameter.
Please use /eth to calculate all protocol positions on Ethereum
Return All Protocol Positions for A Chain
GET
https://query.nansen.ai/api/portfolio/protocols/{chain}/{address}
Returns the list of all supported protocols for a chain and their associated positions.
Replace the {address} portion of the URL with the actual address value. Replace {chain} with another value to retrieve data for another chain.
Note that for for completeness, all supported protocols will be returned. Protocols that the address currently does not have an open position will return with a balance of 0.
Path Parameters
Name | Type | Description |
---|---|---|
api_key* | String | The user's API key |
refresh | boolean | True or False. Use "True" to get the latest results |
Protocol Specific Positions
This end point returns position for a specific protocol and address. These end points will be significantly more performant than the All Protocols end point.
Return Position for A Specific Protocol + Chain
GET
https://query.nansen.ai/api/portfolio/{protocolChain}/{address}
Returns the position associated with a specific protocol. Choose the relevant {protocolChain} from the list of supported protocol and append the address.
Note that the results for each protocol will depend on the protocol.
Path Parameters
Name | Type | Description |
---|---|---|
api_key* | String | The user's API key |
Supported Blockchains
In addition to Ethereum, we also support the following chains. To retrieve the value for a chain, choose from one of the following:
Blockchain | # of Protocols Covered |
---|---|
Ethereum (use "eth" instead of "ethereum") | 76 |
BSC (Binance Smart Chain) | 49 |
Fantom | 37 |
Arbitrum | 36 |
Polygon | 35 |
Avax (Avalanche) | 31 |
Optimism | 28 |
Cronos | 15 |
Solana | 12 |
Harmony | 11 |
Moonbeam | 7 |
Moonriver | 7 |
Boba | 6 |
Supported Protocols:
The list of supported protocols are available in the reference section:
⚙️pageReferenceLast updated