> ## 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.

# Check Sandwich Attack (Sync / Fast)

> Synchronous sandwich check for a single transaction. Returns the result directly with no job queue or polling required. Uses tighter parameters for speed: ±1 min timestamp window (vs ±5 min), max ±10 slot range. Ideal for quick single-transaction lookups. Results are cached for 5 minutes.



## OpenAPI

````yaml /api-reference/openapi.json post /mev/check-sandwich-fast
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:
  /mev/check-sandwich-fast:
    post:
      tags:
        - MEV Analysis
      summary: Check Sandwich Attack (Sync / Fast)
      description: >-
        Synchronous sandwich check for a single transaction. Returns the result
        directly with no job queue or polling required. Uses tighter parameters
        for speed: ±1 min timestamp window (vs ±5 min), max ±10 slot range.
        Ideal for quick single-transaction lookups. Results are cached for 5
        minutes.
      operationId: checkSandwichFast
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - signature
              properties:
                signature:
                  type: string
                  description: Single transaction signature to check
                  example: >-
                    48kLA6633tthDaBHTpzv9qXFkypFajpzyAd7hP8xRu8ggr8VhG5NXUKs7M2SYi57ntDKwPEqFgUGHrvXVd7pzFRE
                slot_range:
                  type: integer
                  minimum: 0
                  maximum: 10
                  default: 1
                  description: >-
                    Slot range (±) to search for attackers. 0 = intra-slot only.
                    Max 10.
      responses:
        '200':
          description: Sandwich check result returned directly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandwichCheckResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid request
                details: signature is required (single string)
        '401':
          $ref: 02ca5649-c9d9-4a5e-8f26-a133d5c61cc5
        '403':
          $ref: 80776eac-c595-4f19-9646-9d6dc9a6cf2c
        '429':
          $ref: cfbde83c-0b04-46b0-b46a-c3a713982079
        '503':
          description: ClickHouse unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Service unavailable
                details: ClickHouse not available
      security:
        - SupabaseJWT: []
components:
  schemas:
    SandwichCheckResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/SandwichCheckResult'
            summary:
              type: object
              properties:
                total_checked:
                  type: integer
                  description: Number of signatures submitted
                total_found:
                  type: integer
                  description: Number found in timing_data
                total_sandwich_attacks:
                  type: integer
                  description: Number of sandwich attacks detected
                slot_range_used:
                  type: integer
                  description: Slot range used for the analysis
    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
    SandwichCheckResult:
      type: object
      properties:
        signature:
          type: string
          description: Input transaction signature
        found:
          type: boolean
          description: Whether the transaction was found in timing_data
        slot:
          type: integer
          description: Slot number
        poh_tick:
          type: string
          description: PoH tick position (BigInt as string)
        signer:
          type: string
          description: Wallet that signed the transaction
        pools:
          type: array
          items:
            type: object
            properties:
              pool_address:
                type: string
              pool_label:
                type: string
              dex_name:
                type: string
        incidents:
          type: array
          items:
            $ref: '#/components/schemas/SandwichIncident'
        sandwich_detected:
          type: boolean
          description: Whether a sandwich attack was detected
        success:
          type: boolean
          description: Whether the victim's transaction executed successfully
    SandwichIncident:
      type: object
      properties:
        attacker_signature:
          type: string
          description: Attacker's transaction signature
        attacker_signer:
          type: string
          description: Attacker's wallet address
        slot:
          type: integer
          description: Slot of the attacker's transaction
        poh_tick:
          type: string
          description: PoH tick position (BigInt as string)
        poh_tick_offset:
          type: string
          description: PoH tick distance from victim (negative = before)
        interaction_type:
          type: string
          enum:
            - sandwich_frontrun
            - sandwich_backrun
          description: Type of sandwich leg (only sandwich incidents are returned)
        pool_address:
          type: string
          description: DEX pool where the interaction occurred
        pool_label:
          type: string
          description: Human-readable pool label
        success:
          type: boolean
          description: Whether the attacker's transaction executed successfully
  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).
    SupabaseJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase JWT authentication. Used for MEV Analysis and Write Locks
        endpoints. Requires an active subscription (trial, active, or
        grace_period status).

````