curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{"amount": 500000000}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({ amount: 500000000 }),
}
);
{
"date": "2024-01-20T15:00:00Z",
"total_value": 500.0,
"total_value_in_usd": 500.0,
"withdraw_details": [
{
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "500000000",
"value": 500.0,
"value_in_usd": 500.0,
"principal_amount": 490000000,
"yield_amount": 10000000,
"fee_amount": 0
}
]
}
Agents
Withdraw
Execute a partial withdrawal from a wallet
POST
/
api
/
v1
/
{chain_id}
/
wallets
/
{wallet}
:withdraw
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{"amount": 500000000}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({ amount: 500000000 }),
}
);
{
"date": "2024-01-20T15:00:00Z",
"total_value": 500.0,
"total_value_in_usd": 500.0,
"withdraw_details": [
{
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "500000000",
"value": 500.0,
"value_in_usd": 500.0,
"principal_amount": 490000000,
"yield_amount": 10000000,
"fee_amount": 0
}
]
}
SDK Alternative: Use
agent.withdraw(amount?) for a simpler TypeScript interface. See SDK docsDescription
Executes a partial withdrawal from a wallet. The agent remains active after a partial withdrawal. For full withdrawal (deactivation), use the Deactivate Wallet endpoint.Path Parameters
Request Body
Response
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw" \
-H "Content-Type: application/json" \
-H "X-Partner-API-Key: your-api-key" \
-H "X-Partner-Name: your-partner-name" \
-d '{"amount": 500000000}'
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:withdraw',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Partner-API-Key': 'your-api-key',
'X-Partner-Name': 'your-partner-name',
},
body: JSON.stringify({ amount: 500000000 }),
}
);
{
"date": "2024-01-20T15:00:00Z",
"total_value": 500.0,
"total_value_in_usd": 500.0,
"withdraw_details": [
{
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "500000000",
"value": 500.0,
"value_in_usd": 500.0,
"principal_amount": 490000000,
"yield_amount": 10000000,
"fee_amount": 0
}
]
}