curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{
"wallet": "0x1234567890abcdef1234567890abcdef12345678",
"eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"selected_protocols": ["aave", "compound", "moonwell"]
}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({
wallet: '0x1234567890abcdef1234567890abcdef12345678',
eoa: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
initial_token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
selected_protocols: ['aave', 'compound', 'moonwell'],
}),
}
);
const data = await response.json();
import requests
response = requests.post(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
headers={
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
json={
'wallet': '0x1234567890abcdef1234567890abcdef12345678',
'eoa': '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
'initial_token': '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
'selected_protocols': ['aave', 'compound', 'moonwell'],
}
)
data = response.json()
{
"message": "Agent activated successfully",
"wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
{
"detail": "Invalid input data"
}
{
"detail": "Access denied or deposit is too large"
}
Agents
Activate Wallet
Activate a new wallet for an agent
POST
/
api
/
v1
/
{chain_id}
/
wallets
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{
"wallet": "0x1234567890abcdef1234567890abcdef12345678",
"eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"selected_protocols": ["aave", "compound", "moonwell"]
}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({
wallet: '0x1234567890abcdef1234567890abcdef12345678',
eoa: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
initial_token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
selected_protocols: ['aave', 'compound', 'moonwell'],
}),
}
);
const data = await response.json();
import requests
response = requests.post(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
headers={
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
json={
'wallet': '0x1234567890abcdef1234567890abcdef12345678',
'eoa': '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
'initial_token': '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
'selected_protocols': ['aave', 'compound', 'moonwell'],
}
)
data = response.json()
{
"message": "Agent activated successfully",
"wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
{
"detail": "Invalid input data"
}
{
"detail": "Access denied or deposit is too large"
}
SDK Alternative: Use
agent.activate(options) for a simpler TypeScript interface. See SDK docsDescription
Activates a new wallet for an agent. This endpoint must be called after the user has deposited funds to their smart account.Request Body
string
required
The smart account wallet address
string
required
The user’s externally owned account (origin wallet)
string
required
The token address that was deposited (e.g., USDC)
string[]
required
List of protocol names to use for optimization
string
Transaction hash of the initial deposit (recommended)
array
Optional constraints for the agentConstraint types:
min_protocols- Minimum number of protocols to usemax_allocation_amount_per_protocol- Maximum amount per protocolexclude_protocol- Protocols to exclude
Example Request
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{
"wallet": "0x1234567890abcdef1234567890abcdef12345678",
"eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"selected_protocols": ["aave", "compound", "moonwell"],
"tx_hash": "0x...",
"constraints": [
{
"kind": "min_protocols",
"params": { "min_protocols": 2 }
}
]
}'
Response
string
Confirmation message
string
The wallet address that was activated
Response Example
{
"message": "Agent activated successfully",
"wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
Error Responses
| Status | Description |
|---|---|
400 | Invalid input data |
403 | Access denied or deposit too large |
422 | Validation error |
500 | Internal server error |
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{
"wallet": "0x1234567890abcdef1234567890abcdef12345678",
"eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"selected_protocols": ["aave", "compound", "moonwell"]
}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({
wallet: '0x1234567890abcdef1234567890abcdef12345678',
eoa: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
initial_token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
selected_protocols: ['aave', 'compound', 'moonwell'],
}),
}
);
const data = await response.json();
import requests
response = requests.post(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets',
headers={
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
json={
'wallet': '0x1234567890abcdef1234567890abcdef12345678',
'eoa': '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
'initial_token': '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
'selected_protocols': ['aave', 'compound', 'moonwell'],
}
)
data = response.json()
{
"message": "Agent activated successfully",
"wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
{
"detail": "Invalid input data"
}
{
"detail": "Access denied or deposit is too large"
}
⌘I