usdClassTransfer
Transfer USD-class assets between perpetual and spot margin modes. This allows traders to reallocate capital between different trading modes.
Sample Data#
{
"signature": {
"r": "0xb6fb726ec034a9a8d5125cc9031012a58ba10f39c380a80566b56363a2a7cabf",
"s": "0x6d4bc0977c2a7cb99c5ae1a5a9fd54fd219598661c12a36e344f52b3bdb6bc6b",
"v": 28
},
"action": {
"type": "usdClassTransfer",
"signatureChainId": "0x66eee",
"hyperliquidChain": "Mainnet",
"amount": "55.00000001000001",
"toPerp": true,
"nonce": 1768146939642
},
"nonce": 1768146939642
}
View this transaction on Hypurrscan →
Field Reference#
Action Fields#
| Field | Type | Description |
|---|---|---|
type | string | Always "usdClassTransfer" |
signatureChainId | string | Chain ID for EIP-712 signing |
hyperliquidChain | string | Target chain: "Mainnet" or "Testnet" |
amount | string | Amount to transfer (human-readable USD) |
toPerp | boolean | true to transfer to perp margin, false to spot margin |
nonce | number | Transaction nonce |
Transfer Direction#
toPerp Value | Direction |
|---|---|
true | Spot margin → Perp margin |
false | Perp margin → Spot margin |
Use Cases#
Capital Flow Analysis#
Track how traders allocate between perp and spot:
def process_usdClassTransfer_action(action):
amount = action.get('amount')
to_perp = action.get('toPerp')
direction = 'spot → perp' if to_perp else 'perp → spot'
print(f"Margin transfer: ${amount} ({direction})")
Market Mode Preference#
Monitor aggregate flows to understand market preferences between spot and perp trading.
Arbitrage Detection#
Large transfers may indicate arbitrage opportunities between markets.
Related Action Types#
- usdSend - Send USD to another address
- spotSend - Transfer spot tokens
- subAccountTransfer - Sub-account transfers