Wallet DeFi Protocol Positions
curl --request GET \
--url https://api.asksurf.ai/gateway/v1/wallet/protocolsimport requests
url = "https://api.asksurf.ai/gateway/v1/wallet/protocols"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.asksurf.ai/gateway/v1/wallet/protocols', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"chain": "<string>",
"positions": [
{
"balance_usd": 123,
"name": "<string>",
"borrow_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"lp_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"reward_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"supply_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
]
}
],
"protocol_name": "<string>",
"total_usd": 123,
"logo_url": "<string>",
"site_url": "<string>"
}
],
"meta": {
"cached": true,
"credits_used": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"$schema": "https://example.com/schemas/DataResponseWalletProtocolItem.json"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"$schema": "https://example.com/schemas/DataAPIError.json"
}Wallet
DeFi Protocol Positions
GET
/
gateway
/
v1
/
wallet
/
protocols
Wallet DeFi Protocol Positions
curl --request GET \
--url https://api.asksurf.ai/gateway/v1/wallet/protocolsimport requests
url = "https://api.asksurf.ai/gateway/v1/wallet/protocols"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.asksurf.ai/gateway/v1/wallet/protocols', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"chain": "<string>",
"positions": [
{
"balance_usd": 123,
"name": "<string>",
"borrow_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"lp_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"reward_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
],
"supply_tokens": [
{
"amount": 123,
"chain": "<string>",
"price": 123,
"symbol": "<string>",
"name": "<string>",
"token_address": "<string>"
}
]
}
],
"protocol_name": "<string>",
"total_usd": 123,
"logo_url": "<string>",
"site_url": "<string>"
}
],
"meta": {
"cached": true,
"credits_used": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"$schema": "https://example.com/schemas/DataResponseWalletProtocolItem.json"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"$schema": "https://example.com/schemas/DataAPIError.json"
}Query Parameters
Wallet address — must be a raw 0x-prefixed hex address, not an ENS name
Example:
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Results per page
Required range:
1 <= x <= 100Example:
20
Pagination offset
Required range:
x >= 0Example:
0
⌘I