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

# Evaluate a transaction for risks

> Evaluates a transaction using validation and/or simulation to assess risk before
signing. Supports both EVM (EIP-155) and Solana chains. The request body format
differs by chain type.

For **EVM chains**, provide the transaction fields (`to`, `data`, `value`, etc.).
For **Solana**, provide an array of base58-encoded transactions.




## OpenAPI

````yaml /openapi/client-api.yaml post /clients/me/evaluate-transaction
openapi: 3.1.0
info:
  title: Portal Client API
  version: '3.0'
  description: >
    The Portal Client API provides endpoints for managing wallets, building
    transactions,

    and interacting with blockchain networks. All endpoints require
    authentication via a

    Client API Key or Client Session Token (CST) passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Client API Key or Client Session Token as a Bearer token in the

    `Authorization` header of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Core client management endpoints
  - name: Wallet
    description: >-
      Read wallet state — balances, NFTs, transaction history, capabilities, and
      transaction details
  - name: Transactions
    description: Build, broadcast, and evaluate blockchain transactions
  - name: Funding
    description: Fund wallets with testnet tokens
  - name: Wallet Shares
    description: Manage signing and backup share pairs
  - name: Delegations
    description: Manage token approvals, revocations, and delegated transfers
  - name: Session Keys
    description: Manage EIP-7702 session keys for smart accounts
  - name: 0x
    description: Token swap endpoints powered by the 0x protocol
  - name: Yield.xyz
    description: Yield opportunities and staking actions powered by Yield.xyz
  - name: Li.Fi
    description: Cross-chain swaps and bridging powered by Li.Fi
  - name: Blockaid
    description: Transaction and address security scanning powered by Blockaid
  - name: Hypernative
    description: >-
      Transaction, address, token, and NFT security scanning powered by
      Hypernative
  - name: Noah
    description: KYC onboarding, payins, and payouts powered by Noah
  - name: EIP-7702
    description: EIP-7702 account type detection and authorization management
  - name: Deprecated
    description: >-
      Legacy endpoints scheduled for removal. Use the newer equivalents listed
      in each endpoint's description.
paths:
  /clients/me/evaluate-transaction:
    post:
      tags:
        - Transactions
      summary: Evaluate a transaction for risks
      description: >
        Evaluates a transaction using validation and/or simulation to assess
        risk before

        signing. Supports both EVM (EIP-155) and Solana chains. The request body
        format

        differs by chain type.


        For **EVM chains**, provide the transaction fields (`to`, `data`,
        `value`, etc.).

        For **Solana**, provide an array of base58-encoded transactions.
      operationId: evaluateTransaction
      parameters:
        - name: chainId
          in: query
          required: true
          description: >
            Chain ID in CAIP-2 format. For example, `eip155:1` for Ethereum
            mainnet

            or `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` for Solana.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/EvaluateTransactionEip155Request'
                - $ref: '#/components/schemas/EvaluateTransactionSolanaRequest'
            examples:
              evm:
                summary: EVM transaction evaluation
                value:
                  to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                  data: 0xa9059cbb000000000000000000000000...
                  value: '0x0'
                  operationType: all
              solana:
                summary: Solana transaction evaluation
                value:
                  transactions:
                    - 5xGh7Abc...
                  operationType: simulation
      responses:
        '200':
          description: Transaction evaluated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluateTransactionResponse'
              examples:
                evm:
                  summary: EVM evaluation result
                  value:
                    chain: eip155:1
                    validation:
                      status: Success
                      resultType: Benign
                      description: The transaction is safe
                      reason: ''
                      classification: ''
                      features: []
                    simulation:
                      status: Success
                      assetsDiffs: []
                      totalUsdDiff: '0'
                      exposures: []
                      totalUsdExposure: '0'
                      addressDetails: {}
                      accountSummary: {}
                solana:
                  summary: Solana evaluation result
                  value:
                    chain: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                    validation:
                      status: Success
                      resultType: Benign
                      description: The transaction is safe
                    simulation:
                      status: Success
                      assetsDiffs: []
                      totalUsdDiff: '0'
                      exposures: []
                      totalUsdExposure: '0'
        '400':
          description: |
            Bad request. Common causes:
            - Missing or invalid chainId
            - Invalid transaction fields
            - Mismatched chain type and request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EvaluateTransactionEip155Request:
      type: object
      description: Request body for evaluating an EVM (EIP-155) transaction.
      required:
        - to
      properties:
        to:
          type: string
          description: The target contract or recipient address.
        data:
          type: string
          description: Encoded transaction data (hex string).
        value:
          type: string
          description: Value to send in wei (hex string).
        gas:
          type: string
          description: Gas limit.
        gasPrice:
          type: string
          description: Gas price in wei.
        maxFeePerGas:
          type: string
          description: Maximum fee per gas (EIP-1559).
        maxPriorityFeePerGas:
          type: string
          description: Maximum priority fee per gas (EIP-1559).
        operationType:
          type: string
          enum:
            - validation
            - simulation
            - all
          description: >
            The type of evaluation to perform. Defaults to `all` if not
            specified.

            - `validation` — risk assessment only

            - `simulation` — state change simulation only

            - `all` — both validation and simulation
    EvaluateTransactionSolanaRequest:
      type: object
      description: Request body for evaluating Solana transactions.
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            type: string
          description: Array of base58-encoded Solana transactions to evaluate.
        operationType:
          type: string
          enum:
            - validation
            - simulation
            - all
          description: >
            The type of evaluation to perform. Defaults to `all` if not
            specified.
    EvaluateTransactionResponse:
      type: object
      description: >
        Evaluation result containing validation and/or simulation results
        depending on

        the requested `operationType`.
      properties:
        chain:
          type: string
          description: The CAIP-2 chain ID.
        validation:
          type: object
          description: >-
            Risk validation results (present when operationType is `validation`
            or `all`).
          properties:
            status:
              type: string
              description: Validation status (e.g. "Success").
            resultType:
              type: string
              description: Risk classification (e.g. "Benign", "Warning", "Malicious").
            description:
              type: string
              description: Human-readable description of the validation result.
            reason:
              type: string
              description: Reason for the classification.
            classification:
              type: string
              description: Detailed classification category.
            features:
              type: array
              items:
                type: object
              description: Feature flags from the validation engine.
        simulation:
          type: object
          description: >-
            Simulation results (present when operationType is `simulation` or
            `all`).
          properties:
            status:
              type: string
              description: Simulation status (e.g. "Success").
            assetsDiffs:
              type: array
              items:
                type: object
              description: Asset balance changes from the simulation.
            totalUsdDiff:
              type: string
              description: Total USD value change.
            exposures:
              type: array
              items:
                type: object
              description: Token approval exposures.
            totalUsdExposure:
              type: string
              description: Total USD exposure.
            addressDetails:
              type: object
              description: Details about addresses involved in the transaction.
            accountSummary:
              type: object
              description: Account summary after simulation.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Client API Key or Client Session Token (CST). Pass as a Bearer token in
        the

        Authorization header.

````