HashDit Simulation API

The Simulation API from HashDit — 1 operation(s) for simulation.

GitHub OpenAPI

Operations 1

POST /v2/hashdit/solana-emulate Solana Transaction Simulation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hashdit:hashdit-simulation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hashdit-simulation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HashDit Simulation API
  description: HashDit threat intelligence API for domain security analysis, blockchain address classification, address poisoning detection, address security assessment, transaction security, token security, Solana token security, token approval security, and EIP-712 signature security
  version: 2.0.0
servers:
- url: https://service.hashdit.io
tags:
- name: Simulation
paths:
  /v2/hashdit/solana-emulate:
    post:
      x-hidden: true
      summary: Solana Transaction Simulation
      description: Simulates serialized or structured Solana transactions before broadcast and reports execution status, balance changes, involved addresses, and known address risk. Per-transaction simulation failures are returned in `results[].error` inside a successful API envelope.
      operationId: solanaEmulate
      requestBody:
        description: Solana transactions to simulate
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SolanaEmulateRequest'
            examples:
              Serialized transaction:
                summary: Most common — serialized tx (base64 or base58)
                value:
                  sol_transactions:
                  - transaction: AfgyfPp6V8GhP...base64...==
                    encoding: base64
                    name: user-swap
                  requested_items:
                    balance_changes: true
                    involved_address_risks: true
              Structured transaction:
                summary: HashDit assembles the transaction from instructions
                value:
                  sol_transactions:
                  - feePayer: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    name: user-swap
                    instructions:
                    - programId: '11111111111111111111111111111111'
                      keys:
                      - pubkey: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        isSigner: true
                        isWritable: true
                      - pubkey: DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
                        isSigner: false
                        isWritable: true
                      data: AQIDBA==
                  requested_items:
                    balance_changes: true
                    involved_address_risks: true
      responses:
        '200':
          description: 'Successful API call. A failed simulation still returns `code: "0"` and `status: "ok"` — read `exec_summary.result_code` and `results[i].error`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaEmulateResponse'
              examples:
                Successful simulation:
                  summary: Simulation completed
                  value:
                    code: '0'
                    status: ok
                    data:
                      exec_summary:
                        result_code: '000000000'
                        result_description: Successful simulation.
                        error_data: null
                      results:
                      - from: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        to: '11111111111111111111111111111111'
                        compute_units_consumed: 12345
                        called_addresses:
                        - '11111111111111111111111111111111'
                        involved_addresses:
                        - '11111111111111111111111111111111'
                        - DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
                        - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        involved_addresses_risks:
                        - address: DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
                          risk_level: 1
                        balance_changes:
                        - token_address: native
                          tokenName: Solana
                          symbol: SOL
                          divisor: '9'
                          change_list:
                          - address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                            amount_change: '-1.000005'
                            delta_value: '-1000005000'
                          - address: DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy
                            amount_change: '1.0'
                            delta_value: '1000000000'
                        error: null
                        name: user-swap
                        block_height: 355123456
                        request_id: a4883040-96fe-4192-ad34-99ff9cdf0e5e
                Simulation error:
                  summary: 'Envelope still `code: "0"`; failure is in `error`'
                  value:
                    code: '0'
                    status: ok
                    data:
                      exec_summary:
                        result_code: <non-zero>
                        result_description: Simulation did not complete normally.
                        error_data: BlockhashNotFound
                      results:
                      - from: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        to: '11111111111111111111111111111111'
                        compute_units_consumed: 0
                        called_addresses: []
                        involved_addresses: []
                        balance_changes: []
                        error: BlockhashNotFound
                        name: user-swap
                        request_id: a4883040-96fe-4192-ad34-99ff9cdf0e5e
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
      - apiKeyAuth: []
      tags:
      - Simulation
