transferToSpot action enables Vincent Apps to transfer USDC from a Vincent User’s HyperCore perp balance to their spot balance.
Prerequisites
Before executing thetransferToSpot action, the following conditions must be met:
- Perp Balance on HyperCore: The Vincent User Agent Wallet must have sufficient USDC in their HyperCore perp balance to cover the transfer amount.
To learn more about executing Vincent Abilities, see the Executing
Abilities guide.
Executing the precheck Function
The precheck function validates some prerequisites for executing a transfer to spot, without actually performing the operation.
For the transferToSpot action, the precheck function will validate the following:
- The Vincent User Agent Wallet has sufficient USDC in their HyperCore perp balance to cover the transfer amount.
- Parameters
- Implementation
- Response
The
precheck function requires the following parameters:Executing the execute Function
The execute function performs the actual transfer operation, moving USDC from the Vincent User’s HyperCore perp balance to their spot balance.
For the transferToSpot action, the execute function will:
- Transfer the specified amount of USDC from the Vincent User Agent Wallet’s HyperCore perp balance to their spot balance.
- Return the transfer result from Hyperliquid.
- Parameters
- Implementation
- Response
The
execute function requires the following parameters:Important Considerations
USDC Decimal Format
USDC Decimal Format
USDC uses 6 decimals for the transfer amount parameter. When specifying the transfer amount:
- 15.0 USDC =
"15000000" - 5.0 USDC =
"5000000" - 100 USDC =
"100000000"
Transfer Direction
Transfer Direction
This action transfers USDC from the Vincent User’s HyperCore perp balance to their spot
balance on HyperCore. If you need to transfer in the opposite direction (spot to perp), use the
Transfer to Perp action.
Verifying Transfer Success
Verifying Transfer Success
After the transfer is executed, you can verify the balances changed by using a Hyperliquid SDK to check the clearinghouse state (perp balance) of the sender and the spot clearinghouse state (spot balance) of the recipient. You can also use the Hyperliquid API retrieve the perps balances and spot balances.
Reference Implementation
For a complete working example showing the full transfer to spot workflow including balance verification, see the to-spot.spec.ts end-to-end test in theability-hyperliquid package.

