# /listTrigger

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /listTrigger:
    get:
      summary: /listTrigger
      deprecated: false
      description: ''
      tags: []
      parameters:
        - name: ownerAddr
          in: query
          description: The owner address of the position; must be a checksum address.
          required: true
          example: ''
          schema:
            type: string
        - name: chainId
          in: query
          description: >-
            The chain id of the network. Must be one of the chains supported by
            Aperture.
          required: true
          example: 1
          schema:
            type: number
        - name: isLimitOrder
          in: query
          description: >-
            If true, only list triggers for limit order fulfillment; otherwise,
            list all triggers except for limit order fulfillment.
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  triggers:
                    type: array
                    items:
                      type: object
                      properties:
                        taskId:
                          type: number
                          minimum: 0
                          description: >-
                            The task id of the trigger in Aperture's automation
                            service.
                        nftId:
                          type: string
                          minLength: 1
                          description: The nonfungible token id of the position.
                        status:
                          type: string
                          enum:
                            - CREATED
                            - STARTED
                            - COMPLETED
                            - INVALID
                            - DELETED
                          description: The status of the trigger.
                        lastFailedMessage:
                          type: string
                          description: >-
                            If populated, the failure message of the last failed
                            trigger.
                        limitOrderInfo:
                          type: object
                          properties:
                            inputTokenAmountAtCreation:
                              type: object
                              properties:
                                address:
                                  type: string
                                  minLength: 1
                                  description: The ERC-20 token contract address.
                                rawAmount:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The raw amount, which is the human-readable
                                    format multiplied by the token decimal.
                              required:
                                - address
                                - rawAmount
                              description: >-
                                The amount of input token at limit order
                                creation.
                              x-apidog-orders:
                                - address
                                - rawAmount
                            outputTokenAmountAtClosure:
                              type: object
                              properties:
                                address:
                                  type: string
                                  minLength: 1
                                  description: The ERC-20 token contract address.
                                rawAmount:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The raw amount, which is the human-readable
                                    format multiplied by the token decimal.
                              required:
                                - address
                                - rawAmount
                              description: >-
                                The calculated amount of output token at limit
                                order closure. Note that the limit order may
                                still be pending fulfillment.
                              x-apidog-orders:
                                - address
                                - rawAmount
                            earnedFeeInputToken:
                              type: string
                              description: >-
                                The amount of fees earned in input token. Only
                                populated after the limit order is fulfilled.
                            earnedFeeOutputToken:
                              type: string
                              description: >-
                                The amount of fees earned in output token. Only
                                populated after the limit order is fulfilled.
                            feeTier:
                              type: string
                              enum:
                                - LOWEST
                                - LOW
                                - MEDIUM
                                - HIGH
                                - 100
                                - 500
                                - 3000
                                - 10000
                              description: >-
                                The fee tier of the pool used by the limit
                                order.
                            tickLower:
                              type: integer
                              description: >-
                                The lower tick of the position serving the limit
                                order.
                            tickUpper:
                              type: integer
                              description: >-
                                The upper tick of the position serving the limit
                                order.
                          required:
                            - inputTokenAmountAtCreation
                            - outputTokenAmountAtClosure
                            - feeTier
                            - tickLower
                            - tickUpper
                          x-apidog-orders:
                            - inputTokenAmountAtCreation
                            - outputTokenAmountAtClosure
                            - earnedFeeInputToken
                            - earnedFeeOutputToken
                            - feeTier
                            - tickLower
                            - tickUpper
                        condition:
                          discriminator:
                            propertyName: type
                          oneOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Time
                                timeAfterEpochSec:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: >-
                                    This timestamp threshold is specified as the
                                    number of seconds since UNIX epoch.
                              required:
                                - type
                                - timeAfterEpochSec
                              description: >-
                                The "Time" condition is considered met if the
                                current time meets or exceeds the threshold
                                specified by `timeAfterEpochSec`.
                              x-apidog-orders:
                                - type
                                - timeAfterEpochSec
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - TokenAmount
                                zeroAmountToken:
                                  type: number
                                  enum:
                                    - 0
                                    - 1
                                  description: >-
                                    Either 0 or 1, representing token0 or
                                    token1, respectively.
                              required:
                                - type
                                - zeroAmountToken
                              description: >-
                                The "TokenAmount" condition is considered met if
                                the specified token has a zero (principal)
                                amount in the position. `zeroAmountToken` can
                                only be either 0 or 1, representing token0 or
                                token1 in the position, respectively. For
                                example, if `zeroAmountToken` is 1, then the
                                condition is considered met if token1 in the
                                position is exactly zero. Note that only the
                                principal amount is considered; accrued fees are
                                not.
                              x-apidog-orders:
                                - type
                                - zeroAmountToken
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Price
                                singleToken:
                                  type: number
                                  enum:
                                    - 0
                                    - 1
                                  description: >-
                                    If `singleToken` is set, the condition is
                                    considered met if the current USD price of
                                    the specified token (either token0 or
                                    token1) meets the specified threshold;
                                    otherwise, token0's price denominated in
                                    token1 is compared against the specified
                                    threshold,
                                gte:
                                  type: string
                                  description: >-
                                    If `gte` is set, the condition is considered
                                    met if the current price >= `gte`.
                                lte:
                                  type: string
                                  description: >-
                                    If `lte` is set, the condition is considered
                                    met if the current price <= `lte`.
                                durationSec:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: >-
                                    If set, the condition is only considered met
                                    if the price remains satisfaction the
                                    threshold requirement for at least the past
                                    `durationSec` seconds. For example, if `gte`
                                    is 10 and `durationSec` is set to 3600, then
                                    the condition is only considered met if the
                                    price remains >= 10 for the entire past
                                    hour. The historical price feed used is
                                    Coingecko.
                              required:
                                - type
                              description: >-
                                The 'Price' condition checks either one token's
                                price or the two tokens' relative price. If
                                `singleToken` is set, the price condition
                                compares the specified token's USD price against
                                the specified threshold.Otherwise, token0's
                                price denominated in token1 is compared against
                                the specified threshold, and we follow how a
                                Uniswap V3 liquidity pool defines price, i.e.
                                how much raw token1 equals 1 raw token0 in
                                value. "Raw" means the raw uint256 integer
                                amount used in the token contract. For example,
                                if token A uses 8 decimals, then 1 raw token A
                                represents 10^(-8) tokens in human-readable
                                form.
                              x-apidog-orders:
                                - type
                                - singleToken
                                - gte
                                - lte
                                - durationSec
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - AccruedFees
                                feeToPrincipalRatioThreshold:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                                  description: >-
                                    The threshold ratio between the accrued fee
                                    value and the principal value in the
                                    position.
                              required:
                                - type
                                - feeToPrincipalRatioThreshold
                              description: >-
                                The accrued-fees condition specifies a threshold
                                in the form of the ratio between the value of
                                accrued fees and that of principal tokens in a
                                specific liquidity position. This condition
                                serves "auto-compound" which triggers a
                                "reinvest" action whenever the accrued fees meet
                                the threshold specified in this condition.
                              x-apidog-orders:
                                - type
                                - feeToPrincipalRatioThreshold
                          description: >-
                            The condition which triggers the action. If a
                            trigger is successfully created with a condition
                            that is already met at the time of trigger creation,
                            then the action is immediately eligible to be
                            triggered.
                        action:
                          discriminator:
                            propertyName: type
                          oneOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Close
                                slippage:
                                  type: number
                                  minimum: 0
                                  maximum: 1
                                  description: >-
                                    A number between 0 and 1, inclusive, which
                                    Aperture will use as the slippage setting
                                    when triggering the action after condition
                                    is met. Digits after the sixth decimal point
                                    are ignored, i.e. the precision is 0.000001.
                                maxGasProportion:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                                  maximum: 0.5
                                  description: >-
                                    Aperture deducts tokens from the position to
                                    cover the cost of performing this action
                                    (gas). The `maxGasProportion` value
                                    represents the largest allowed proportion of
                                    the position value to be deducted. For
                                    example, a `maxGasProportion` of 0.10
                                    represents 10% of the position, i.e. no more
                                    than 10% of the position's tokens (principal
                                    and accrued fees) may be deducted. If
                                    network gas price is high and the deduction
                                    would exceed the specified ceiling, then the
                                    action will not be triggered.
                              required:
                                - type
                                - slippage
                                - maxGasProportion
                              description: >-
                                The "Close" action close the position, and send
                                both tokens (principal and collected fees) to
                                the position owner.
                              x-apidog-orders:
                                - type
                                - slippage
                                - maxGasProportion
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - LimitOrderClose
                                inputTokenAddr:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The address of the input token for the limit
                                    order, i.e. the token which the user
                                    provided and wants to sell. Must be one of
                                    the two tokens in the position.
                                maxGasProportion:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                                  maximum: 0.5
                                  description: >-
                                    Aperture deducts tokens from the position to
                                    cover the cost of performing this action
                                    (gas). The `maxGasProportion` value
                                    represents the largest allowed proportion of
                                    the position value to be deducted. For
                                    example, a `maxGasProportion` of 0.10
                                    represents 10% of the position, i.e. no more
                                    than 10% of the position's tokens (principal
                                    and accrued fees) may be deducted. If
                                    network gas price is high and the deduction
                                    would exceed the specified ceiling, then the
                                    action will not be triggered.
                              required:
                                - type
                                - inputTokenAddr
                                - maxGasProportion
                              description: >-
                                The 'LimitOrderClose' action behaves the same as
                                'Close' but the position serves a limit order
                                placed through Aperture. No slippage needs to be
                                specified as limit order positions are always
                                closed with a zero slippage setting.
                              x-apidog-orders:
                                - type
                                - inputTokenAddr
                                - maxGasProportion
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Reinvest
                                slippage:
                                  type: number
                                  minimum: 0
                                  maximum: 1
                                  description: >-
                                    A number between 0 and 1, inclusive, which
                                    Aperture will use as the slippage setting
                                    when triggering the action after condition
                                    is met. Digits after the sixth decimal point
                                    are ignored, i.e. the precision is 0.000001.
                                maxGasProportion:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                                  maximum: 0.5
                                  description: >-
                                    Aperture deducts tokens from the position to
                                    cover the cost of performing this action
                                    (gas). The `maxGasProportion` value
                                    represents the largest allowed proportion of
                                    the position value to be deducted. For
                                    example, a `maxGasProportion` of 0.10
                                    represents 10% of the position, i.e. no more
                                    than 10% of the position's tokens (principal
                                    and accrued fees) may be deducted. If
                                    network gas price is high and the deduction
                                    would exceed the specified ceiling, then the
                                    action will not be triggered.
                              required:
                                - type
                                - slippage
                                - maxGasProportion
                              description: >-
                                The "Reinvest" action claims accrued fees, swap
                                them to the same ratio as the principal amounts,
                                and add liquidity.
                              x-apidog-orders:
                                - type
                                - slippage
                                - maxGasProportion
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Rebalance
                                tickLower:
                                  type: integer
                                  description: The lower tick of the new price range.
                                tickUpper:
                                  type: integer
                                  description: The upper tick of the new price range.
                                slippage:
                                  type: number
                                  minimum: 0
                                  maximum: 1
                                  description: >-
                                    A number between 0 and 1, inclusive, which
                                    Aperture will use as the slippage setting
                                    when triggering the action after condition
                                    is met. Digits after the sixth decimal point
                                    are ignored, i.e. the precision is 0.000001.
                                maxGasProportion:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                                  maximum: 0.5
                                  description: >-
                                    Aperture deducts tokens from the position to
                                    cover the cost of performing this action
                                    (gas). The `maxGasProportion` value
                                    represents the largest allowed proportion of
                                    the position value to be deducted. For
                                    example, a `maxGasProportion` of 0.10
                                    represents 10% of the position, i.e. no more
                                    than 10% of the position's tokens (principal
                                    and accrued fees) may be deducted. If
                                    network gas price is high and the deduction
                                    would exceed the specified ceiling, then the
                                    action will not be triggered.
                              required:
                                - type
                                - tickLower
                                - tickUpper
                                - slippage
                                - maxGasProportion
                              description: >-
                                The "Rebalance" action closes the position, and
                                swap tokens (principal and collected fees) to
                                the ratio required by the specified new price
                                range, and open a position with that price
                                range.
                              x-apidog-orders:
                                - type
                                - tickLower
                                - tickUpper
                                - slippage
                                - maxGasProportion
                        expiration:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Unix timestamp in seconds when this trigger expires.
                      required:
                        - taskId
                        - nftId
                        - status
                        - condition
                        - action
                        - expiration
                      x-apidog-orders:
                        - taskId
                        - nftId
                        - status
                        - lastFailedMessage
                        - limitOrderInfo
                        - condition
                        - action
                        - expiration
                    description: The list of triggers.
                required:
                  - triggers
                x-apidog-orders:
                  - triggers
          headers: {}
          x-apidog-name: Triggers listed successfully.
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: string
                description: Message explaining why the request is bad
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: string
                description: Message explaining the error encountered
          headers: {}
          x-apidog-name: Internal Server Error
      security: []
      x-apidog-folder: ''
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/368746/apis/api-3853890-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.aperture.finance
    description: Prod Env
  - url: https://api.hyperfocal.tech
    description: Testing Env
security: []

```
