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

# Positions

> What a position is, how it is valued, and how to close all or part of it.

A position is what you hold in one market: long (you gain when the price rises) or short (you gain when it falls). You have at most one position per market. Orders open, grow, shrink, close and flip it.

## No leverage

Every position is 1×. To hold $500 of BTC, you put up $500 of your balance. There is no borrowing and no leverage setting.

A 1× long is liquidated only if the price falls about 99%, which in practice means never. A 1× short is liquidated if the price rises about 99%, and its `liquidation_price` shows where that is.

## The position object

```json theme={"system"}
{
  "object": "position",
  "market": "BTC",
  "direction": "long",
  "size": "0.0692",
  "value": "5815.21",
  "entry_price": "83938.1",
  "price": "84034.9",
  "unrealized_pnl": "6.70",
  "liquidation_price": "1049.2",
  "funding_since_open": "-0.42",
  "summary": "Long 0.0692 BTC ($5,815.21), up $6.70 since an average entry of $83,938.10."
}
```

<ResponseField name="direction" type="string">
  `long` or `short`.
</ResponseField>

<ResponseField name="size" type="string">
  How much you hold, in the asset's units. Always positive; `direction` gives the side.
</ResponseField>

<ResponseField name="value" type="string">
  `size` × `price`, in USD.
</ResponseField>

<ResponseField name="entry_price" type="string">
  The average price of the position, across every order that built it.
</ResponseField>

<ResponseField name="price" type="string">
  The current mark price.
</ResponseField>

<ResponseField name="unrealized_pnl" type="string">
  Your profit or loss if the position closed at `price`, in USD. It becomes realized, and part of your balance, when you close.
</ResponseField>

<ResponseField name="liquidation_price" type="string | null">
  The price at which the exchange would close the position.
</ResponseField>

<ResponseField name="funding_since_open" type="string">
  Funding received (positive) or paid (negative) since the position opened, in USD. See [Funding](/concepts/markets#funding).
</ResponseField>

Positions are read live from the exchange, so they reflect every fill as soon as it happens.

## Closing a position

`POST /v1/positions/{symbol}/close` closes all or part of a position. It places a reduce-only market order on the opposite side for you, and returns that order.

<CodeGroup>
  ```json Everything theme={"system"}
  { "client_order_id": "close-btc-1" }
  ```

  ```json Half theme={"system"}
  { "client_order_id": "close-btc-2", "percent": "50" }
  ```

  ```json $100 of it theme={"system"}
  { "client_order_id": "close-btc-3", "value": "100.00" }
  ```
</CodeGroup>

* With neither `value` nor `percent`, the whole position closes at its exact size, however small it is.
* A partial close is rounded down to the market's size step, like any order, and must be worth at least \$10. If it would leave less than that, close the whole position instead.
* A close never flips your position, and never counts against your key's daily limit.

## Flipping

A sell bigger than your long closes the long and opens a short with the rest, in one order. The order's `position_effect` is `flip`, and it has a `position_flipped` note. Set `reduce_only: true` on an order to make sure this never happens.
