> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sendToEvmWithData | Hyperliquid exchange

> Sends assets from Hyperliquid L1 to a HyperEVM address with optional calldata. Enables programmatic interactions between L1 and HyperEVM.

<Info>
  You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

<Note>
  This endpoint requires signature authentication. See our comprehensive [Authentication via Signatures guide](/docs/hyperliquid-authentication-guide) for implementation details.
</Note>

Sends assets from Hyperliquid L1 to a HyperEVM address with optional calldata. Enables programmatic interactions between L1 and HyperEVM.

## Parameters

### Required parameters

* `action` (object, required) — The action object containing:
  * `type` (string) — Must be `"sendToEvmWithData"`
  * `destination` (string) — EVM recipient address
  * `token` (string) — Token to send
  * `amount` (string) — Amount to send
  * `data` (string) — Optional calldata for the EVM transaction
* `nonce` (number, required) — Current timestamp in milliseconds (must be recent)
* `signature` (object, required) — EIP-712 signature of the action

### Optional parameters

* `vaultAddress` (string, optional) — Address when trading on behalf of a vault or subaccount

## Returns

Returns an object with the action status:

* `status` — `"ok"` if request processed
* `response` — Contains action result data

## Example request

<CodeGroup>
  ```shell cURL theme={"system"}
  curl -X POST https://api.hyperliquid.xyz/exchange \
    -H "Content-Type: application/json" \
    -d '{
      "action": {"type": "sendToEvmWithData"},
      "nonce": 1234567890123,
      "signature": {...}
    }'
  ```

  ```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
  import { ExchangeClient, HttpTransport } from "@nktkas/hyperliquid";
  import { privateKeyToAccount } from "viem/accounts";

  // Public Hyperliquid mainnet API (default transport)
  const wallet = privateKeyToAccount("0x..."); // viem or ethers
  const transport = new HttpTransport();
  const exchange = new ExchangeClient({ transport, wallet });

  // SDK signs the EIP-712 action and posts it to /exchange
  const result = await exchange.sendToEvmWithData({
    token: "USDC",
    amount: "1",
    sourceDex: "spot",
    destinationRecipient: "0x...",
    addressEncoding: "hex",
    destinationChainId: 42161,
    gasLimit: 200000,
    data: "0x",
  });

  console.log(result);
  ```

  ```python Python (hyperliquid-python-sdk) theme={"system"}
  # Note: hyperliquid-python-sdk does not expose a sendToEvmWithData helper.
  # Build, sign, and post the action manually against the public mainnet API.
  import time
  import requests
  from hyperliquid.utils import constants
  from hyperliquid.utils.signing import sign_user_signed_action

  # Your wallet (e.g. from eth_account.Account)
  wallet = ...  # LocalAccount

  action = {
      "type": "sendToEvmWithData",
      "signatureChainId": "0xa4b1",
      "hyperliquidChain": "Mainnet",
      "token": "USDC",
      "amount": "1",
      "sourceDex": "spot",
      "destinationRecipient": "0x...",
      "addressEncoding": "hex",
      "destinationChainId": 42161,
      "gasLimit": 200000,
      "data": "0x",
      "nonce": int(time.time() * 1000),
  }

  # EIP-712 sign (payload_types must match the action fields)
  signature = sign_user_signed_action(
      wallet,
      action,
      payload_types=[
          {"name": "hyperliquidChain", "type": "string"},
          {"name": "token", "type": "string"},
          {"name": "amount", "type": "string"},
          {"name": "sourceDex", "type": "string"},
          {"name": "destinationRecipient", "type": "string"},
          {"name": "addressEncoding", "type": "string"},
          {"name": "destinationChainId", "type": "uint64"},
          {"name": "gasLimit", "type": "uint64"},
          {"name": "data", "type": "bytes"},
          {"name": "nonce", "type": "uint64"},
      ],
      primary_type="HyperliquidTransaction:SendToEvmWithData",
      is_mainnet=True,
  )

  resp = requests.post(
      f"{constants.MAINNET_API_URL}/exchange",
      json={"action": action, "nonce": action["nonce"], "signature": signature},
  )
  print(resp.json())
  ```
