curl --request POST \
--url https://api.onswitch.xyz/wallet/rescue \
--header 'Content-Type: application/json' \
--header 'x-service-key: <api-key>' \
--data '
{
"wallet_id": "699a6555fd4cab59e6175f79",
"blockchain": "BASE",
"token_address": "0xe3cf8dbcbdc9b220ddead0bd6342e245daff934d",
"recipient": "0x2E1C4bD954853fe0dD025dCc74A9f5a67aad95f9"
}
'{
"success": true,
"message": "Token rescue initiated successfully",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"transaction_hash": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"explorer_url": "https://basescan.org/tx/0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
}
}Transfer a specific token (by contract address) from the wallet to a recipient address. Use to recover tokens that are not part of the unified balance (e.g. unsupported or airdropped tokens). Supports EVM and Solana token addresses.
curl --request POST \
--url https://api.onswitch.xyz/wallet/rescue \
--header 'Content-Type: application/json' \
--header 'x-service-key: <api-key>' \
--data '
{
"wallet_id": "699a6555fd4cab59e6175f79",
"blockchain": "BASE",
"token_address": "0xe3cf8dbcbdc9b220ddead0bd6342e245daff934d",
"recipient": "0x2E1C4bD954853fe0dD025dCc74A9f5a67aad95f9"
}
'{
"success": true,
"message": "Token rescue initiated successfully",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"transaction_hash": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"explorer_url": "https://basescan.org/tx/0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
}
}Service key for API authentication
Unique identifier for the wallet
^[a-f0-9]{24}$Blockchain where the token is held
BASE, ETHEREUM, SOLANA, POLYGON, BSC, ARBITRUM, OPTIMISM, AVALANCHE, MONAD, GNOSIS, PLASMA Token contract address (EVM 0x... or Solana base58)
Recipient wallet address (format must match blockchain)
Token rescue initiated successfully