# Get positions

`GET https://api.cryptohopper.com/v1/hopper/{id}/position`

Part of [Positions](https://www.cryptohopper.com/api-documentation/api-reference/positions.md) in the Cryptohopper API reference.

Returns all open positions of the hopper. Each position includes its effective take profit, stop-loss, trailing stop-loss, auto close and DCA settings, resolved from the position itself, its config pool and the hopper config.

OAuth scope: `read`

Not available for exchange arbitrage, market maker and grid bots. Scalar values are returned as strings; amount and rate keep their full stored precision, and config is the position's own settings as a JSON string or null. stop_loss_percentage is left out when stop-loss is off, and trailing_arm and trailing_arm_percentage are left out when trailing stop-loss is off. take_profit_levels is null when the position uses the hopper's layered take profit, otherwise a list of {profit, share} levels.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Hopper ID. |

## Example request

```bash
curl "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position" \
  -H "access-token: YOUR_ACCESS_TOKEN"
```

## Response

Example response (illustrative values):

```json
{
    "data": [
        {
            "id": "123456",
            "pair": "BTCUSDT",
            "currency": "BTC",
            "amount": "0.0015000000000000",
            "rate": "64250.1200000000000000",
            "buy_id": "987654321",
            "order_id": null,
            "sell_id": null,
            "buy_trigger": "strategy",
            "sell_trigger": null,
            "config": null,
            "percentage_profit": "3",
            "stop_loss": "0",
            "sell_rate": null,
            "trailing_percentage": "0.0000000000000000",
            "buy_time": "1758790000",
            "sell_time": null,
            "auto_close_time": "0",
            "hold": "0",
            "sold": "0",
            "take_profit_levels": null,
            "take_profit_levels_done": [],
            "tsl_enabled": "0",
            "dca_enabled": "0",
            "dca_latest_average": "0",
            "dca_count": "0",
            "auto_dca_time": "-1 hours",
            "auto_dca_max": "3",
            "auto_dca_percentage": "5",
            "dca_order_type": "limit",
            "auto_dca_strategy": "0",
            "cost": "96.37518",
            "trailing_stop_loss_enabled": "0",
            "trailing_stop_loss_only": "0",
            "stop_loss_enabled": "0",
            "auto_close_enabled": "0"
        }
    ]
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