</CodeGroup>

## Use case

* **Send to EVM with data** — Sends assets from Hyperliquid L1 to a HyperEVM address with optional calldata. Enables programmatic interactions between L1 and HyperEVM.

<Warning>
  Always ensure your system clock is synchronized. Nonce must be within a reasonable time window of the current server time or the request will be rejected.
</Warning>


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_exchange/exchange_send_to_evm_with_data.json post /exchange
openapi: 3.0.0
info:
  title: Hyperliquid Exchange API
  version: 1.0.0
  description: >-
    API for trading operations on Hyperliquid exchange. **IMPORTANT**: All
    exchange endpoints require EIP-712 signatures for authentication. The
    examples shown will not work without proper signing. See the [Hyperliquid
    Python SDK](https://github.com/hyperliquid-dex/hyperliquid-python-sdk) for
    implementation examples.
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /exchange:
    post:
      tags:
        - hyperliquid exchange
      summary: Send to EVM with data
      operationId: sendToEvmWithData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: object
                  properties:
                    type:
                      type: string
                      default: sendToEvmWithData
                      enum:
                        - sendToEvmWithData
                      description: Action type
                    hyperliquidChain:
                      type: string
                      description: Chain identifier
                      default: Mainnet
                      enum:
                        - Mainnet
                        - Testnet
                    signatureChainId:
                      type: string
                      description: EIP-712 signature chain ID
                      default: '0xa4b1'
                    token:
                      type: string
                      description: >-
                        Token with address (e.g.,
                        "USDC:0x6d1e7cde53ba9467b783cb7c530ce054")
                    amount:
                      type: string
                      description: Amount to send as a decimal string
                    sourceDex:
                      type: string
                      description: Source DEX name (e.g., "HL")
                    destinationRecipient:
                      type: string
                      description: Recipient address on destination chain
                    addressEncoding:
                      type: string
                      description: Address encoding format
                      default: hex
                    destinationChainId:
                      type: integer
                      description: Destination chain ID (e.g., 42161 for Arbitrum)
                    gasLimit:
                      type: integer
                      description: Gas limit for the destination chain transaction
                    data:
                      type: string
                      description: Hex-encoded calldata ("0x" for automatic forwarding)
                    nonce:
                      type: integer
                      description: Current timestamp in milliseconds
                  required:
                    - type
                    - hyperliquidChain
                    - signatureChainId
                    - token
                    - amount
                    - sourceDex
                    - destinationRecipient
                    - addressEncoding
                    - destinationChainId
                    - gasLimit
                    - data
                    - nonce
                nonce:
                  type: integer
                  description: Current timestamp in milliseconds
                signature:
                  type: object
                  description: EIP-712 signature of the action with r, s, v components
                  properties:
                    r:
                      type: string
                      description: ECDSA signature r component (hex string)
                      example: >-
                        0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                    s:
                      type: string
                      description: ECDSA signature s component (hex string)
                      example: >-
                        0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321
                    v:
                      type: integer
                      description: ECDSA recovery id (27 or 28)
                      example: 27
                  required:
                    - r
                    - s
                    - v
                vaultAddress:
                  type: string
                  description: >-
                    Address when trading on behalf of a vault or subaccount
                    (optional)
                  nullable: true
              required:
                - action
                - nonce
                - signature
            example:
              action:
                type: sendToEvmWithData
                hyperliquidChain: Mainnet
                signatureChainId: '0xa4b1'
                token: USDC:0x6d1e7cde53ba9467b783cb7c530ce054
                amount: '1.0'
                sourceDex: HL
                destinationRecipient: '0x1234567890abcdef1234567890abcdef12345678'
                addressEncoding: hex
                destinationChainId: 42161
                gasLimit: 800000
                data: 0x
                nonce: 1705234567890
              nonce: 1705234567890
              signature:
                r: >-
                  0x0000000000000000000000000000000000000000000000000000000000000000
                s: >-
                  0x0000000000000000000000000000000000000000000000000000000000000000
                v: 27
              vaultAddress: null
      responses:
        '200':
          description: Action result
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Request status
                  response:
                    type: object
                    description: Action response data

````