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

# Simulate an EVM Transaction

> Traces an unsigned EVM transaction at the latest block. Returns balance deltas, transfers, approvals, and attribution checks. A reverted transaction is 200 with status: reverted.



## OpenAPI

````yaml post /v2/simulate/evm
openapi: 3.0.0
info:
  title: Range Risk API
  description: The Range Risk API for risk assessment of crypto addresses.
  version: 1.7.22
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
tags:
  - name: Risk
    description: Get risk information about a crypto address.
  - name: Risk v2
    description: >-
      Address risk assessment, workspace configuration, and signals catalogue
      (API v2).
  - name: Simulator
    description: Simulate a transaction on a network.
paths:
  /v2/simulate/evm:
    post:
      tags:
        - Simulator
      summary: Simulate an EVM transaction
      description: >-
        Traces an unsigned EVM transaction at the latest block and returns
        projected balance deltas, token transfers, approvals, the revert reason
        when it fails, and attribution checks for every address involved. A
        reverted transaction is a 200 with `status: reverted`.
      operationId: simulate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateEvmRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateEvmResponseDto'
components:
  schemas:
    SimulateEvmRequestDto:
      type: object
      properties:
        network:
          type: string
          enum:
            - eth
            - arb1
            - base
            - oeth
            - pol
            - bnb
            - avax
          example: eth
        transaction:
          $ref: '#/components/schemas/EvmTransactionDto'
        state_overrides:
          type: object
          description: >-
            Per-address state overrides applied before the simulation, keyed by
            address. Forwarded to the node as-is.
          additionalProperties: true
          example:
            '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045':
              balance: '0xde0b6b3a7640000'
      required:
        - network
        - transaction
    SimulateEvmResponseDto:
      type: object
      properties:
        network:
          type: string
          example: eth
        status:
          type: string
          enum:
            - success
            - reverted
        error:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/EvmSimulationErrorDto'
        gas_used:
          type: string
          example: '0x5208'
        created_contract:
          type: string
          nullable: true
        balance_deltas:
          type: array
          items:
            $ref: '#/components/schemas/EvmBalanceDeltaDto'
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/EvmTransferDto'
        approvals:
          type: array
          items:
            $ref: '#/components/schemas/EvmApprovalDto'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/EvmAddressCheckDto'
        meta:
          $ref: '#/components/schemas/EvmSimulationMetaDto'
      required:
        - network
        - status
        - error
        - gas_used
        - created_contract
        - balance_deltas
        - transfers
        - approvals
        - addresses
        - meta
    EvmTransactionDto:
      type: object
      properties:
        from:
          type: string
          example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
        to:
          type: string
          description: Omit for contract creation.
          example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
        value:
          type: string
          example: '0x0'
        data:
          type: string
          example: 0xa9059cbb…
        gas:
          type: string
          example: '0x5208'
        gas_price:
          type: string
          example: '0x3b9aca00'
        max_fee_per_gas:
          type: string
          example: '0x3b9aca00'
        max_priority_fee_per_gas:
          type: string
          example: '0x3b9aca00'
        nonce:
          type: string
          example: '0x1'
      required:
        - from
    EvmSimulationErrorDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - revert
            - out_of_gas
            - custom_error
            - unknown
        reason:
          type: string
          nullable: true
          example: 'ERC20: transfer amount exceeds balance'
        selector:
          type: string
          nullable: true
          example: '0x08c379a0'
      required:
        - kind
        - reason
        - selector
    EvmBalanceDeltaDto:
      type: object
      properties:
        account_address:
          type: string
        asset_id:
          type: string
          description: '`native`, `0x<contract>` or `0x<contract>:<token_id>`.'
        standard:
          type: string
          enum:
            - native
            - erc20
            - erc1155
        amount_delta_raw:
          type: string
          description: Signed base-unit delta.
          example: '-1000000'
        amount_delta_normalized:
          type: string
          nullable: true
          example: '-1'
        usd_value:
          type: string
          nullable: true
          example: '-1.00'
        asset:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/EvmAssetDto'
      required:
        - account_address
        - asset_id
        - standard
        - amount_delta_raw
        - amount_delta_normalized
        - usd_value
    EvmTransferDto:
      type: object
      properties:
        standard:
          type: string
          enum:
            - native
            - erc20
            - erc721
            - erc1155
        from:
          type: string
        to:
          type: string
        asset_id:
          type: string
        token_id:
          type: string
          nullable: true
        amount_raw:
          type: string
        amount_normalized:
          type: string
          nullable: true
          example: '1.5'
        usd_value:
          type: string
          nullable: true
          example: '1.50'
        asset:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/EvmAssetDto'
        depth:
          type: number
          description: Call depth the transfer happened at; 0 = top-level.
      required:
        - standard
        - from
        - to
        - asset_id
        - token_id
        - amount_raw
        - amount_normalized
        - usd_value
        - depth
    EvmApprovalDto:
      type: object
      properties:
        standard:
          type: string
          enum:
            - erc20
            - erc721
            - erc1155
        owner:
          type: string
        spender:
          type: string
        asset_id:
          type: string
        token_id:
          type: string
          nullable: true
        amount_raw:
          type: string
          nullable: true
        amount_normalized:
          type: string
          nullable: true
        asset:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/EvmAssetDto'
        unlimited:
          type: boolean
        for_all:
          type: boolean
        revoked:
          type: boolean
      required:
        - standard
        - owner
        - spender
        - asset_id
        - token_id
        - amount_raw
        - amount_normalized
        - unlimited
        - for_all
        - revoked
    EvmAddressCheckDto:
      type: object
      properties:
        address:
          type: string
        roles:
          type: array
          items:
            type: string
            enum:
              - signer
              - target_contract
              - sender
              - recipient
              - owner
              - spender
              - operator
              - called_contract
              - created_contract
        malicious:
          type: boolean
        sanctioned:
          type: boolean
        token_blacklisted:
          type: boolean
        blacklisted_by:
          type: array
          items:
            type: string
        name:
          type: string
          nullable: true
        entity:
          type: string
          nullable: true
        category:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        role:
          type: string
          nullable: true
        check_status:
          type: string
          enum:
            - ok
            - unavailable
      required:
        - address
        - roles
        - malicious
        - sanctioned
        - token_blacklisted
        - blacklisted_by
        - name
        - entity
        - category
        - tags
        - role
        - check_status
    EvmSimulationMetaDto:
      type: object
      properties:
        rpc_ms:
          type: number
        enrich_ms:
          type: number
        total_ms:
          type: number
        frames:
          type: number
        logs:
          type: number
        unknown_logs:
          type: number
        addresses_truncated:
          type: boolean
          description: >-
            True when more addresses were involved than can be screened; the
            extra addresses are still listed with check_status "unavailable".
      required:
        - rpc_ms
        - enrich_ms
        - total_ms
        - frames
        - logs
        - unknown_logs
        - addresses_truncated
    EvmAssetDto:
      type: object
      properties:
        symbol:
          type: string
          example: USDC
        decimals:
          type: number
          example: 6
        is_stablecoin:
          type: boolean
          example: true
        icon_url:
          type: string
          nullable: true
          example: https://icons.range.org/assets/12.webp
      required:
        - symbol
        - decimals
        - is_stablecoin
        - icon_url
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````