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

# Get subscriptions

> Fetch all subscriptions for the authenticated user. If a watchlistId is provided, only subscriptions for that specific watchlist are returned.




## OpenAPI

````yaml openapi.json get /subscriptions/{watchlistId}
openapi: 3.0.0
info:
  title: Nevua Markets API
  version: 0.0.1
  license:
    name: ISC
    url: https://opensource.org/licenses/ISC
servers:
  - url: https://api.nevua.markets
    description: Production
security: []
tags: []
paths:
  /subscriptions/{watchlistId}:
    get:
      tags:
        - Alerts
      summary: Get subscriptions
      description: >
        Fetch all subscriptions for the authenticated user. If a watchlistId is
        provided, only subscriptions for that specific watchlist are returned.
      operationId: getSubscriptions
      parameters:
        - name: watchlistId
          in: path
          required: false
          schema:
            type: string
          description: >-
            Optional watchlist ID to filter subscriptions. If not provided,
            returns all user subscriptions.
      responses:
        '200':
          description: Subscriptions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubscriptionsJSONResponse'
              examples:
                all_subscriptions:
                  summary: All user subscriptions
                  value:
                    subscriptions:
                      - subscriptionId: 507f191e810c19729de860ea
                        watchlistId: 507f191e810c19729de860eb
                        watchlistName: My Watchlist
                        subscriptionScope: Watchlist
                        subscriptionTypeConfig:
                          type: Crossing
                          config:
                            params:
                              threshold_percent: 50
                        createdAt: '2023-01-01T00:00:00Z'
                        expiresAt: null
                        status:
                          enabled: true
                          reason: Created
                        triggerType: Recurring
                        triggerInterval: 30m
                        triggerCount: 0
                        lastTriggeredAt: null
                        channels:
                          - type: Webhook
                            settings:
                              webhookUrl: https://example.com/webhook
                watchlist_specific:
                  summary: Subscriptions for specific watchlist
                  value:
                    subscriptions:
                      - subscriptionId: 507f191e810c19729de860ea
                        watchlistId: 507f191e810c19729de860eb
                        watchlistName: Trading Signals
                        subscriptionScope: Watchlist
                        subscriptionTypeConfig:
                          type: New or closed events and markets
                          config:
                            params: {}
                        createdAt: '2023-01-01T00:00:00Z'
                        expiresAt: null
                        status:
                          enabled: true
                          reason: Created
                        triggerType: Recurring
                        triggerCount: 2
                        lastTriggeredAt: '2023-01-01T12:30:00Z'
                        channels:
                          - type: Webhook
                            settings:
                              webhookUrl: https://example.com/status-webhook
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
        - bearerAuth: []
