Internal Transfer With Wallet Signature
The Internal Transfer with Wallet Signature API allows users to transfer assets between Orderly accounts. This API requires a wallet EIP-712 signature to verify the ownership and authorization of the transfer. To create an internal transfer request, users can follow the following steps:1
Obtain a transfer nonce
Get a valid transfer nonce from the Get Transfer Nonce API.
2
Obtain a signature from EIP-712
Sign an EIP-712 message of message type where:
InternalTransfer:| Name | Type | Required | Description |
|---|---|---|---|
| receiver | bytes32 | Y | The Orderly Account ID of the receiver (in bytes32 format) |
| token | string | Y | The token symbol (e.g., “USDC”) |
| amount | uint256 | Y | The amount to transfer (raw value with decimals, e.g., 1000000 for 1 USDC) |
| transferNonce | uint64 | Y | The nonce obtained from Step 1 |
The EIP-712 signature uses the on-chain domain. The
verifyingContract should be the Ledger contract address, which can be found here.Example code
Example code
3
Make an internal transfer request
Call the Create Internal Transfer With Wallet Signature API.The request body must include the generated signature and the message parameters used to create it:where:
| Parameter | Type | Required | Description |
|---|---|---|---|
| message.receiver | string | Y | The Orderly Account ID of the receiver |
| message.token | string | Y | Token symbol |
| message.amount | string | Y | Transfer amount |
| message.transferNonce | string | Y | Must match the nonce used in the signature |
| message.chainId | string | Y | Chain ID |
| message.chainType | string | Y | Chain type: EVM or SOL |
| signature | string | Y | The EIP-712 signature string |
| userAddress | string | Y | The wallet address of the sender (must match the signer) |
| verifyingContract | string | Y | The contract address used in the EIP-712 domain |
Ensure the
userAddress matches the wallet address associated with the Orderly Account ID making the request. The standard Orderly authentication headers (Orderly Key signature) are also required for this API call.