---
title: "DELETE /v2/user/accounts/{server}/{accountId}/trades/{id}"
method: DELETE
path: "/v2/user/accounts/{server}/{accountId}/trades/{id}"
tags: ["Trading (v2)"]
---

# DELETE /v2/user/accounts/{server}/{accountId}/trades/{id}

`DELETE /v2/user/accounts/{server}/{accountId}/trades/{id}`

## Request

- Base URL: `https://trading-api.oanda.com` (the document declares no server; this is the origin it was published from)
- URL: `https://trading-api.oanda.com/v2/user/accounts/{server}/{accountId}/trades/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oanda/apis/up-gateway-v1/docs/v2/user/accounts/:server/:accountId/trades/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `server` 'oanda' | 'oanda-demo' | 'otms' | 'v20' | 'v20-demo' | 'oj' | 'oj-demo' | 'opt' | 'ftmo-1', required
- `accountId` string, required
- `id` string, required

## Request body

- object
  - `quantity` number, required
  - `instrument` string, required
  - `direction` 'LONG' | 'SHORT', required
  - `executionMode` 'MARKET' | 'EXCHANGE': Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET
  - `fillType` 'FOK' | 'IOC' | 'RETURN': For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.
  - `trackingData` object
    - `instrumentCategory` string
    - `instrumentCategoryCountry` string
    - `isCFD` boolean

## Response `200`

OK

## Other responses

- `400`: FAIL

---

[API](https://skmtc.dev/oanda/apis/up-gateway-v1.md) - [All operations](https://skmtc.dev/oanda/apis/up-gateway-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/oanda/apis/up-gateway-v1/revisions/395d645513bf?raw)
