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

# Update Price Trigger

> Price alerts that watch an asset and optionally place a trade when the price is hit.

Create an alert to be notified by email or SMS when an asset crosses a
target price, and optionally have it place a market order automatically.



## OpenAPI

````yaml /openapi.json put /api/private/broker/price-triggers/{id}/
openapi: 3.0.3
info:
  title: Digital Surge API
  version: '2.0'
  description: >-
    Digital Surge is an Australian cryptocurrency exchange. This API provides
    programmatic access to your account: live AUD pricing for hundreds of
    assets, instant swaps, recurring buys, price triggers, portfolio balances,
    transaction history, and crypto withdrawals.


    **Authentication** — create an API key in the Digital Surge app under
    *Account Settings → API Keys* and send it with every request:
    `Authorization: Bearer <your-api-key>`. Read-only and read & write keys are
    available.


    **Guides and interactive documentation** — https://digitalsurge.com.au/docs


    **AI agents** — connect via the Digital Surge MCP server:
    https://mcp.digitalsurge.com.au/mcp
servers:
  - url: https://app.digitalsurge.com.au
    description: Production
security: []
tags:
  - name: Public
    description: Unauthenticated endpoints — market data, asset info, pricing
  - name: Private
    description: Authenticated endpoints — trading, portfolio, account management
paths:
  /api/private/broker/price-triggers/{id}/:
    put:
      tags:
        - Private
      summary: Update Price Trigger
      description: >-
        Price alerts that watch an asset and optionally place a trade when the
        price is hit.


        Create an alert to be notified by email or SMS when an asset crosses a

        target price, and optionally have it place a market order automatically.
      operationId: private_broker_price_triggers_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this Price Trigger Rule.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PriceTriggerRuleRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PriceTriggerRuleRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PriceTriggerRuleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceTriggerRule'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    PriceTriggerRuleRequest:
      type: object
      description: >-
        A price trigger: fires an alert — and optionally a buy or sell — when an
        asset crosses a target price.
      properties:
        asset:
          type: string
          minLength: 1
        price:
          type: string
          format: decimal
          description: Price level to watch for
        enabled:
          type: boolean
          default: true
        notify_sms:
          type: boolean
        notify_email:
          type: boolean
        order_direction:
          nullable: true
          description: >-
            Direction of the auto-trade against AUD. BUY_ASSET = spend AUD to
            receive this rule's asset; SELL_ASSET = spend this rule's asset to
            receive AUD; null = alert only (no trade).


            * `10` - buy asset

            * `20` - sell asset

            * `None` - alert only
          oneOf:
            - $ref: '#/components/schemas/TradeDirectionEnum'
            - $ref: '#/components/schemas/NullEnum'
        order_quantity:
          type: string
          format: decimal
          nullable: true
          description: >-
            Quantity of the spend-side asset (in its native units) to trade when
            the trigger fires. Mutually exclusive with order_get_quantity.
        order_get_quantity:
          type: string
          format: decimal
          nullable: true
          description: >-
            Quantity of the receive-side asset (in its native units) to receive
            when the trigger fires. Mutually exclusive with order_quantity.
        mark_seen:
          type: boolean
          writeOnly: true
          default: false
          description: Set to mark all events as seen
        events:
          type: array
          items:
            $ref: '#/components/schemas/PriceTriggerEventRequest'
      required:
        - asset
        - price
    PriceTriggerRule:
      type: object
      description: >-
        A price trigger: fires an alert — and optionally a buy or sell — when an
        asset crosses a target price.
      properties:
        id:
          type: integer
          readOnly: true
        asset:
          type: string
        asset_name:
          type: string
          readOnly: true
        in_discovery_zone:
          type: boolean
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        price:
          type: string
          format: decimal
          description: Price level to watch for
        match:
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/PriceTriggerMatchEnum'
            - $ref: '#/components/schemas/NullEnum'
        enabled:
          type: boolean
          default: true
        paused:
          type: boolean
          readOnly: true
        notify_sms:
          type: boolean
        notify_email:
          type: boolean
        last_trigger:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        order_direction:
          nullable: true
          description: >-
            Direction of the auto-trade against AUD. BUY_ASSET = spend AUD to
            receive this rule's asset; SELL_ASSET = spend this rule's asset to
            receive AUD; null = alert only (no trade).


            * `10` - buy asset

            * `20` - sell asset

            * `None` - alert only
          oneOf:
            - $ref: '#/components/schemas/TradeDirectionEnum'
            - $ref: '#/components/schemas/NullEnum'
        order_quantity:
          type: string
          format: decimal
          nullable: true
          description: >-
            Quantity of the spend-side asset (in its native units) to trade when
            the trigger fires. Mutually exclusive with order_get_quantity.
        order_get_quantity:
          type: string
          format: decimal
          nullable: true
          description: >-
            Quantity of the receive-side asset (in its native units) to receive
            when the trigger fires. Mutually exclusive with order_quantity.
        order_side:
          type: string
          readOnly: true
        events:
          type: array
          items:
            $ref: '#/components/schemas/PriceTriggerEvent'
      required:
        - asset
        - asset_name
        - created
        - id
        - in_discovery_zone
        - last_trigger
        - match
        - order_side
        - paused
        - price
    TradeDirectionEnum:
      enum:
        - 10
        - 20
      description: |-
        * `10` - buy asset
        * `20` - sell asset
        * `None` - alert only
    NullEnum:
      enum:
        - null
    PriceTriggerEventRequest:
      type: object
      description: >-
        A firing of a price trigger: when it matched, at what price, and the
        resulting trade (if any).
      properties:
        seen:
          type: boolean
    PriceTriggerMatchEnum:
      enum:
        - 1
        - 2
      description: |-
        * `1` - above
        * `2` - below
        * `None` - auto-set
    PriceTriggerEvent:
      type: object
      description: >-
        A firing of a price trigger: when it matched, at what price, and the
        resulting trade (if any).
      properties:
        fired:
          type: string
          format: date-time
          readOnly: true
        seen:
          type: boolean
        price:
          type: string
          format: decimal
          readOnly: true
          description: Price that has triggered the event.
        matched:
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/PriceTriggerMatchEnum'
            - $ref: '#/components/schemas/NullEnum'
        trade:
          type: string
          format: uri
          readOnly: true
          nullable: true
        failure_reason:
          type: string
          readOnly: true
          description: Cause of the automated order failure.
      required:
        - failure_reason
        - fired
        - matched
        - price
        - trade
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal API key, created in the Digital Surge app under Account
        Settings → API Keys. Send it with every request as `Authorization:
        Bearer <your-api-key>`.

````