Empty your balance of a specific asset by transferring a "max" amount.
Instead of passing an exact amount in the transaction body, it is preferable to pass maxfor type in the value object. Following is an example showing how to construct such a transaction for an ERC-20 token. On all other chains, the valueobject should look the same as in the example below both for native asset and tokens.
{
"signer_type":"api_signer",
"type":"evm_transaction",
"details":{
"type":"evm_transfer",
"gas":{
"type":"priority",
"priority_level":"medium"
},
"to":"0xB572Cf029bD939B260b16A97036456d6165F2222",
"value":{
"type":"max"
},
"asset_identifier":{
"type":"evm",
"details":{
"type":"erc20",
"token":{
"chain":"ethereum_mainnet",
"hex_repr":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
}
}
},
"note":"Emptying USDC",
"vault_id":"8988893a-cf29-4a02-acc7-5bb723c74f47"
}