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.
This API requires Orderly authentication headers:
orderly-timestamp: Current timestamp in millisecondsorderly-account-id: Your Orderly Account IDorderly-key: Your Orderly Keyorderly-signature: Ed25519 signature of the request message
{timestamp}{http_method}{url_path}{payload} using your Orderly Secret.
For production use, it’s recommended to use the Orderly SDK which handles authentication automatically.Example code
Example code
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 (must be converted to bytes32 format for EIP-712 signing) |
| 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:
Note that in the API request,
receiver is a string (hex format with 0x prefix), while in the EIP-712 signature it must be bytes32. The userAddress must be an EVM address format (0x-prefixed hex string) for EVM chains, or a Solana address for SOL chains.| 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.