---
updatedAt: 2026-10-17T18:41:17.000Z
agentTools:
  projectIndex: https://askedgar.readme.io/llms.txt
---

# Gap Stats Advanced API — Historical Gap Screening & Backtesting

Search recorded small-cap gap-ups dating back to 2015 across tickers, with filters for date, gap percentage, premarket activity, trading volume, market cap, and whether the stock closed above VWAP.

## Overview

Build a historical gap dataset around the conditions you want to study.

Gap Stats Advanced searches the same recorded events as the basic Gap Stats API, with additional filters and an optional ticker. Omit the ticker to search across companies, or provide one to narrow that company’s history.

For small-cap traders researching gap-and-fade behavior, this makes it easier to compare groups of events: larger versus smaller gaps, heavier versus lighter premarket activity, or different market-cap ranges.

Each result includes opening and closing prices, session highs and lows with timestamps, volume, and associated news and filing tags. Results are ordered with the most recent dates first.

## What you can build

* **A historical gap screener:** Find recorded gap-ups within a date range that match your gap-size, volume, and market-cap criteria.
* **A gap-and-fade backtesting dataset:** Collect matching events across tickers and calculate your own open-to-close returns and moves above or below the opening price.
* **A premarket-activity comparison:** Compare subsequent trading behavior across different premarket volume and dollar-volume ranges.
* **A float-enriched research dataset:** Combine gap records with the Historical Float API to investigate how outcomes differ across historical float ranges.

## Build with AI

