curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"account": "<string>",
"market": "<string>",
"chainId": 8453,
"asset": "<string>",
"amount": "1000000000000000000"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind"
payload = {
"account": "<string>",
"market": "<string>",
"chainId": 8453,
"asset": "<string>",
"amount": "1000000000000000000"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: '<string>',
market: '<string>',
chainId: 8453,
asset: '<string>',
amount: '1000000000000000000'
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '<string>',
'market' => '<string>',
'chainId' => 8453,
'asset' => '<string>',
'amount' => '1000000000000000000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind"
payload := strings.NewReader("{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"transaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>",
"chainId": 123
},
"amount": "<string>",
"isFullExit": true,
"recipient": "<string>",
"constraints": [
"<string>"
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Prepare an Aave withdrawal
Prepares an unsigned transaction to withdraw an Aave position to a deposit address.
curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"account": "<string>",
"market": "<string>",
"chainId": 8453,
"asset": "<string>",
"amount": "1000000000000000000"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind"
payload = {
"account": "<string>",
"market": "<string>",
"chainId": 8453,
"asset": "<string>",
"amount": "1000000000000000000"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: '<string>',
market: '<string>',
chainId: 8453,
asset: '<string>',
amount: '1000000000000000000'
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '<string>',
'market' => '<string>',
'chainId' => 8453,
'asset' => '<string>',
'amount' => '1000000000000000000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind"
payload := strings.NewReader("{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/positions/{address}/unwind")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": \"<string>\",\n \"market\": \"<string>\",\n \"chainId\": 8453,\n \"asset\": \"<string>\",\n \"amount\": \"1000000000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"transaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>",
"chainId": 123
},
"amount": "<string>",
"isFullExit": true,
"recipient": "<string>",
"constraints": [
"<string>"
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Headers
API key for authentication
"your-api-key"
API version identifier (e.g. "2026-04.amazon"). Optional today, will become required in a future release.
^\d{4}-\d{2}\.[a-z0-9]+$"2026-04.amazon"
Path Parameters
The EOA holding the position. It signs and sends the returned transaction.
^0x[a-fA-F0-9]{40}$"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
Body
The registered deposit account the proceeds go to. The recipient is resolved from this server-side; it is never taken from the request directly.
^0x[a-fA-F0-9]{40}$The Aave market's Pool address, as returned in a position's market.address. Required rather than inferred, because a chain can host several markets.
^0x[a-fA-F0-9]{40}$8453
The supplied underlying token to withdraw
^0x[a-fA-F0-9]{40}$Base units to withdraw. Omit for the largest amount currently permitted. An amount above that maximum is rejected rather than silently reduced.
^\d+$"1000000000000000000"
Response
Unsigned withdraw transaction
Unsigned transaction for the holding EOA to sign and send. The backend never executes it — the EOA holds the aTokens, so only it can authorise the withdraw.
Show child attributes
Show child attributes
Base units the transaction will withdraw
True when the whole position is being withdrawn, in which case the calldata uses the max-uint sentinel so interest accrued before the transaction lands is swept too.
The deposit address the proceeds are sent to, resolved from the registered account. Echoed so it is auditable.
Why the amount is below the supplied balance, if it is. Empty for an unconstrained full exit.
Was this page helpful?