curl --request POST \
--url https://api.caminotreasury.com/v1/{chainId}/withdraw/prepare \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"token": "USDC",
"amount": "1000.50",
"from": "<string>",
"recipient": "<string>"
}
'{
"steps": [
{
"type": "reset-approval",
"description": "<string>",
"transaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>"
}
}
],
"summary": {
"tokenIn": "<string>",
"tokenOut": "<string>",
"amountIn": "<string>",
"amountInRaw": "<string>"
}
}Returns the transaction steps required to withdraw C0 yield tokens back to a stablecoin (USDC or USDT). Steps may include an approval and the swap. The caller signs and submits each step’s transaction on-chain.
curl --request POST \
--url https://api.caminotreasury.com/v1/{chainId}/withdraw/prepare \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"token": "USDC",
"amount": "1000.50",
"from": "<string>",
"recipient": "<string>"
}
'{
"steps": [
{
"type": "reset-approval",
"description": "<string>",
"transaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>"
}
}
],
"summary": {
"tokenIn": "<string>",
"tokenOut": "<string>",
"amountIn": "<string>",
"amountInRaw": "<string>"
}
}API key for authentication. Pass your key in the x-api-key header.
Blockchain chain ID
Stablecoin to deposit or receive
USDC, USDT Amount as a decimal string (e.g. "1000.50")
"1000.50"
Source wallet address
^0x[a-fA-F0-9]{40}$Recipient wallet address
^0x[a-fA-F0-9]{40}$