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

# Enhance Transaction Metadata

> Fetches detailed transaction metadata from Solana RPC including fees, error status, and balance changes. Complements /analyze-trade by providing financial details for each transaction signature. Shows SOL/token balance changes, fees, and success/failure status focused exclusively on the transaction signer. Features 48-hour Redis caching.



## OpenAPI

````yaml /api-reference/openapi.json post /enhance-metadata
openapi: 3.0.3
info:
  title: Blockline MEV Analytics API
  description: >-
    Professional MEV analytics API for Solana. Analyze transaction context,
    detect front-running, identify sandwich attacks, and gain competitive
    intelligence on Solana MEV activity.
  version: 1.0.0
  contact:
    name: Blockline Support
    url: https://blockline.soltop.sh
servers:
  - url: https://api.soltop.sh
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Trade Analysis
    description: Analyze MEV activity and transaction context
  - name: Transactions
    description: Transaction details and metadata
  - name: Wallets
    description: Wallet transaction history
  - name: Data Management
    description: Backfill and data operations
  - name: MEV Analysis
    description: >-
      Sandwich attack detection: scan wallets, check transactions, and profile
      attackers (async job queue)
  - name: Write Locks
    description: Account write lock contention and hot account analysis
paths:
  /enhance-metadata:
    post:
      tags:
        - Transactions
      summary: Enhance Transaction Metadata
      description: >-
        Fetches detailed transaction metadata from Solana RPC including fees,
        error status, and balance changes. Complements /analyze-trade by
        providing financial details for each transaction signature. Shows
        SOL/token balance changes, fees, and success/failure status focused
        exclusively on the transaction signer. Features 48-hour Redis caching.
      operationId: enhanceMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - signature
              properties:
                signature:
                  type: string
                  description: Transaction signature to enhance (base58, 87-88 characters)
                  pattern: ^[1-9A-HJ-NP-Za-km-z]{87,88}$
                  example: >-
                    5Pj5fCupXLUePYn18JkY8SrRaWFiUctuDTRwvUy2ML9yvkENLb1QMYbcBGcBXRrSVDjp7RjUwk9a3rLC6gpvtYpZ
      responses:
        '200':
          description: Enhanced transaction metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      signature:
                        type: string
                      slot:
                        type: integer
                      blockTime:
                        type: integer
                      metadata:
                        type: object
                        properties:
                          fee:
                            type: integer
                            description: Transaction fee in lamports
                          err:
                            type: object
                            nullable: true
                            description: Error object if transaction failed
                          compute_units_consumed:
                            type: integer
                          signer:
                            type: string
                            description: Transaction signer pubkey
                          leader:
                            type: string
                          client:
                            type: string
                          client_version:
                            type: string
                          validator_name:
                            type: string
                          balance_changes:
                            type: object
                            description: Balance changes for signer only
                            properties:
                              spl_token_deltas:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    owner:
                                      type: string
                                    mint:
                                      type: string
                                    delta_base:
                                      type: string
                                      description: Raw token amount change
                                    decimals:
                                      type: integer
                                    delta_ui:
                                      type: number
                                      description: Human-readable amount change
                                    account_index:
                                      type: integer
                              sol_deltas:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    pubkey:
                                      type: string
                                    delta_lamports:
                                      type: string
                                    delta_sol:
                                      type: number
                                    account_index:
                                      type: integer
                              fee_lamports:
                                type: integer
                              summary:
                                type: object
                                properties:
                                  total_spl_changes:
                                    type: integer
                                  total_sol_changes:
                                    type: integer
                          signer_pre_balance:
                            type: integer
                          signer_post_balance:
                            type: integer
                          signer_pre_token_balances:
                            type: array
                          signer_post_token_balances:
                            type: array
                      processing_time_ms:
                        type: integer
        '400':
          $ref: 8bfc2abc-1edb-488f-91c7-8ada8fb2fc2d
        '401':
          $ref: 02ca5649-c9d9-4a5e-8f26-a133d5c61cc5
        '403':
          $ref: 80776eac-c595-4f19-9646-9d6dc9a6cf2c
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Transaction not found
                details: 'No transaction found with signature: abc123...'
                timestamp: '2025-10-02T15:30:45.123Z'
        '429':
          $ref: cfbde83c-0b04-46b0-b46a-c3a713982079
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: Detailed error information
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key authentication. Format: `sk_live_xxx` (production) or
        `sk_test_xxx` (testing). Obtain your API key from the [Blockline
        Dashboard](https://blockline.soltop.sh/dashboard/api-keys).

````