basePath: /
definitions:
  models.AlertDelivery:
    properties:
      alert_id:
        type: string
      channel:
        type: string
      duration_ms:
        type: integer
      error:
        type: string
      event:
        $ref: '#/definitions/models.AlertEvent'
      fired_at:
        type: string
      id:
        type: integer
      status:
        enum:
        - delivered
        - failed
        - recorded
        type: string
      symbol:
        type: string
      trigger_type:
        type: string
    type: object
  models.AlertEvent:
    properties:
      alert_id:
        type: string
      compare_metric:
        type: string
      condition:
        type: string
      fired_at:
        type: string
      message:
        type: string
      metric:
        type: string
      observed_value:
        type: number
      symbol:
        type: string
      threshold:
        type: number
      tick_timestamp:
        type: string
      trigger_type:
        type: string
    type: object
  models.AlertEventsResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.AlertDelivery'
        type: array
      next_cursor:
        type: string
    type: object
  models.AlertListResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.AlertTrigger'
        type: array
      quota:
        $ref: '#/definitions/models.AlertQuota'
    type: object
  models.AlertQuota:
    properties:
      limit:
        description: 0 means unlimited
        type: integer
      used:
        type: integer
    type: object
  models.AlertTrigger:
    properties:
      active:
        type: boolean
      category:
        type: string
      channel:
        type: string
      compare_metric:
        type: string
      condition:
        type: string
      cooldown_minutes:
        type: integer
      created_at:
        type: string
      event:
        type: string
      id:
        type: string
      last_fired_at:
        type: string
      metric:
        type: string
      notice_hours_before:
        type: integer
      sentiment:
        type: string
      signing_secret:
        description: |-
          SigningSecret signs webhook deliveries (X-ApexTick-Signature). It is
          returned once, in the create response, and never listed afterwards.
        type: string
      symbol:
        type: string
      target:
        type: string
      threshold:
        type: number
      trigger_type:
        type: string
    type: object
  models.Candle:
    properties:
      close:
        type: number
      high:
        type: number
      low:
        type: number
      open:
        type: number
      time:
        type: string
      volume:
        type: integer
    type: object
  models.CandlesResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Candle'
        type: array
      resolution:
        type: string
      symbol:
        type: string
    type: object
  models.CreateAlertRequest:
    properties:
      category:
        enum:
        - earnings
        - macro
        - mergers
        - regulatory
        - technical_breakout
        example: regulatory
        type: string
      channel:
        enum:
        - email
        - webhook
        - telegram
        - discord
        - slack
        - rest
        example: telegram
        type: string
      compare_metric:
        example: sma50
        type: string
      condition:
        enum:
        - gt
        - lt
        - gte
        - lte
        - crosses_above
        - crosses_below
        example: crosses_below
        type: string
      cooldown_minutes:
        example: 60
        type: integer
      event:
        enum:
        - earnings
        - dividend
        - split
        example: earnings
        type: string
      metric:
        example: rsi14
        type: string
      notice_hours_before:
        example: 24
        type: integer
      sentiment:
        enum:
        - bullish
        - bearish
        - neutral
        example: bearish
        type: string
      symbol:
        example: AAPL
        type: string
      target:
        example: '@my_trading_channel'
        type: string
      threshold:
        example: 30
        type: number
      trigger_type:
        enum:
        - price
        - technical
        - volume
        - news
        - calendar
        example: technical
        type: string
    type: object
  models.CreateDigestRequest:
    properties:
      accent_color:
        description: Custom layout (plans with digest_custom_layout).
        example: '#1F8B4C'
        type: string
      brand_name:
        description: White-label (community digests).
        example: Alpha Traders
        type: string
      channel:
        enum:
        - email
        - webhook
        - telegram
        - discord
        - slack
        example: discord
        type: string
      footer:
        example: Not investment advice.
        type: string
      kind:
        enum:
        - watchlist
        - community
        example: community
        type: string
      name:
        example: Morning desk
        type: string
      schedules:
        example:
        - premarket
        - close
        items:
          enum:
          - premarket
          - close
          type: string
        type: array
      sections:
        items:
          enum:
          - movers
          - sectors
          - watchlist
          type: string
        type: array
      symbols:
        example:
        - AAPL
        - MSFT
        - NVDA
        items:
          type: string
        type: array
      target:
        example: https://discord.com/api/webhooks/...
        type: string
    type: object
  models.Digest:
    properties:
      accent_color:
        type: string
      active:
        type: boolean
      brand_name:
        type: string
      channel:
        type: string
      created_at:
        type: string
      footer:
        type: string
      id:
        type: string
      kind:
        type: string
      last_error:
        type: string
      last_sent_at:
        type: string
      last_status:
        enum:
        - delivered
        - failed
        type: string
      name:
        type: string
      schedules:
        items:
          type: string
        type: array
      sections:
        items:
          type: string
        type: array
      signing_secret:
        description: webhook; returned once on create
        type: string
      symbols:
        items:
          type: string
        type: array
      target:
        type: string
    type: object
  models.DigestContent:
    properties:
      brand:
        type: string
      digest_id:
        type: string
      footer:
        type: string
      generated_at:
        type: string
      kind:
        type: string
      markdown:
        type: string
      sections:
        items:
          $ref: '#/definitions/models.DigestSection'
        type: array
      slot:
        type: string
      title:
        type: string
      type:
        description: always "digest"
        type: string
    type: object
  models.DigestListResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Digest'
        type: array
      quota:
        properties:
          community:
            $ref: '#/definitions/models.DigestQuotaEntry'
          watchlist:
            $ref: '#/definitions/models.DigestQuotaEntry'
        type: object
    type: object
  models.DigestQuotaEntry:
    properties:
      included:
        type: boolean
      limit:
        type: integer
      used:
        type: integer
    type: object
  models.DigestSection:
    properties:
      columns:
        items:
          type: string
        type: array
      heading:
        type: string
      note:
        type: string
      rows:
        items:
          items:
            type: string
          type: array
        type: array
    type: object
  models.Dividend:
    properties:
      cash_amount:
        type: number
      ex_dividend_date:
        type: string
    type: object
  models.DividendsResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Dividend'
        type: array
      symbol:
        type: string
    type: object
  models.ETFHolding:
    properties:
      name:
        type: string
      percent:
        type: number
      shares:
        type: integer
      symbol:
        type: string
    type: object
  models.ETFProfileResponse:
    properties:
      asset_class:
        type: string
      aum:
        type: number
      holdings:
        items:
          $ref: '#/definitions/models.ETFHolding'
        type: array
      name:
        type: string
      symbol:
        type: string
    type: object
  models.EarningEvent:
    properties:
      actual:
        type: number
      estimate:
        type: number
      period:
        type: string
    type: object
  models.EarningsResponse:
    properties:
      earnings:
        items:
          $ref: '#/definitions/models.EarningEvent'
        type: array
      symbol:
        type: string
    type: object
  models.EconomicCatalogItem:
    properties:
      commodity:
        type: string
      frequency:
        type: string
      metric:
        type: string
      name:
        type: string
      region:
        type: string
      series_id:
        type: string
      unit:
        type: string
    type: object
  models.EconomicCatalogResponse:
    properties:
      catalog:
        items:
          $ref: '#/definitions/models.EconomicCatalogItem'
        type: array
    type: object
  models.EconomicDataPoint:
    properties:
      date:
        type: string
      value:
        type: number
    type: object
  models.EconomicDataResponse:
    properties:
      commodity:
        type: string
      data:
        items:
          $ref: '#/definitions/models.EconomicDataPoint'
        type: array
      frequency:
        type: string
      metric:
        type: string
      name:
        type: string
      region:
        type: string
      series_id:
        type: string
      unit:
        type: string
    type: object
  models.FinancialMetricsResponse:
    properties:
      dividend_yield:
        type: number
      eps_ttm:
        type: number
      market_cap:
        type: integer
      pe_ratio:
        type: number
      price_to_book:
        type: number
      roe:
        type: number
      shares_outstanding:
        type: integer
      symbol:
        type: string
    type: object
  models.Greeks:
    properties:
      delta:
        type: number
      gamma:
        type: number
      rho:
        type: number
      theta:
        type: number
      vega:
        type: number
    type: object
  models.IndicatorsResponse:
    properties:
      indicators:
        additionalProperties:
          format: float64
          type: number
        type: object
      symbol:
        type: string
    type: object
  models.MarketMover:
    properties:
      change:
        type: number
      change_percent:
        type: number
      name:
        type: string
      price:
        type: number
      symbol:
        type: string
      volume:
        type: integer
    type: object
  models.MarketMoversResponse:
    properties:
      asset_class:
        type: string
      data:
        items:
          $ref: '#/definitions/models.MarketMover'
        type: array
      direction:
        type: string
    type: object
  models.OptionContract:
    properties:
      ask:
        type: number
      ask_size:
        type: integer
      bid:
        type: number
      bid_size:
        type: integer
      greeks:
        $ref: '#/definitions/models.Greeks'
      implied_volatility:
        type: number
      occ_symbol:
        type: string
      open_interest:
        type: integer
      strike:
        type: number
      type:
        type: string
      volume:
        type: integer
    type: object
  models.OptionsChainResponse:
    properties:
      expiration_date:
        type: string
      options:
        items:
          $ref: '#/definitions/models.OptionContract'
        type: array
      underlying_symbol:
        type: string
    type: object
  models.OptionsScreenerResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.ScreenerResult'
        type: array
    type: object
  models.ProfileResponse:
    properties:
      ceo:
        type: string
      company_name:
        type: string
      description:
        type: string
      earnings_recent:
        type: number
      eps_annual:
        type: number
      eps_growth_pct:
        type: number
      exchange:
        type: string
      hq_address:
        type: string
      industry:
        type: string
      pe_ratio:
        type: number
      sector:
        type: string
      symbol:
        type: string
      website:
        type: string
    type: object
  models.Quote:
    properties:
      change:
        type: number
      change_percent:
        type: number
      high:
        type: number
      low:
        type: number
      open:
        type: number
      previous_close:
        type: number
      price:
        type: number
      symbol:
        type: string
      timestamp:
        type: string
      volume:
        type: integer
    type: object
  models.QuoteResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Quote'
        type: array
    type: object
  models.ScreenerResult:
    properties:
      ask:
        type: number
      bid:
        type: number
      expiration_date:
        type: string
      greeks:
        $ref: '#/definitions/models.Greeks'
      implied_volatility:
        type: number
      last_price:
        type: number
      occ_symbol:
        type: string
      open_interest:
        type: integer
      strike:
        type: number
      type:
        type: string
      underlying_symbol:
        type: string
      volume:
        type: integer
      volume_oi_ratio:
        type: number
    type: object
  models.Split:
    properties:
      execution_date:
        type: string
      split_from:
        type: number
      split_to:
        type: number
    type: object
  models.SplitsResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Split'
        type: array
      symbol:
        type: string
    type: object
  models.Ticker:
    properties:
      asset_class:
        type: string
      exchange:
        type: string
      name:
        type: string
      symbol:
        type: string
    type: object
  models.TickerSearchResponse:
    properties:
      data:
        items:
          $ref: '#/definitions/models.Ticker'
        type: array
    type: object
