---
title: "Cancel a paper order"
method: DELETE
path: "/portfolio/orders/{orderId}"
tags: ["Trading"]
---

# Cancel a paper order

`DELETE /portfolio/orders/{orderId}`

## Request

- Base URL: `https://arena-predictions.com/api/v1`
- URL: `https://arena-predictions.com/api/v1/portfolio/orders/{orderId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Cancels a resting paper order and returns its hold. Kalshi's path and answer (the order and reducedBy). Query execution=kalshi cancels a live Kalshi order instead (scope trade:write:kalshi) and does not touch the paper book. Query execution=poly-intl cancels a Polymarket International order (scope trade:write:poly-intl). Polymarket US is not offered. Send X-Arena-Org to cancel a paper order on that organization's paper sandbox; without the header the paper cancel is on the personal account. An unknown or forbidden organization cancels nothing. An order that already filled or closed answers unchanged with reducedBy 0, so a paper cancel is safe to send twice. No ticker, title or price in the paper answer while the venue-data switch is off.

## Path parameters

- `orderId` string, uuid, required

## Headers

- `X-Arena-Org` string

## Response `200`

The order, and how many contracts came off the book.

- CancelResult
  - `order` OrderDetail, required
    - `orderId` string, uuid, required
    - `action` 'buy' | 'sell' | 'null', nullable, required
    - `instrumentId` string, nullable, required
    - `instrumentLabel` string, nullable, required
    - `instrumentSide` 'yes' | 'no' | 'null', nullable, required
    - `orderSide` 'yes' | 'no' | 'null', nullable, required
    - `contracts` integer, required
    - `filledContracts` integer, required
    - `remainingContracts` integer, required
    - `limitCents` integer, nullable, required: Your own limit.
    - `holdDollars` number, required
    - `timeInForce` string, nullable, required
    - `expiresAt` string, date-time, nullable, required
    - `status` string, nullable, required
    - `statedProbPct` integer, nullable
    - `placedVia` string, nullable
    - `placedPrivate` boolean
    - `createdAt` string, date-time, nullable, required
    - `marketTicker` string, nullable: Only while the venue-data switch is on.
    - `type` 'limit', required
    - `cancelReason` string, nullable, required: user, expired, not_filled, market_closed, market_resolved, position_closed, and so on.
    - `tradeId` string, uuid, nullable, required: The position it opened or closed, once executed.
    - `fillPriceCents` integer, nullable: Only while the venue-data switch is on.
  - `reducedBy` integer, required: Contracts taken off the book. 0 when the order had already filled or closed.
  - `mode` 'paper', required
  - `venueData` boolean, required
  - `organization` object: Present when X-Arena-Org selected an organization sandbox. Absent on the personal account.
    - `id` string, uuid, required
    - `slug` string, nullable: The organization's slug. Null when the sandbox did not name one.

## Other responses

- `400`: invalid_request: orderId is not a UUID.
- `401`: Missing, malformed, unknown, revoked or expired key. Carries a WWW-Authenticate: Bearer challenge.
- `403`: insufficient_scope: the key does not carry trade:write. organization_forbidden: X-Arena-Org names an organization this key cannot use. Nothing was canceled on the personal account.
- `404`: order_not_found: no order with that id on this account. organization_not_found: no organization matches X-Arena-Org.
- `429`: rate_limited: over a hard trade limit (always enforced), or over the plan's requests while those limits are enforced; or quota_exceeded. error.retryAfterSeconds equals Retry-After.
- `503`: trading_off: trading with API keys is switched off right now. internal_error: Arena could not confirm the cancel; send it again.

---

[API](https://skmtc.dev/arena-predictions/apis/arena-api.md) · [All operations](https://skmtc.dev/arena-predictions/apis/arena-api/llms.txt) · [OpenAPI document](https://skmtc.dev/arena-predictions/apis/arena-api/revisions/9d89d166dae6?raw)
