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

# market session breakout by levels

> Computes the session 1 range, then counts how often session 2 reaches each of 8 breakout levels above the session 1 high (0.5x to 4.0x of range) and 8 breakdown levels below the session 1 low (-0.5x to -4.0x). Returns per-level counts and percentages plus a per-day detail table with max bullish and bearish levels reached. Configurable via session windows, breakout and breakdown level multipliers, `seperate_days` (compare session 1 to next-day session 2), and `days_to_use` (weekday filter).



## OpenAPI

````yaml /openapi-public.json get /report_calculation/market-session-breakout-by-levels/{market_type}/{ticker}
openapi: 3.1.0
info:
  title: Edgeful API
  description: >-
    Public API reference for Edgeful market analysis calculations. The bearer
    token is your Edgeful API key: paste the key itself in the docs playground.
    Report responses include row-level output in `detailed` only when your plan
    includes row-level detail.
  version: 1.0.0
servers:
  - url: https://api.edgeful.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: reports
  - name: live data
paths:
  /report_calculation/market-session-breakout-by-levels/{market_type}/{ticker}:
    get:
      tags:
        - reports
      summary: market session breakout by levels
      description: >-
        Computes the session 1 range, then counts how often session 2 reaches
        each of 8 breakout levels above the session 1 high (0.5x to 4.0x of
        range) and 8 breakdown levels below the session 1 low (-0.5x to -4.0x).
        Returns per-level counts and percentages plus a per-day detail table
        with max bullish and bearish levels reached. Configurable via session
        windows, breakout and breakdown level multipliers, `seperate_days`
        (compare session 1 to next-day session 2), and `days_to_use` (weekday
        filter).
      operationId: >-
        market_session_breakout_by_levels_report_calculation_market_session_breakout_by_levels__market_type___ticker__get
      parameters:
        - name: ticker
          in: path
          required: true
          schema:
            type: string
            description: >-
              ticker symbol. format varies by `market_type`: stocks use a plain
              symbol (e.g., SPY), forex uses a 6-character pair (e.g., EURUSD),
              crypto uses a contract pair (e.g., BTCUSD), futures uses the root
              symbol (e.g., ES).
            examples:
              - SPY
              - EURUSD
              - BTCUSD
              - ES
            title: Ticker
          description: >-
            ticker symbol. format varies by `market_type`: stocks use a plain
            symbol (e.g., SPY), forex uses a 6-character pair (e.g., EURUSD),
            crypto uses a contract pair (e.g., BTCUSD), futures uses the root
            symbol (e.g., ES).
        - name: market_type
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/MarketTypeEnum'
            description: >-
              market venue for the ticker. one of: `forex`, `futures`, `crypto`,
              `stock`. determines supported symbols and whether session-based
              intraday aggregation is available.
            examples:
              - stock
              - forex
          description: >-
            market venue for the ticker. one of: `forex`, `futures`, `crypto`,
            `stock`. determines supported symbols and whether session-based
            intraday aggregation is available.
        - name: session1_start_time
          in: query
          required: false
          schema:
            type: string
            description: >-
              session 1 start time, `HH:MM:SS`, interpreted in
              `session1_timezone`. defines the range whose high and low anchor
              the breakout/breakdown levels.
            title: Session1 Start Time
          description: >-
            session 1 start time, `HH:MM:SS`, interpreted in
            `session1_timezone`. defines the range whose high and low anchor the
            breakout/breakdown levels.
        - name: session1_end_time
          in: query
          required: false
          schema:
            type: string
            description: >-
              session 1 end time, `HH:MM:SS`, interpreted in
              `session1_timezone`.
            title: Session1 End Time
          description: session 1 end time, `HH:MM:SS`, interpreted in `session1_timezone`.
        - name: session1_timezone
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone used to interpret session 1 times. defaults to
              `America/New_York`.
            default: America/New_York
            title: Session1 Timezone
          description: >-
            IANA timezone used to interpret session 1 times. defaults to
            `America/New_York`.
        - name: session2_start_time
          in: query
          required: false
          schema:
            type: string
            description: >-
              session 2 start time, `HH:MM:SS`, interpreted in
              `session2_timezone`. session 2 is the window where level
              interactions are measured.
            title: Session2 Start Time
          description: >-
            session 2 start time, `HH:MM:SS`, interpreted in
            `session2_timezone`. session 2 is the window where level
            interactions are measured.
        - name: session2_end_time
          in: query
          required: false
          schema:
            type: string
            description: >-
              session 2 end time, `HH:MM:SS`, interpreted in
              `session2_timezone`.
            title: Session2 End Time
          description: session 2 end time, `HH:MM:SS`, interpreted in `session2_timezone`.
        - name: session2_timezone
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone used to interpret session 2 times. defaults to
              `America/New_York`.
            default: America/New_York
            title: Session2 Timezone
          description: >-
            IANA timezone used to interpret session 2 times. defaults to
            `America/New_York`.
        - name: seperate_days
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              when true, treats session 1 and session 2 as falling on separate
              calendar days; when false, both sessions belong to the same
              calendar day.
            default: false
            title: Seperate Days
          description: >-
            when true, treats session 1 and session 2 as falling on separate
            calendar days; when false, both sessions belong to the same calendar
            day.
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            description: >-
              inclusive start date, `YYYY-MM-DD`, interpreted in the request
              `timezone`. sessions on or after this date are included in the
              calculation.
            examples:
              - '2024-01-01'
            title: Start Date
          description: >-
            inclusive start date, `YYYY-MM-DD`, interpreted in the request
            `timezone`. sessions on or after this date are included in the
            calculation.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            description: >-
              inclusive end date, `YYYY-MM-DD`, interpreted in the request
              `timezone`. sessions on or before this date are included in the
              calculation.
            examples:
              - '2024-12-31'
            title: End Date
          description: >-
            inclusive end date, `YYYY-MM-DD`, interpreted in the request
            `timezone`. sessions on or before this date are included in the
            calculation.
        - name: breakout_level_1
          in: query
          required: false
          schema:
            type: number
            description: >-
              first upside level above session 1 high, expressed as a multiple
              of the session 1 range.
            default: 0.5
            title: Breakout Level 1
          description: >-
            first upside level above session 1 high, expressed as a multiple of
            the session 1 range.
        - name: breakout_level_2
          in: query
          required: false
          schema:
            type: number
            description: >-
              second upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 1
            title: Breakout Level 2
          description: >-
            second upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_3
          in: query
          required: false
          schema:
            type: number
            description: >-
              third upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 1.5
            title: Breakout Level 3
          description: >-
            third upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_4
          in: query
          required: false
          schema:
            type: number
            description: >-
              fourth upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 2
            title: Breakout Level 4
          description: >-
            fourth upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_5
          in: query
          required: false
          schema:
            type: number
            description: >-
              fifth upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 2.5
            title: Breakout Level 5
          description: >-
            fifth upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_6
          in: query
          required: false
          schema:
            type: number
            description: >-
              sixth upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 3
            title: Breakout Level 6
          description: >-
            sixth upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_7
          in: query
          required: false
          schema:
            type: number
            description: >-
              seventh upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 3.5
            title: Breakout Level 7
          description: >-
            seventh upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakout_level_8
          in: query
          required: false
          schema:
            type: number
            description: >-
              eighth upside level above session 1 high, as a multiple of the
              session 1 range.
            default: 4
            title: Breakout Level 8
          description: >-
            eighth upside level above session 1 high, as a multiple of the
            session 1 range.
        - name: breakdown_level_1
          in: query
          required: false
          schema:
            type: number
            description: >-
              first downside level below session 1 low, expressed as a negative
              multiple of the session 1 range.
            default: -0.5
            title: Breakdown Level 1
          description: >-
            first downside level below session 1 low, expressed as a negative
            multiple of the session 1 range.
        - name: breakdown_level_2
          in: query
          required: false
          schema:
            type: number
            description: >-
              second downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -1
            title: Breakdown Level 2
          description: >-
            second downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: breakdown_level_3
          in: query
          required: false
          schema:
            type: number
            description: >-
              third downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -1.5
            title: Breakdown Level 3
          description: >-
            third downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: breakdown_level_4
          in: query
          required: false
          schema:
            type: number
            description: >-
              fourth downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -2
            title: Breakdown Level 4
          description: >-
            fourth downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: breakdown_level_5
          in: query
          required: false
          schema:
            type: number
            description: >-
              fifth downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -2.5
            title: Breakdown Level 5
          description: >-
            fifth downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: breakdown_level_6
          in: query
          required: false
          schema:
            type: number
            description: >-
              sixth downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -3
            title: Breakdown Level 6
          description: >-
            sixth downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: breakdown_level_7
          in: query
          required: false
          schema:
            type: number
            description: >-
              seventh downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -3.5
            title: Breakdown Level 7
          description: >-
            seventh downside level below session 1 low, as a negative multiple
            of the session 1 range.
        - name: breakdown_level_8
          in: query
          required: false
          schema:
            type: number
            description: >-
              eighth downside level below session 1 low, as a negative multiple
              of the session 1 range.
            default: -4
            title: Breakdown Level 8
          description: >-
            eighth downside level below session 1 low, as a negative multiple of
            the session 1 range.
        - name: days_to_use
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: >-
              weekday filter limiting the calculation to specific sessions
              (e.g., `['Monday', 'Friday']`). when omitted, all weekdays are
              included.
            title: Days To Use
          description: >-
            weekday filter limiting the calculation to specific sessions (e.g.,
            `['Monday', 'Friday']`). when omitted, all weekdays are included.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>' \
              --header 'Authorization: Bearer <api-key>'
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>"

            headers = {"Authorization": "Bearer <api-key>"}


            response = requests.get(url, headers=headers)

            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const url =
            "https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>";

            const options = {
              method: "GET",
              headers: { Authorization: "Bearer <api-key>" },
            };


            const response = await fetch(url, options);

            const data = await response.json();

            console.log(data);
        - lang: php
          label: PHP
          source: >-
            <?php

            $ch =
            curl_init("https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>");

            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

            curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer
            <api-key>"]);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($ch);

            curl_close($ch);

            echo $response;
        - lang: go
          label: Go
          source: |-
            package main

            import (
                "fmt"
                "io"
                "net/http"
            )

            func main() {
                req, _ := http.NewRequest("GET", "https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>", nil)
                req.Header.Set("Authorization", "Bearer <api-key>")
                resp, _ := http.DefaultClient.Do(req)
                defer resp.Body.Close()
                body, _ := io.ReadAll(resp.Body)
                fmt.Println(string(body))
            }
        - lang: java
          label: Java
          source: >-
            import java.net.URI;

            import java.net.http.HttpClient;

            import java.net.http.HttpRequest;

            import java.net.http.HttpResponse;


            HttpClient client = HttpClient.newHttpClient();

            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>"))
                .header("Authorization", "Bearer <api-key>")
                .method("GET", HttpRequest.BodyPublishers.noBody())
                .build();
            HttpResponse<String> response = client.send(request,
            HttpResponse.BodyHandlers.ofString());

            System.out.println(response.body());
        - lang: ruby
          label: Ruby
          source: >-
            require "net/http"

            require "uri"


            uri =
            URI("https://api.edgeful.com/report_calculation/market-session-breakout-by-levels/<market_type>/<ticker>?start_date=<start_date>&end_date=<end_date>")

            request = Net::HTTP::Get.new(uri)

            request["Authorization"] = "Bearer <api-key>"


            response = Net::HTTP.start(uri.hostname, uri.port, use_ssl:
            uri.scheme == "https") do |http|
              http.request(request)
            end

            puts response.body
components:
  schemas:
    MarketTypeEnum:
      type: string
      enum:
        - forex
        - futures
        - crypto
        - stock
      title: MarketTypeEnum
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Use your Edgeful API key as the bearer token. In the API Reference
        authorization drawer, paste only the key (for example,
        `ef_live_<random>`).

````