“Using [AskEdgar’s Gap Stats Advanced API](https://askedgar.readme.io/reference/get_gap_stats_advanced), build a historical small-cap gap research dashboard. Let me select a date range and filter by gap percentage, premarket volume, premarket dollar volume, daily volume, and market cap. Make ticker optional and load all matching result pages. Show the event prices, high and low timestamps, and associated news and filing tags. Calculate open-to-close returns, moves from the open to the session high and low, and the percentage of matching events that closed below the open. Show the sample size for every comparison.”

## Key parameters

* **`ticker`:** Optional. Omit it to search across tickers.
* **`date_from` / `date_to`:** Inclusive event-date range in `YYYY-MM-DD` format.
* **`min_gap_percentage` / `max_gap_percentage`:** Narrow the recorded events by opening-gap percentage.
* **Premarket filters:** Minimum and maximum values for `premarket_volume` and `premarket_dollar_volume`.
* **Session-volume filters:** Minimum and maximum values for `volume` and `dollar_volume`.
* **Market-cap filters:** `min_market_cap` and `max_market_cap`.
* **`closed_over_vwap`:** Filter by whether the stock closed above its calculated VWAP.
* **Range validation:** A minimum cannot exceed its corresponding maximum; invalid ranges return a `422` response.

## Response highlights

Returns the same fields as [Gap Stats](https://askedgar.readme.io/reference/get_gap_stats):

* `date`, `market_open`, `previous_day_close`, `gap_percentage`, `market_close` — the event date, prices, and opening gap.
* `high_price`, `low_price`, `high_time`, `low_time` — regular-session extremes and the timestamps of their one-minute bars.
* `premarket_vwap`, `premarket_volume`, `premarket_dollar_volume` — premarket activity.
* `volume`, `dollar_volume`, `market_cap` — trading activity and company size.
* `closed_over_vwap`, `afterhours_close` — whether the stock closed above the calculated VWAP, and its after-hours closing price.
* `all_tags`, `filing_types` — associated news tags and SEC filing types.

## Understanding the dataset

Advanced searches the same filtered dataset as [Gap Stats](https://askedgar.readme.io/reference/get_gap_stats).

The current scanner selects opening gaps of at least 20%, with at least $5 million in daily dollar volume, volume at least 10 times the historical median, a daily low of at least $0.10, and market cap below $1 billion under its market-cap checks.

Prices reflect the event-date trading prices rather than adjustments for subsequent splits. On recorded reverse-split dates, the prior close is converted to its post-split equivalent for the gap calculation. High and low timestamps use U.S. Eastern Time, including daylight-saving changes.

## Backtesting context

**Historical event coverage:** Research a defined sample of small-cap gap-ups meeting the collection criteria above. Compare trading behavior across gap sizes, volume levels, and company sizes, and show the number of events in each comparison.

**Using the data in backtests:** Event selection uses completed-day volume and dollar volume. Use these records for historical event comparisons. When simulating an entry at the open, distinguish information available at entry from completed-session selection criteria and outcomes.

**News and filing context:** Use associated tags to group events and explore the news and filings surrounding each move.

For historical float comparisons, use the most recent reported-date checkpoint before each gap date from the [Historical Float API](https://askedgar.readme.io/reference/get_historical_float_pro).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "AskEdgar API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://eapi.askedgar.io"
    }
  ],
  "paths": {
    "/v1/gap-stats-advanced": {
      "get": {
        "tags": [
          "Gap Stats"
        ],
        "summary": "Gap Stats Advanced API — Historical Gap Screening & Backtesting",
        "description": "Search recorded small-cap gap-ups dating back to 2015 across tickers, with filters for date, gap percentage, premarket activity, trading volume, market cap, and whether the stock closed above VWAP.",
        "operationId": "get_gap_stats_advanced",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ticker"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "name": "min_gap_percentage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Gap Percentage"
            }
          },
          {
            "name": "max_gap_percentage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Gap Percentage"
            }
          },
          {
            "name": "closed_over_vwap",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Closed Over Vwap"
            }
          },
          {
            "name": "min_premarket_dollar_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Premarket Dollar Volume"
            }
          },
          {
            "name": "max_premarket_dollar_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Premarket Dollar Volume"
            }
          },
          {
            "name": "min_premarket_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Premarket Volume"
            }
          },
          {
            "name": "max_premarket_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Premarket Volume"
            }
          },
          {
            "name": "min_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Volume"
            }
          },
          {
            "name": "max_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Volume"
            }
          },
          {
            "name": "min_dollar_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Dollar Volume"
            }
          },
          {
            "name": "max_dollar_volume",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Dollar Volume"
            }
          },
          {
            "name": "min_market_cap",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Market Cap"
            }
          },
          {
            "name": "max_market_cap",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Market Cap"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success GapStatsAdvanced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GapStatsAdvancedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Endpoint not allowed for your organization or API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointNotAllowedErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or trial ticker limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiKeyErrorResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "ApiKeyErrorResponse",
        "examples": [
          {
            "error": {
              "code": "missing_api_key",
              "details": {},
              "message": "API key is required. Pass it in the API-KEY header."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          },
          {
            "error": {
              "code": "invalid_api_key",
              "details": {},
              "message": "Invalid API key."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          }
        ]
      },
      "EndpointNotAllowedErrorResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "EndpointNotAllowedErrorResponse",
        "examples": [
          {
            "error": {
              "code": "endpoint_not_allowed",
              "details": {},
              "message": "Your organization does not have access to this endpoint."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          }
        ]
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details",
            "default": {}
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorDetail"
      },
      "GapStats": {
        "properties": {
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date"
          },
          "market_open": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Market Open"
          },
          "previous_day_close": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Day Close"
          },
          "gap_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gap Percentage"
          },
          "high_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "High Price"
          },
          "high_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "High Time"
          },
          "low_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Low Price"
          },
          "low_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Low Time"
          },
          "market_close": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Market Close"
          },
          "closed_over_vwap": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed Over Vwap"
          },
          "premarket_vwap": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Premarket Vwap"
          },
          "premarket_dollar_volume": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Premarket Dollar Volume"
          },
          "premarket_volume": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Premarket Volume"
          },
          "volume": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Volume"
          },
          "dollar_volume": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dollar Volume"
          },
          "market_cap": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Market Cap"
          },
          "all_tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "All Tags"
          },
          "filing_types": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filing Types"
          },
          "afterhours_close": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Afterhours Close"
          },
          "last_updated": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Updated"
          }
        },
        "type": "object",
        "required": [
          "ticker"
        ],
        "title": "GapStats"
      },
      "GapStatsAdvancedResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "has_more": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has More"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/GapStats"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "status",
          "count",
          "results"
        ],
        "title": "GapStatsAdvancedResponse",
        "examples": [
          {
            "status": "success",
            "count": 1,
            "message": null,
            "has_more": true,
            "page": 1,
            "limit": 2,
            "results": [
              {
                "ticker": "DVLT",
                "date": "2025-10-20",
                "market_open": 2.16,
                "previous_day_close": 1.79,
                "gap_percentage": 20.67,
                "high_price": 2.48,
                "high_time": "2025-10-20T14:52:00-05:00",
                "low_price": 2.02,
                "low_time": "2025-10-20T09:17:00-05:00",
                "market_close": 2.425,
                "closed_over_vwap": true,
                "premarket_vwap": 2.1113,
                "premarket_dollar_volume": 17350907.82,
                "premarket_volume": 8218059,
                "volume": 73693379,
                "dollar_volume": 166240357.26,
                "market_cap": 689013491.98,
                "all_tags": [
                  "Financing Activity",
                  "Expansion Plans",
                  "Upcoming Events",
                  "Product Launches",
                  "Capital Structure",
                  "Partnerships",
                  "Financial Performance",
                  "Dilution",
                  "Cryptocurrency"
                ],
                "filing_types": [
                  "news"
                ],
                "afterhours_close": 2.38,
                "last_updated": "2026-01-28T17:19:13.179485-05:00"
              }
            ],
            "usage": {
              "response_bytes": 1274,
              "billed_bytes": 0,
              "cost_microdollars": 0,
              "cost_dollars": "$0.000000",
              "credits_remaining_microdollars": null,
              "credits_remaining_dollars": null,
              "cached": false
            }
          }
        ]
      },
      "InsufficientCreditsErrorResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "InsufficientCreditsErrorResponse",
        "examples": [
          {
            "error": {
              "code": "insufficient_credits",
              "details": {
                "balance": 500000,
                "estimated_cost": 1000000,
                "unit": "microdollars"
              },
              "message": "Insufficient credits to process this request."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          }
        ]
      },
      "RateLimitErrorResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "RateLimitErrorResponse",
        "examples": [
          {
            "error": {
              "code": "rate_limit_exceeded",
              "details": {
                "limit": 200,
                "retry_after": 42,
                "window": "1m"
              },
              "message": "Rate limit exceeded."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          }
        ]
      },
      "RequestStatus": {
        "type": "string",
        "enum": [
          "success",
          "error"
        ],
        "title": "RequestStatus"
      },
      "ValidationErrorResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequestStatus"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "ValidationErrorResponse",
        "examples": [
          {
            "error": {
              "code": "validation_error",
              "details": {
                "fields": [
                  {
                    "field": "ticker",
                    "reason": "Value error, Field 'ticker' must contain only uppercase letters, numbers, dots, hyphens, or carets."
                  }
                ]
              },
              "message": "Request validation failed."
            },
            "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "status": "error"
          }
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "API-KEY"
      }
    }
  }
}
```