host: api.apextick.com
info:
  contact: {}
  description: High-performance, institutional-grade market data API.
  title: ApexTick Market Data API
  version: "1.0"
paths:
  /v1/alerts:
    get:
      description: Lists the consumer's active alert triggers together with plan quota
        usage.
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.AlertListResponse'
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Alerts service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'List active alert triggers [Tier: Hobbyist+]'
      tags:
      - Alerts
    post:
      consumes:
      - application/json
      description: |-
        Creates a price, technical, news or calendar alert trigger. Price and technical triggers are evaluated on every live tick against a fixed `threshold` or another indicator (`compare_metric`, e.g. `sma20` `crosses_above` `sma50`). Level conditions (`gt`, `lt`, `gte`, `lte`) re-fire while true at most once per cooldown; crossing conditions (`crosses_above`, `crosses_below`) fire once per cross. News and calendar triggers are stored and activate once their event feeds are available.
        Channels: Hobbyist includes `email`; Pro and above include `email`, `webhook`, `telegram`, `discord`, `slack` and `rest`.
        Webhook deliveries POST the alert event as JSON and are signed: the `X-ApexTick-Signature` header is `t=<unix>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with signing_secret>`. The `signing_secret` is returned only in this response.
      parameters:
      - description: Alert trigger definition
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/models.CreateAlertRequest'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/models.AlertTrigger'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Active alert limit reached (body includes the plan's limit),
            or channel not included in current plan
          schema:
            additionalProperties: true
            type: object
        "404":
          description: Symbol not found
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Alerts service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Create an alert trigger [Tier: Hobbyist (3 active, email), Pro (50),
        Quant (250), Enterprise (unlimited)]'
      tags:
      - Alerts
  /v1/alerts/{id}:
    delete:
      description: Deactivates one of the consumer's alert triggers and frees its
        quota slot.
      parameters:
      - description: Alert ID (UUID)
        in: path
        name: id
        required: true
        type: string
      responses:
        "204":
          description: Deactivated
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Alert not found
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Alerts service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Deactivate an alert trigger [Tier: Hobbyist+]'
      tags:
      - Alerts
  /v1/alerts/events:
    get:
      description: Lists the consumer's fired alerts, newest first, with delivery
        status (delivered, failed, or recorded for the rest channel) and the full
        event payload. Use alert_id to filter and next_cursor as before to page. History
        is retained for 90 days. Alerts on the rest channel are only delivered here.
      parameters:
      - description: Only events of this alert (UUID)
        in: query
        name: alert_id
        type: string
      - description: 'Cursor: return events older than this event id (next_cursor
          of the previous page)'
        in: query
        name: before
        type: integer
      - description: Page size (default 50, max 200)
        in: query
        name: limit
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.AlertEventsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Alerts service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Alert delivery history [Tier: Hobbyist+]'
      tags:
      - Alerts
  /v1/alternative/economic/catalog:
    get:
      consumes:
      - application/json
      description: Retrieves the pre-curated catalog of available economic indicators
        and commodity statistics.
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.EconomicCatalogResponse'
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal Server Error
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get economic data catalog [Tier: Enterprise]'
      tags:
      - Alternative Data
  /v1/alternative/economic/series:
    get:
      consumes:
      - application/json
      description: Retrieves historical economic indicators and commodity statistics.
      parameters:
      - description: Series ID (e.g., ECO.USDA.CORN.PROD.US.A)
        in: query
        name: series_id
        required: true
        type: string
      - description: Start date (YYYY-MM-DD)
        in: query
        name: from
        type: string
      - description: End date (YYYY-MM-DD)
        in: query
        name: to
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.EconomicDataResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get economic data series [Tier: Enterprise]'
      tags:
      - Alternative Data
  /v1/analytics/indicators:
    get:
      consumes:
      - application/json
      description: Retrieves pre-calculated quantitative indicators for a given symbol.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      - description: 'Comma-separated list of indicators. Available: sma20, sma50,
          sma200, rsi14, macd14, atr14, stoch_k14, volatility30, macd, macd_signal,
          macd_hist (MACD 12/26/9 on daily closes), avg_volume20 (20-session average
          volume)'
        in: query
        name: indicators
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.IndicatorsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Get quantitative analytics indicators [Tier: Pro+]'
      tags:
      - Analytics
  /v1/digests:
    get:
      description: Lists the consumer's active digests with last delivery status and
        per-kind quota usage.
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.DigestListResponse'
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Digests service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'List scheduled digests [Tier: Hobbyist+]'
      tags:
      - Digests
    post:
      consumes:
      - application/json
      description: |-
        Schedules a digest delivered on NYSE trading days (weekends and full-day market holidays are skipped) at 08:30 ET (premarket) and/or 16:30 ET (close). kind=watchlist summarizes up to 20 symbols. kind=community is a white-label briefing (top gainers/losers/most active, sector performance at the close, optional watchlist) branded with brand_name; Enterprise may also set accent_color, footer and sections.
        Channels follow the plan's alert channels (Hobbyist: email). Discord receives embeds, Telegram HTML, Slack mrkdwn, email HTML + text, and webhooks a signed JSON payload (models.DigestContent) with the X-ApexTick-Signature header; the signing_secret is returned only in this response.
      parameters:
      - description: Digest definition
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/models.CreateDigestRequest'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/models.Digest'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Digest limit reached (includes limit), or kind/channel/custom
            layout not included in current plan
          schema:
            additionalProperties: true
            type: object
        "404":
          description: Symbol not found
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Digests service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Create a scheduled digest [Tier: watchlist Hobbyist+ (1/5/20/unlimited);
        community Quant (1), Enterprise (unlimited)]'
      tags:
      - Digests
  /v1/digests/{id}:
    delete:
      description: Stops a digest and frees its quota slot.
      parameters:
      - description: Digest ID (UUID)
        in: path
        name: id
        required: true
        type: string
      responses:
        "204":
          description: Deleted
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Digest not found
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Digests service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Delete a scheduled digest [Tier: Hobbyist+]'
      tags:
      - Digests
  /v1/digests/{id}/preview:
    get:
      description: 'Builds the digest from current data without sending it: structured
        sections plus Markdown (the same document webhooks receive).'
      parameters:
      - description: Digest ID (UUID)
        in: path
        name: id
        required: true
        type: string
      - description: 'premarket or close (default: close after 12:00 ET, else premarket)'
        in: query
        name: slot
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.DigestContent'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Digest not found
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Digests service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Preview a digest [Tier: Hobbyist+]'
      tags:
      - Digests
  /v1/digests/{id}/test:
    post:
      description: Builds and delivers the digest immediately (title prefixed with
        "[Test]") to verify the channel setup. Limited to one test send every 5 minutes
        per digest.
      parameters:
      - description: Digest ID (UUID)
        in: path
        name: id
        required: true
        type: string
      - description: premarket or close (default by time of day)
        in: query
        name: slot
        type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            additionalProperties:
              type: string
            type: object
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Digest not found
          schema:
            additionalProperties:
              type: string
            type: object
        "429":
          description: Test send throttled
          schema:
            additionalProperties:
              type: string
            type: object
        "502":
          description: Delivery failed
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Digests service unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Send a test digest now [Tier: Hobbyist+]'
      tags:
      - Digests
  /v1/etfs/profile:
    get:
      consumes:
      - application/json
      description: Retrieves ETF details and its constituents.
      parameters:
      - description: Standard Market Ticker (e.g., SPY)
        in: query
        name: symbol
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.ETFProfileResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get ETF profile and holdings [Tier: Pro+]'
      tags:
      - Premium Data
  /v1/market/candles:
    get:
      consumes:
      - application/json
      description: 'Retrieves historical OHLCV data for equities, crypto, forex, and
        options. The requested range is truncated to the plan''s depth: Hobbyist 1
        year daily / 30 days intraday, Trader Pro 5 years daily / 90 days intraday,
        Quant & Community and Enterprise unlimited (15+ years).'
      parameters:
      - description: Standard Market Ticker (e.g., AAPL, BTC-USD)
        in: query
        name: symbol
        required: true
        type: string
      - description: Timeframe (1m, 5m, 1d, etc.)
        in: query
        name: resolution
        required: true
        type: string
      - description: Start date (YYYY-MM-DD)
        in: query
        name: from
        type: string
      - description: End date (YYYY-MM-DD)
        in: query
        name: to
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.CandlesResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Get historical candles [Tier: Hobbyist (1y daily / 30d intraday),
        Pro (5y daily / 90d intraday), Quant+ (unlimited)]'
      tags:
      - Market Data
  /v1/market/movers:
    get:
      consumes:
      - application/json
      description: Retrieves top gainers, losers, and most active instruments.
      parameters:
      - default: eq
        description: Instrument type (eq, etf, fx)
        in: query
        name: instrument
        type: string
      - default: up
        description: Trend direction (up, down, volume)
        in: query
        name: trend
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.MarketMoversResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get market movers [Tier: Hobbyist+]'
      tags:
      - Market Data
  /v1/market/quote:
    get:
      consumes:
      - application/json
      description: 'Retrieves consolidated market snapshots for active trading dashboards.
        Snapshot freshness is plan-based: up to 15s (Hobbyist), 5s (Pro) or 1s (Quant
        & Enterprise).'
      parameters:
      - description: Comma-separated Standard Market Tickers (e.g., AAPL,GOOG)
        in: query
        name: symbol
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.QuoteResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      - ApiKeyAuth: []
      summary: 'Get active intraday quotes [Tier: Hobbyist+]'
      tags:
      - Market Data
  /v1/options/chain:
    get:
      consumes:
      - application/json
      description: Retrieves the options chain for a given underlying symbol.
      parameters:
      - description: Underlying Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      - description: Expiration date (YYYY-MM-DD)
        in: query
        name: expiry
        type: string
      - description: Option contract (c or p)
        in: query
        name: contract
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.OptionsChainResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get options chain [Tier: Quant+]'
      tags:
      - Premium Data
  /v1/options/screener:
    get:
      consumes:
      - application/json
      description: Screens for specific equity and ETF option strikes.
      parameters:
      - default: all
        description: Option contract (c, p, all)
        in: query
        name: contract
        type: string
      - description: Minimum volume
        in: query
        name: vol_min
        type: integer
      - description: Minimum open interest
        in: query
        name: oi_min
        type: integer
      - description: Number of results (default 50, max 500)
        in: query
        name: max_results
        type: integer
      - description: Page number (default 1)
        in: query
        name: offset_page
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.OptionsScreenerResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Options screener [Tier: Quant+]'
      tags:
      - Premium Data
  /v1/reference/dividends:
    get:
      consumes:
      - application/json
      description: Retrieves historical dividend events for a given symbol.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      - description: Start date (YYYY-MM-DD)
        in: query
        name: from
        type: string
      - description: End date (YYYY-MM-DD)
        in: query
        name: to
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.DividendsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get historical dividends [Tier: Pro+]'
      tags:
      - Reference Data
  /v1/reference/earnings:
    get:
      consumes:
      - application/json
      description: Retrieves historical earnings and future estimates for a given
        symbol.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.EarningsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get earnings events [Tier: Pro+]'
      tags:
      - Reference Data
  /v1/reference/financials/metrics:
    get:
      consumes:
      - application/json
      description: Retrieves key financial highlights and ratios for a given symbol.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.FinancialMetricsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get financial metrics [Tier: Pro+]'
      tags:
      - Reference Data
  /v1/reference/profile:
    get:
      consumes:
      - application/json
      description: Retrieves basic company information and descriptions.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.ProfileResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get company profile [Tier: Pro+]'
      tags:
      - Reference Data
  /v1/reference/splits:
    get:
      consumes:
      - application/json
      description: Retrieves historical stock split events for a given symbol.
      parameters:
      - description: Standard Market Ticker (e.g., AAPL)
        in: query
        name: symbol
        required: true
        type: string
      - description: Start date (YYYY-MM-DD)
        in: query
        name: from
        type: string
      - description: End date (YYYY-MM-DD)
        in: query
        name: to
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.SplitsResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Get historical stock splits [Tier: Pro+]'
      tags:
      - Reference Data
  /v1/reference/tickers:
    get:
      consumes:
      - application/json
      description: Search the catalog of supported instruments by symbol or name.
        Advanced filters are gated by plan.
      parameters:
      - description: Search query (e.g., AAPL or Apple)
        in: query
        name: query
        required: true
        type: string
      - description: Filter by asset class (Pro+ only)
        in: query
        name: asset_class
        type: string
      - description: Filter by exchange code (Pro+ only)
        in: query
        name: exchange
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/models.TickerSearchResponse'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden (Advanced filters require a Pro, Quant or Enterprise
            plan)
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - GatewayAuth: []
      summary: 'Search supported tickers [Tier: Hobbyist (Basic), Pro+]'
      tags:
      - Reference Data
securityDefinitions:
  ApiKeyAuth:
    description: API Key Authentication
    in: header
    name: apikey
    type: apiKey
swagger: "2.0"
tags:
- description: Core active pricing and historical data.
  name: Market Data
- description: Fundamentals, corporate actions, and ticker search.
  name: Reference Data
- description: Quantitative technical indicators.
  name: Analytics
- description: Options chains, screeners, and ETF profiles.
  name: Premium Data
- description: Macroeconomic and agricultural data.
  name: Alternative Data
- description: Price, technical, volume, news and calendar alert triggers delivered
    by email, signed webhook, Telegram, Discord, Slack or the REST event history.
  name: Alerts
- description: Scheduled watchlist digests and white-label community briefings (08:30
    and 16:30 ET).
  name: Digests
