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

# Cancel an arbitrage order

> Cancels the resting primary limit order. Only orders that have not filled anything can be canceled; once the primary leg fills, the order runs to completion.



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json delete /arbitrage-orders/{id}
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /arbitrage-orders/{id}:
    delete:
      tags:
        - Arbitrage Orders
      summary: Cancel an arbitrage order
      description: >-
        Cancels the resting primary limit order. Only orders that have not
        filled anything can be canceled; once the primary leg fills, the order
        runs to completion.
      operationId: ArbitrageOrderController_cancelArbitrageOrder
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArbitrageOrderDto'
        '409':
          description: The order cannot be canceled in its current status
        '503':
          description: The arbitrage order service is unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDTO'
      security:
        - bearer: []
components:
  schemas:
    ArbitrageOrderDto:
      type: object
      properties:
        createdAt:
          description: When the order was accepted.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        finishedAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
            - type: 'null'
          description: >-
            When the order reached a terminal state. For fully hedged orders
            this is the moment both legs opened, so it doubles as the position
            start time.
        hedgeFailurePolicy:
          type: string
          enum:
            - alertAndHold
            - autoUnwind
          description: >-
            What happens when the hedge leg fails after the primary filled.
            alertAndHold — the naked leg is left in place and the order is
            marked failed. autoUnwind — the primary leg is closed with a market
            order.
          example: alertAndHold
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Arbitrage order identifier.
          example: 019d5cbe-6980-7193-a80e-38a45eda36d8
        legs:
          title: ArbitrageOrderLegs
          type: object
          properties:
            hedge:
              type: object
              properties:
                baseSymbol:
                  type: string
                  description: Base symbol on this exchange.
                  example: ETH
                clientOrderId:
                  description: Identifier sent to the exchange when the leg was placed.
                  type:
                    - string
                    - 'null'
                error:
                  description: Exchange error text when the leg failed, null otherwise.
                  type:
                    - string
                    - 'null'
                exchange:
                  type: string
                  enum:
                    - aster
                    - binance
                    - bybit
                    - extended
                    - gate
                    - hyperliquid
                    - lighter
                    - mexc
                    - ondo
                    - robinhood
                  description: Perpetual exchange
                filledSize:
                  description: >-
                    Size of this leg already executed, in base asset units. Null
                    when the exchange does not report it, or for orders placed
                    before the field existed.
                  example: '0.25'
                  type:
                    - string
                    - 'null'
                marketId:
                  type: string
                  description: Venue-specific market identifier.
                  example: ETHUSDT
                orderId:
                  description: >-
                    Order identifier assigned by the exchange, null until the
                    leg is placed.
                  type:
                    - string
                    - 'null'
                price:
                  description: Limit price in quote currency, or null on market legs.
                  example: '1850.50'
                  type:
                    - string
                    - 'null'
                quoteSymbol:
                  type: string
                  description: Quote symbol on this exchange.
                  example: USDT
                reduceOnly:
                  description: Whether the leg only reduces an existing position.
                  type:
                    - boolean
                    - 'null'
                side:
                  type: string
                  enum:
                    - buy
                    - sell
                  description: Direction of this leg.
                size:
                  type: string
                  description: Size the leg was placed with, in base units.
                  example: '0.5'
                status:
                  anyOf:
                    - type: string
                      enum:
                        - canceled
                        - created
                        - error
                        - executed
                        - partiallyFilled
                    - type: 'null'
                  description: >-
                    Status of this leg on the exchange, null until it is
                    submitted.
                  example: created
                timeInForce:
                  anyOf:
                    - type: string
                      enum:
                        - gtc
                        - ioc
                        - fok
                        - alo
                    - type: 'null'
                  description: >-
                    Time in force policy. gtc — Good-Till-Cancel, ioc —
                    Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity
                    Only (post-only). Null on market legs.
                  example: gtc
                type:
                  type: string
                  enum:
                    - limit
                    - market
                  description: >-
                    Order type of this leg. The primary leg is a limit order in
                    every strategy but marketMarket.
              required:
                - baseSymbol
                - clientOrderId
                - error
                - exchange
                - filledSize
                - marketId
                - orderId
                - price
                - quoteSymbol
                - reduceOnly
                - side
                - size
                - status
                - timeInForce
                - type
              title: ArbitrageOrderLeg
              description: The hedging leg, placed once the primary leg fills.
            primary:
              type: object
              properties:
                baseSymbol:
                  type: string
                  description: Base symbol on this exchange.
                  example: ETH
                clientOrderId:
                  description: Identifier sent to the exchange when the leg was placed.
                  type:
                    - string
                    - 'null'
                error:
                  description: Exchange error text when the leg failed, null otherwise.
                  type:
                    - string
                    - 'null'
                exchange:
                  type: string
                  enum:
                    - aster
                    - binance
                    - bybit
                    - extended
                    - gate
                    - hyperliquid
                    - lighter
                    - mexc
                    - ondo
                    - robinhood
                  description: Perpetual exchange
                filledSize:
                  description: >-
                    Size of this leg already executed, in base asset units. Null
                    when the exchange does not report it, or for orders placed
                    before the field existed.
                  example: '0.25'
                  type:
                    - string
                    - 'null'
                marketId:
                  type: string
                  description: Venue-specific market identifier.
                  example: ETHUSDT
                orderId:
                  description: >-
                    Order identifier assigned by the exchange, null until the
                    leg is placed.
                  type:
                    - string
                    - 'null'
                price:
                  description: Limit price in quote currency, or null on market legs.
                  example: '1850.50'
                  type:
                    - string
                    - 'null'
                quoteSymbol:
                  type: string
                  description: Quote symbol on this exchange.
                  example: USDT
                reduceOnly:
                  description: Whether the leg only reduces an existing position.
                  type:
                    - boolean
                    - 'null'
                side:
                  type: string
                  enum:
                    - buy
                    - sell
                  description: Direction of this leg.
                size:
                  type: string
                  description: Size the leg was placed with, in base units.
                  example: '0.5'
                status:
                  anyOf:
                    - type: string
                      enum:
                        - canceled
                        - created
                        - error
                        - executed
                        - partiallyFilled
                    - type: 'null'
                  description: >-
                    Status of this leg on the exchange, null until it is
                    submitted.
                  example: created
                timeInForce:
                  anyOf:
                    - type: string
                      enum:
                        - gtc
                        - ioc
                        - fok
                        - alo
                    - type: 'null'
                  description: >-
                    Time in force policy. gtc — Good-Till-Cancel, ioc —
                    Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity
                    Only (post-only). Null on market legs.
                  example: gtc
                type:
                  type: string
                  enum:
                    - limit
                    - market
                  description: >-
                    Order type of this leg. The primary leg is a limit order in
                    every strategy but marketMarket.
              required:
                - baseSymbol
                - clientOrderId
                - error
                - exchange
                - filledSize
                - marketId
                - orderId
                - price
                - quoteSymbol
                - reduceOnly
                - side
                - size
                - status
                - timeInForce
                - type
              title: ArbitrageOrderLeg
              description: The leg placed first. Its fill triggers the hedge leg.
          required:
            - hedge
            - primary
        partialFillPolicy:
          type: string
          enum:
            - fullFill
            - immediate
            - threshold
          description: >-
            When a partially filled primary leg gets hedged. fullFill — only
            after the primary leg fills completely. immediate — every fill is
            hedged as it arrives. threshold — hedged once unhedged size crosses
            a threshold.
          example: fullFill
        status:
          type: string
          enum:
            - canceled
            - failed
            - hedge_full_filled
            - hedge_partially_filled
            - hedge_placed
            - hedge_sent
            - new
            - primary_full_filled
            - primary_partially_filled
            - primary_placed
            - primary_sent
          description: >-
            new — accepted, nothing on the exchange yet. primary_sent — the
            primary limit was sent to the exchange. primary_placed — the primary
            limit rests in the book. primary_partially_filled — the primary
            limit is partially filled. primary_full_filled — the primary is
            done, the hedge leg is being placed. hedge_sent — the hedge order
            was sent to the exchange. hedge_placed — the hedge order rests on
            the exchange. hedge_partially_filled — the hedge order is partially
            filled. hedge_full_filled — the hedge is fully filled, both legs are
            open and the order is finalized. canceled — canceled before any
            fill. failed — needs manual handling; the legs may be directionally
            exposed.
          example: primary_placed
        strategy:
          type: string
          enum:
            - limitLimit
            - limitMarket
            - marketMarket
          description: >-
            Leg types in execution order. marketMarket — both legs fire
            immediately. limitMarket — primary limit rests, hedge hedges with a
            market order once it fills. limitLimit — both legs are limit orders.
          example: limitMarket
        unifiedSymbol:
          type: string
          description: >-
            Cross-exchange asset key — an alias (alias:1000bonk) when defined,
            otherwise the base symbol.
          example: ETH
        updatedAt:
          description: When the order last changed.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      required:
        - createdAt
        - finishedAt
        - hedgeFailurePolicy
        - id
        - partialFillPolicy
        - status
        - strategy
        - unifiedSymbol
        - updatedAt
      title: ArbitrageOrder
    ErrorResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: 'Invalid order id: 123'
        statusCode:
          example: 503
          type: number
      required:
        - message
      title: ErrorResponse
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.