Wallets, tokens & networks
Prepare Morpho Withdraw
Builds redeem-all or partial withdraw calldata from a Morpho vault for client signing.
POSThttps://api.toku.com/tga/prepare-morpho-withdraw
Not available to API keys.
curl --request POST \
--url 'https://api.toku.com/tga/prepare-morpho-withdraw' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"vaultAddress": "string",
"walletAddress": "string",
"withdrawAmount": "string",
"redeemAll": false,
"chainId": 0
}'200 response
{
"withdrawTx": {
"to": "string",
"data": "string",
"chainId": 0
}
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.
Body
application/json
vaultAddressstringrequiredAllowed: matches ^0x[a-fA-F0-9]{40}$
walletAddressstringrequiredAllowed: matches ^0x[a-fA-F0-9]{40}$
withdrawAmountstringNOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it
redeemAllbooleanDefault: false
chainIdintegerrequiredNOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it
Response
200Successful response
withdrawTxobjectrequiredShow child attributes
tostringrequireddatastringrequiredchainIdintegerrequired400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits