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

Authorizationstringheaderrequired

Bearer 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

vaultAddressstringrequired

Allowed: matches ^0x[a-fA-F0-9]{40}$

walletAddressstringrequired

Allowed: matches ^0x[a-fA-F0-9]{40}$

withdrawAmountstring

NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it

redeemAllboolean

Default: false

chainIdintegerrequired

NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it

Response

200Successful response
withdrawTxobjectrequired
Show child attributes
tostringrequired
datastringrequired
chainIdintegerrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits