---
title: "Cover all short margin positions"
method: POST
path: "/api/prime/trading/v1/accounts/{accountId}/margin/positions/cover"
tags: ["Margin"]
---

# Cover all short margin positions

`POST /api/prime/trading/v1/accounts/{accountId}/margin/positions/cover`

Transfers the exact amount to cover all short margin positions for the specified account.

## Path parameters

- `accountId` string, required

## Request body

- union
  - object
    - `currencies` string[]
  - object
    - `all` boolean

## Response `200`

Margin positions cover response

- object
  - `balances` object[]
    - `currency` string — Currency symbol
    - `quantity` string — Net position after the position transfer
    - `balanceValue` object — Returns the value of the margin position. Has 2 fields denoting the currency used and the actual value.
      - `quantity` string, decimal, required — The specified quantity.
      - `currency` string, required — The specified quantity currency.

## Other responses

- `400` — Bad request - Invalid parameters
- `401` — Unauthorized - Invalid or missing authentication
- `403` — Forbidden - Insufficient permissions
- `422` — Unprocessable Entity - JSON payload is improperly formatted
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.net/bitgo/apis/bitgo-api.md) · [All operations](https://skmtc.net/bitgo/apis/bitgo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitgo/bitgo-api/revisions/e445c15e5bee/schema)
