level2 · Capability

Level2 Strategy Builder API

The Level2 Strategy Builder API provides programmatic access to market data, technical analysis, and trading strategy capabilities offered by the Level2 platform (by Bytemine Technologies Ltd.). It includes endpoints for retrieving candlestick pattern detection, ticker trend analysis, historical OHLC (Open-High-Low-Close) data, similar stock discovery, and company fundamental summaries. These endpoints power the Level2 visual no-code strategy builder used by over 50,000 traders to create, backtest, and deploy automated trading strategies without writing code.

Run with Naftiko Level2API

What You Can Do

GET
Checkforcandlestick — Check for candlestick patterns
/checkForCandlestick/{api_key}/{ticker}/{timeframe}
GET
Gettickertrend — Get ticker trend analysis
/getTickerTrend/{api_key}/{ticker}/{timeframe}
GET
Getohlcdata — Get OHLC historical data
/olhc/{api_key}/{ticker}/{timeframe}/{range}
GET
Getsimilarstocks — Get similar stocks
/similar/{api_key}/{ticker}
GET
Getcompanysummary — Get company summary
/summary/{api_key}/{ticker}

MCP Tools

checkforcandlestick

Check for candlestick patterns

read-only idempotent
gettickertrend

Get ticker trend analysis

read-only idempotent
getohlcdata

Get OHLC historical data

read-only idempotent
getsimilarstocks

Get similar stocks

read-only idempotent
getcompanysummary

Get company summary

read-only idempotent

Capability Spec

level2-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Level2 Strategy Builder API
  description: The Level2 Strategy Builder API provides programmatic access to market data, technical analysis, and trading
    strategy capabilities offered by the Level2 platform (by Bytemine Technologies Ltd.). It includes endpoints for retrieving
    candlestick pattern detection, ticker trend analysis, historical OHLC (Open-High-Low-Close) data, similar stock discovery,
    and company fundamental summaries. These endpoints power the Level2 visual no-code strategy builder used by over 50,000
    traders to create, backtest, and deploy automated trading strategies without writing code.
  tags:
  - Level2
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: level2
    baseUri: https://app.bytemine.io/api
    description: Level2 Strategy Builder API HTTP API.
    authentication:
      type: apikey
      in: query
      name: api_key
      value: '{{LEVEL2_TOKEN}}'
    resources:
    - name: checkforcandlestick-api-key-ticker-timeframe
      path: /checkForCandlestick/{api_key}/{ticker}/{timeframe}
      operations:
      - name: checkforcandlestick
        method: GET
        description: Check for candlestick patterns
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: gettickertrend-api-key-ticker-timeframe
      path: /getTickerTrend/{api_key}/{ticker}/{timeframe}
      operations:
      - name: gettickertrend
        method: GET
        description: Get ticker trend analysis
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: olhc-api-key-ticker-timeframe-range
      path: /olhc/{api_key}/{ticker}/{timeframe}/{range}
      operations:
      - name: getohlcdata
        method: GET
        description: Get OHLC historical data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: similar-api-key-ticker
      path: /similar/{api_key}/{ticker}
      operations:
      - name: getsimilarstocks
        method: GET
        description: Get similar stocks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: summary-api-key-ticker
      path: /summary/{api_key}/{ticker}
      operations:
      - name: getcompanysummary
        method: GET
        description: Get company summary
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: level2-rest
    description: REST adapter for Level2 Strategy Builder API.
    resources:
    - path: /checkForCandlestick/{api_key}/{ticker}/{timeframe}
      name: checkforcandlestick
      operations:
      - method: GET
        name: checkforcandlestick
        description: Check for candlestick patterns
        call: level2.checkforcandlestick
        outputParameters:
        - type: object
          mapping: $.
    - path: /getTickerTrend/{api_key}/{ticker}/{timeframe}
      name: gettickertrend
      operations:
      - method: GET
        name: gettickertrend
        description: Get ticker trend analysis
        call: level2.gettickertrend
        outputParameters:
        - type: object
          mapping: $.
    - path: /olhc/{api_key}/{ticker}/{timeframe}/{range}
      name: getohlcdata
      operations:
      - method: GET
        name: getohlcdata
        description: Get OHLC historical data
        call: level2.getohlcdata
        outputParameters:
        - type: object
          mapping: $.
    - path: /similar/{api_key}/{ticker}
      name: getsimilarstocks
      operations:
      - method: GET
        name: getsimilarstocks
        description: Get similar stocks
        call: level2.getsimilarstocks
        outputParameters:
        - type: object
          mapping: $.
    - path: /summary/{api_key}/{ticker}
      name: getcompanysummary
      operations:
      - method: GET
        name: getcompanysummary
        description: Get company summary
        call: level2.getcompanysummary
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: level2-mcp
    transport: http
    description: MCP adapter for Level2 Strategy Builder API for AI agent use.
    tools:
    - name: checkforcandlestick
      description: Check for candlestick patterns
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: level2.checkforcandlestick
      outputParameters:
      - type: object
        mapping: $.
    - name: gettickertrend
      description: Get ticker trend analysis
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: level2.gettickertrend
      outputParameters:
      - type: object
        mapping: $.
    - name: getohlcdata
      description: Get OHLC historical data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: level2.getohlcdata
      outputParameters:
      - type: object
        mapping: $.
    - name: getsimilarstocks
      description: Get similar stocks
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: level2.getsimilarstocks
      outputParameters:
      - type: object
        mapping: $.
    - name: getcompanysummary
      description: Get company summary
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: level2.getcompanysummary
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    LEVEL2_TOKEN: LEVEL2_TOKEN