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

# Cancel a scaled order and its working rungs



## OpenAPI

````yaml /openapi.yaml delete /v1/scaled-orders/{scaled_order_id}
openapi: 3.1.0
info:
  title: Funding Perpetuals API
  version: 1.0.0
  description: >-
    Programmatic access to Funding Perpetuals paper-trading challenge accounts.
    API trades use the same real order books and simulated execution engine as
    the web trading interface.
  contact:
    url: https://fundingperpetuals.com/support
servers:
  - url: https://developers.fundingperpetuals.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: General
  - name: Accounts
  - name: Markets
  - name: Positions
  - name: Orders
  - name: Fills
  - name: Strategy Orders
paths:
  /v1/scaled-orders/{scaled_order_id}:
    delete:
      tags:
        - Strategy Orders
      summary: Cancel a scaled order and its working rungs
      operationId: cancelScaledOrder
      parameters:
        - $ref: '#/components/parameters/ScaledOrderId'
      responses:
        '200':
          description: Current scaled-order state and child cancellation counts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScaledOrderEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ScaledOrderId:
      name: scaled_order_id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ScaledOrderEnvelope:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ScaledOrder'
    ScaledOrder:
      type: object
      required:
        - id
        - account_id
        - market_id
        - side
        - total_size
        - rung_count
        - rungs
        - status
        - started_at
      properties:
        id:
          type: string
        account_id:
          type: string
        market_id:
          type: string
        provider:
          type: string
        symbol:
          type: string
        coin:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        total_size:
          type: number
        size_decimals:
          type: integer
        leverage:
          type: number
        margin_mode:
          type: string
          enum:
            - cross
            - isolated
        reduce_only:
          type: boolean
        distribution:
          type: string
          enum:
            - flat
            - ascending
            - descending
        start_price:
          type: number
        end_price:
          type: number
        rung_count:
          type: integer
        placed_count:
          type: integer
        rejected_count:
          type: integer
        rungs:
          type: array
          items:
            type: object
            required:
              - price
              - size
            properties:
              price:
                type: number
              size:
                type: number
              liquidity_role:
                type: string
                enum:
                  - maker
                  - taker
              order_id:
                type: string
              reject_reason:
                type: string
        status:
          type: string
        started_at:
          type: number
        completed_at:
          type: number
        canceled_at:
          type: number
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
        message:
          type: string
        request_id:
          type: string
          format: uuid
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Resource not found or not owned by the authenticated user.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Conflict:
      description: The request conflicts with current state or an idempotency record.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: A per-key, per-IP, or deployment request budget is exhausted.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Funding Perpetuals API key
      description: API key beginning with `fp_live_`.

````