components:
  schemas:
    GetSubscriptionsJSONResponse:
      type: object
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionResponse'
      additionalProperties: false
      required:
        - subscriptions
    SubscriptionResponse:
      type: object
      properties:
        watchlistId:
          type: string
        watchlistName:
          type: string
        subscriptionId:
          type: string
        eventTitle:
          type: string
        eventId:
          type: string
        marketQuestion:
          type: string
        marketId:
          type: string
        subscriptionScope:
          $ref: '#/components/schemas/SubscriptionScope'
        subscriptionTypeConfig:
          $ref: '#/components/schemas/SubscriptionTypeConfig'
        rule:
          $ref: '#/components/schemas/SubscriptionRuleConfig'
        createdAt:
          type: string
        expiresAt:
          type: string
          nullable: true
        updatedAt:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/SubscriptionStatus'
        triggerType:
          $ref: '#/components/schemas/TriggerType'
        triggerInterval:
          $ref: '#/components/schemas/TriggerInterval'
        triggerCount:
          type: number
        lastTriggeredAt:
          type: string
          nullable: true
        channels:
          type: array
          items:
            $ref: '#/components/schemas/NotificationChannel'
      additionalProperties: false
      required:
        - channels
        - createdAt
        - expiresAt
        - status
        - subscriptionId
        - subscriptionScope
        - subscriptionTypeConfig
        - triggerType
        - watchlistId
        - watchlistName
    SubscriptionScope:
      type: string
      enum:
        - Watchlist
        - Event
        - Market
    SubscriptionTypeConfig:
      anyOf:
        - $ref: '#/components/schemas/CrossingSubscriptionTypeConfig'
        - $ref: '#/components/schemas/CrossingUpSubscriptionTypeConfig'
        - $ref: '#/components/schemas/CrossingDownSubscriptionTypeConfig'
        - $ref: '#/components/schemas/CrossingStepSubscriptionTypeConfig'
        - $ref: '#/components/schemas/GreaterThanSubscriptionTypeConfig'
        - $ref: '#/components/schemas/LessThanSubscriptionTypeConfig'
        - $ref: >-
            #/components/schemas/EventAndMarketOpenStatusChangesSubscriptionTypeConfig
    SubscriptionRuleConfig:
      anyOf:
        - $ref: '#/components/schemas/EventAndMarketStatusChangesRule'
        - $ref: '#/components/schemas/CrossingRule'
        - $ref: '#/components/schemas/CrossingUpRule'
        - $ref: '#/components/schemas/CrossingDownRule'
        - $ref: '#/components/schemas/CrossingStepRule'
        - $ref: '#/components/schemas/GreaterThanRule'
        - $ref: '#/components/schemas/LessThanRule'
    SubscriptionStatus:
      type: object
      properties:
        enabled:
          type: boolean
        reason:
          $ref: '#/components/schemas/SubscriptionStatusReason'
      additionalProperties: false
      required:
        - enabled
        - reason
    TriggerType:
      type: string
      enum:
        - One Time
        - Recurring
    TriggerInterval:
      enum:
        - 0m
        - 12h
        - 24h
        - 30m
        - 5m
        - 60m
        - 6h
      type: string
    NotificationChannel:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NotificationChannelType'
        settings:
          type: object
          properties:
            telegramChatId:
              type: number
            webhookUrl:
              type: string
            discordWebhookUrl:
              type: string
          additionalProperties: false
        status:
          enum:
            - BLOCKED_BY_USER
            - FAILED
            - PENDING
            - READ
            - SENT
          type: string
      additionalProperties: false
      required:
        - type
    CrossingSubscriptionTypeConfig:
      description: >-
        A 'Crossing' subscription will fire an alert if the price crosses the
        specified threshold in either direction (up or down).
      title: Crossing
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING'
        config:
          $ref: '#/components/schemas/SubscriptionConfig'
      additionalProperties: false
      required:
        - config
        - type
    CrossingUpSubscriptionTypeConfig:
      description: >-
        A 'Crossing Up' subscription will fire an alert if the price crosses the
        specified threshold upward.
      title: Crossing Up
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_UP'
        config:
          $ref: '#/components/schemas/SubscriptionConfig_1'
      additionalProperties: false
      required:
        - config
        - type
    CrossingDownSubscriptionTypeConfig:
      description: >-
        A 'Crossing Down' subscription will fire an alert if the price crosses
        the specified threshold downward.
      title: Crossing Down
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_DOWN'
        config:
          $ref: '#/components/schemas/SubscriptionConfig_2'
      additionalProperties: false
      required:
        - config
        - type
    CrossingStepSubscriptionTypeConfig:
      description: >-
        A 'Crossing Step' subscription will fire an alert whenever the price
        crosses set step thresholds. For instance, with a 10% step, you'll get
        alerts at 10%, 20%, 30%, 40%, and so on, for both up and down movements.
      title: Crossing Step
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_STEP'
        config:
          $ref: '#/components/schemas/SubscriptionConfig_3'
      additionalProperties: false
      required:
        - config
        - type
    GreaterThanSubscriptionTypeConfig:
      description: >-
        A 'Greater Than' subscription will fire an alert if the price is greater
        than the specified threshold.
      title: Greater Than
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.GREATER_THAN'
        config:
          $ref: '#/components/schemas/SubscriptionConfig_4'
      additionalProperties: false
      required:
        - config
        - type
    LessThanSubscriptionTypeConfig:
      description: >-
        A 'Less Than' subscription will fire an alert if the price is less than
        the specified threshold.
      title: Less Than
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.LESS_THAN'
        config:
          $ref: '#/components/schemas/SubscriptionConfig_5'
      additionalProperties: false
      required:
        - config
        - type
    EventAndMarketOpenStatusChangesSubscriptionTypeConfig:
      description: >-
        A 'New or closed events and markets' subscription will fire an alert
        when new events and markets are created or when existing ones close.
      title: Event and Market Status Changes
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/SubscriptionType.EVENT_AND_MARKET_OPEN_STATUS_CHANGES
        config:
          $ref: '#/components/schemas/SubscriptionConfig_6'
      additionalProperties: false
      required:
        - config
        - type
    EventAndMarketStatusChangesRule:
      description: >-
        A 'New or closed events and markets' rule will fire an alert when new
        events and markets are created or when existing ones close.


        This rule is always **Recurring** and will fire as soon as a
        market/event status change is detected.
      title: Event and Market Status Changes
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/SubscriptionType.EVENT_AND_MARKET_OPEN_STATUS_CHANGES
      additionalProperties: false
      required:
        - type
    CrossingRule:
      description: >-
        A 'Crossing' rule will fire an alert if the price crosses the specified
        threshold in either direction (up or down).
      title: Crossing
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    CrossingUpRule:
      description: >-
        A 'Crossing Up' rule will fire an alert if the price crosses the
        specified threshold upward.
      title: Crossing Up
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_UP'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    CrossingDownRule:
      description: >-
        A 'Crossing Down' rule will fire an alert if the price crosses the
        specified threshold downward.
      title: Crossing Down
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_DOWN'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    CrossingStepRule:
      description: >-
        A 'Crossing Step' rule will fire an alert whenever the price crosses set
        step thresholds. For instance, with a 10% step, you'll get alerts at
        10%, 20%, 30%, 40%, and so on, for both up and down movements.
      title: Crossing Step
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.CROSSING_STEP'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    GreaterThanRule:
      description: >-
        A 'Greater Than' rule will fire an alert if the price is greater than
        the specified threshold.
      title: Greater Than
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.GREATER_THAN'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    LessThanRule:
      description: >-
        A 'Less Than' rule will fire an alert if the price is less than the
        specified threshold.
      title: Less Than
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionType.LESS_THAN'
        params:
          $ref: '#/components/schemas/ThresholdPercentRuleParams'
      additionalProperties: false
      required:
        - params
        - type
    SubscriptionStatusReason:
      type: string
      enum:
        - Created
        - Updated
        - Triggered
        - Paused by user
        - Restarted by user
        - Event closed
        - Market closed
    NotificationChannelType:
      type: string
      enum:
        - In App
        - Webhook
        - Discord
        - Telegram
    SubscriptionType.CROSSING:
      type: string
      enum:
        - Crossing
    SubscriptionConfig:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T'
      additionalProperties: false
      required:
        - params
    SubscriptionType.CROSSING_UP:
      type: string
      enum:
        - Crossing Up
    SubscriptionConfig_1:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_1'
      additionalProperties: false
      required:
        - params
    SubscriptionType.CROSSING_DOWN:
      type: string
      enum:
        - Crossing Down
    SubscriptionConfig_2:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_2'
      additionalProperties: false
      required:
        - params
    SubscriptionType.CROSSING_STEP:
      type: string
      enum:
        - Crossing Step
    SubscriptionConfig_3:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_3'
      additionalProperties: false
      required:
        - params
    SubscriptionType.GREATER_THAN:
      type: string
      enum:
        - Greater Than
    SubscriptionConfig_4:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_4'
      additionalProperties: false
      required:
        - params
    SubscriptionType.LESS_THAN:
      type: string
      enum:
        - Less Than
    SubscriptionConfig_5:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_5'
      additionalProperties: false
      required:
        - params
    SubscriptionType.EVENT_AND_MARKET_OPEN_STATUS_CHANGES:
      type: string
      enum:
        - New or closed events and markets
    SubscriptionConfig_6:
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SubscriptionConfig.T_6'
      additionalProperties: false
      required:
        - params
    ThresholdPercentRuleParams:
      type: object
      properties:
        thresholdPercent:
          type: number
        triggerType:
          $ref: '#/components/schemas/TriggerType'
          description: Controls if the rule will fire once or repeatedly.
        triggerInterval:
          $ref: '#/components/schemas/TriggerInterval'
          description: |-
            Controls how often the rule will fire since the last trigger.

            - For `One Time` rules, this is ignored.
            - For `Recurring` rules, default is 30 minutes.
      additionalProperties: false
      required:
        - thresholdPercent
        - triggerType
    SubscriptionConfig.T:
      $ref: '#/components/schemas/CrossAnyParams'
    SubscriptionConfig.T_1:
      $ref: '#/components/schemas/CrossUpParams'
    SubscriptionConfig.T_2:
      $ref: '#/components/schemas/CrossDownParams'
    SubscriptionConfig.T_3:
      $ref: '#/components/schemas/CrossStepParams'
    SubscriptionConfig.T_4:
      $ref: '#/components/schemas/GreaterThanParams'
    SubscriptionConfig.T_5:
      $ref: '#/components/schemas/LessThanParams'
    SubscriptionConfig.T_6:
      $ref: '#/components/schemas/EmptyParams'
    CrossAnyParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    CrossUpParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    CrossDownParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    CrossStepParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    GreaterThanParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    LessThanParams:
      type: object
      properties:
        threshold_percent:
          type: number
      additionalProperties: false
      required:
        - threshold_percent
    EmptyParams:
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````