components:
  schemas:
    SolanaEmulateRequestedItems:
      type: object
      properties:
        balance_changes:
          type: boolean
          default: true
          description: Net token balance change per holder.
        involved_address_risks:
          type: boolean
          default: false
          description: HashDit risk level for involved addresses.
    RateLimitExceededErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: '`429`'
          example: '429'
        status:
          type: string
          description: '`error`'
          example: error
        message:
          type: string
          description: Rate limit exceeded
          example: Rate limit exceeded
      required:
      - code
      - status
    SolanaStructuredTransaction:
      title: Structured transaction
      type: object
      required:
      - feePayer
      - instructions
      properties:
        feePayer:
          type: string
          description: Base58 public key paying fees.
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        instructions:
          type: array
          description: Ordered instructions. Key order matters.
          items:
            $ref: '#/components/schemas/SolanaInstruction'
        name:
          type: string
          description: Label echoed back in the matching result.
    SolanaInstructionKey:
      type: object
      required:
      - pubkey
      properties:
        pubkey:
          type: string
          description: Account public key (base58).
        isSigner:
          type: boolean
          default: false
        isWritable:
          type: boolean
          default: false
    SolanaEmulateResult:
      type: object
      properties:
        from:
          type:
          - string
          - 'null'
          description: Fee payer (base58).
        to:
          type:
          - string
          - 'null'
          description: First program ID invoked. `null` when the transaction has no instructions.
        compute_units_consumed:
          type: integer
          description: Solana's analogue to gas. `0` on simulator failure.
        called_addresses:
          type: array
          description: Program IDs touched, in execution order.
          items:
            type: string
        involved_addresses:
          type: array
          description: Fee payer + program IDs + accounts appearing in balance changes.
          items:
            type: string
        involved_addresses_risks:
          type: array
          description: '`{address, risk_level}`. Only when `involved_address_risks` was requested.'
          items:
            $ref: '#/components/schemas/EmulateAddressRisk'
        balance_changes:
          type: array
          description: 'Same shape as EVM. Native SOL uses `token_address: "native"`.'
          items:
            $ref: '#/components/schemas/EmulateBalanceChange'
        error:
          type:
          - string
          - 'null'
          description: '`null` on success; otherwise the Solana error, e.g. `"BlockhashNotFound"`.'
        name:
          type: string
          description: Echoed from the input.
        block_height:
          type: integer
          description: Slot simulated against.
        request_id:
          type: string
          description: Per-request UUID — quote this in support requests.
    EmulateAddressRisk:
      type: object
      properties:
        address:
          type: string
        risk_level:
          type: integer
          description: '`0` no known risk; `1` low risk; `2`–`5` increasing risk; `-1` not in HashDit''s database — unknown, not safe.'
    EmulateExecSummary:
      type: object
      properties:
        result_code:
          type: string
          description: '`"000000000"` when every transaction simulated normally. Any other value means the simulation did not complete normally — read `result_description` and `error_data`.'
          example: '000000000'
        result_description:
          type: string
          description: Human-readable explanation of `result_code`.
          example: Successful simulation.
        error_data:
          type:
          - string
          - 'null'
          description: '`null` on success. On a revert, the decoded revert reason.'
          example: null
        emulator_type:
          type: string
          description: Which simulator produced the result, e.g. `node_trace_js`.
          example: node_trace_js
    EmulateBalanceChange:
      type: object
      properties:
        token_address:
          type: string
          description: Token contract. Native SOL uses `"native"`. TRC-10 transfers use `"trc10:<id>"`.
          example: '0x55d398326f99059ff775485246999027b3197955'
        tokenName:
          type: string
          example: Binance-Peg BSC-USD
        symbol:
          type: string
          example: BSC-USD
        divisor:
          type: string
          description: Token decimals, as a decimal string.
          example: '18'
        tokenPriceUSD:
          type: string
          description: USD unit price used for `value_usd`.
        change_list:
          type: array
          items:
            $ref: '#/components/schemas/EmulateBalanceChangeItem'
    SolanaEmulateResponse:
      type: object
      properties:
        code:
          type: string
          description: API status code. `"0"` indicates the API call succeeded, including when a simulation reports `error`.
          example: '0'
        status:
          type: string
          example: ok
        data:
          $ref: '#/components/schemas/SolanaEmulateData'
      required:
      - code
      - status
    CurrentServiceError:
      type: object
      properties:
        code:
          type: string
          description: Error code. Typically `-1` for client errors, `-2` for server errors, or `401` / `429` for auth and rate limits.
        status:
          type: string
          description: Short error status string.
        detail:
          type: string
          description: Human-readable explanation of the error. Names the field that was rejected when the request is invalid.
      required:
      - code
      - status
    MissingAPIKeyErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: '`401`'
          example: '401'
        status:
          type: string
          description: Missing API key
          example: Missing API key
        detail:
          type: string
          description: Missing API key
          example: Missing API key
      required:
      - code
      - status
      - detail
    SolanaEmulateData:
      type: object
      properties:
        exec_summary:
          $ref: '#/components/schemas/EmulateExecSummary'
        results:
          type: array
          description: One entry per input transaction, in submission order.
          items:
            $ref: '#/components/schemas/SolanaEmulateResult'
    SolanaInstruction:
      type: object
      required:
      - programId
      - keys
      properties:
        programId:
          type: string
          description: Program ID (base58).
        keys:
          type: array
          description: Account keys. Order matters.
          items:
            $ref: '#/components/schemas/SolanaInstructionKey'
        data:
          type: string
          description: Instruction data, base64.
    SolanaSerializedTransaction:
      title: Serialized transaction
      type: object
      required:
      - transaction
      properties:
        transaction:
          type: string
          description: Serialized transaction. Versioned (V0) and legacy both work.
          example: AfgyfPp6V8GhP...base64...==
        encoding:
          type: string
          enum:
          - base64
          - base58
          default: base64
          description: '`"base64"` (default) or `"base58"`.'
        name:
          type: string
          description: Label echoed back in the matching result.
    SolanaEmulateRequest:
      type: object
      required:
      - sol_transactions
      properties:
        sol_transactions:
          type: array
          minItems: 1
          description: Transactions to simulate. Minimum 1. Alias `transactions` also accepted. Each item is either a serialized transaction or a structured transaction.
          items:
            $ref: '#/components/schemas/SolanaTransaction'
        requested_items:
          $ref: '#/components/schemas/SolanaEmulateRequestedItems'
    EmulateBalanceChangeItem:
      type: object
      properties:
        address:
          type: string
        amount_change:
          type: string
          description: Balance change in token units, normalized by the token's decimals (`divisor`). For an 18-decimal token, `delta_value` `"1000000000000000000"` is the equivalent of `amount_change` `"1"`. Negative means the address sent tokens. Use this for display; `delta_value` is the same change in raw smallest units.
        begin_value:
          type: string
          description: Balance before, raw smallest-unit decimal string.
        delta_value:
          type: string
          description: Change, raw smallest-unit decimal string.
        end_value:
          type: string
          description: Balance after, raw smallest-unit decimal string.
        value_usd:
          type: string
          description: The dollar amount changed, calculated as `amount_change × tokenPriceUSD`.
    SolanaTransaction:
      oneOf:
      - $ref: '#/components/schemas/SolanaSerializedTransaction'
      - $ref: '#/components/schemas/SolanaStructuredTransaction'
      description: Serialized (`transaction`) or structured (`feePayer` + `instructions`).
  responses:
    BadRequest:
      description: Bad request — malformed or missing field, unsupported chain, or invalid address. `detail` names the field that was rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentServiceError'
          examples:
            Invalid request:
              summary: Malformed or missing field
              value:
                code: '-1'
                status: invalid request
                detail: …
            Unsupported chain:
              summary: Chain not enabled for this endpoint
              value:
                code: '-1'
                status: unsupported chain
                detail: 'unsupported chainId: 137'
            Invalid address:
              summary: Address fails the format check for that chain
              value:
                code: '-1'
                status: invalid address
                detail: …
    Unauthorized:
      description: Missing or invalid `X-API-KEY`. This is the response customers see on current-service endpoints.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MissingAPIKeyErrorResponse'
          examples:
            Missing API key:
              summary: Missing or invalid API key
              value:
                code: '401'
                status: Missing API key
                detail: Missing API key
    GatewayTimeout:
      description: Upstream timed out. Simulation endpoints only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentServiceError'
          examples:
            Gateway timeout:
              summary: Upstream timeout
              value:
                code: '-2'
                status: gateway timeout
                detail: upstream service timed out
    InternalServerError:
      description: Server-side failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentServiceError'
          examples:
            Internal server error:
              summary: Internal server error
              value:
                code: '-2'
                status: internal server error
                detail: internal server error
    RateLimitExceeded:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitExceededErrorResponse'
          examples:
            Rate limit exceeded:
              summary: Rate limit exceeded error
              value:
                code: '429'
                status: error
                message: Rate limit exceeded
    BadGateway:
      description: Upstream analysis service failed. Simulation endpoints only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentServiceError'
          examples:
            Bad gateway:
              summary: Upstream failure
              value:
                code: '-2'
                status: bad gateway
                detail: …
    UnprocessableEntity:
      description: Schema validation failed. `detail` names the failing field path.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentServiceError'
          examples:
            Field required:
              summary: Schema validation
              value:
                code: '-1'
                status: invalid request
                detail: 'chainId: field required'
            Field path:
              summary: detail names the failing field path
              value:
                code: '-1'
                status: invalid request
                detail: evm_transactions[0].from
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY