# wallet_sendCalls

> Submit a batch of calls using wallet_sendCalls (EIP-5792) for atomic or sequential multi-transaction execution in MetaMask.

<SimplifiedApiReference
  method="wallet_sendCalls"
  description="Requests that the wallet submits a batch of calls. This method allows applications to send multiple transactions atomically or sequentially."
  parameters={[
    {
      name: 'version',
      type: 'string',
      required: true,
      description: 'The version of the API format. Must be "2.0.0".',
    },
    {
      name: 'id',
      type: 'string',
      required: false,
      description: 'The ID of the batch of calls for tracking purposes.',
    },
    {
      name: 'from',
      type: 'string',
      required: true,
      description: "The sender's address. Pattern: ^0x[0-9a-fA-F]{40}$",
    },
    {
      name: 'chainId',
      type: 'string',
      required: true,
      description:
        'EIP-155 chain ID of the calls. Must match the currently selected network in the wallet. Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$',
    },
    {
      name: 'atomicRequired',
      type: 'boolean',
      required: true,
      description:
        'true to require atomic execution. If false, the wallet may execute sequentially without atomicity.',
    },
    {
      name: 'calls',
      type: 'array',
      required: true,
      description: 'Array of call objects to execute.',
      children: [
        {
          name: 'to',
          type: 'string',
          required: true,
          description: 'Recipient address.',
        },
        {
          name: 'value',
          type: 'string',
          required: true,
          description: 'Value in wei (hex format).',
        },
        {
          name: 'data',
          type: 'string',
          required: false,
          description: 'Call data (hex format).',
        },
      ],
    },
    {
      name: 'capabilities',
      type: 'object',
      required: false,
      description: 'Used by dapps to communicate supported capabilities to the wallet.',
    },
  ]}
  returns={{
    type: 'object',
    description:
      'An object containing information about the sent batch, including transaction details and status.',
  }}
  errors={[
    {
      code: -32602,
      message: 'The wallet cannot parse the request',
      description: 'Invalid request format',
    },
    {
      code: -32000,
      message: 'Version not supported',
      description: 'API version not supported',
    },
    {
      code: 4001,
      message: 'User rejected the request',
      description: 'User denied the transaction',
    },
    {
      code: 4100,
      message: 'The requested account and/or method has not been authorized by the user',
      description: 'Authorization required',
    },
    {
      code: 5700,
      message: 'The wallet does not support a capability that was not marked as optional',
      description: 'Missing capability',
    },
    {
      code: 5710,
      message: 'EIP-7702 not supported on the specified chain ID',
      description: 'Chain not supported',
    },
    {
      code: 5720,
      message: 'There is already a batch submitted with the specified batch ID',
      description: 'Duplicate batch ID',
    },
    {
      code: 5740,
      message: 'The batch is too large for the wallet to process',
      description: 'Batch size limit exceeded',
    },
    {
      code: 5750,
      message: 'EIP-7702 upgrade rejected for this chain and account',
      description: 'Upgrade rejected',
    },
  ]}
  exampleRequest={`await provider.request({
    method: 'wallet_sendCalls',
    params: [
      {
        version: '2.0.0',
        from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
        chainId: '0xaa36a7',
        atomicRequired: true,
        calls: [
          {
            to: '0x54f1C1965B355e1AB9ec3465616136be35bb5Ff7',
            value: '0x0',
          },
          {
            to: '0x2D48e6f5Ae053e4E918d2be53570961D880905F2',
            value: '0x0',
          },
        ],
      },
    ],
})`}
  exampleResponse={`{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
      "batchId": "0x123...",
      "status": "pending"
    }
}`}
/>
