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

# Get Order Strategy

> This endpoint allows users to get one order strategy by ID.

```http theme={null}
GET /api/v1/order_strategies/{strategy_id}
```

#### Query Parameters

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th width="189">Description</th><th>Example</th></tr></thead><tbody><tr><td>`"strategy_id"`</td><td>string</td><td>required</td><td>Strategy ID (UUID), in the path</td><td>`0f8e7c2a-...`</td></tr><tr><td>`"account"`</td><td>string</td><td>required</td><td>Account address that owns the strategy</td><td>`42trU9A5...`</td></tr></tbody></table>

```
/api/v1/order_strategies/0f8e7c2a-4b1d-4e5f-9a3b-2c1d0e9f8a7b?account=42trU9A5...
```

#### Response

* Status 200: Successfully retrieved the strategy

```json theme={null}
{
  "success": true,
  "data": {
    "strategy_id": "0f8e7c2a-4b1d-4e5f-9a3b-2c1d0e9f8a7b",
    "revision": 1,
    "account": "42trU9A5...",
    "strategy_type": "conditional",
    "definition": {
      "strategy_type": "conditional",
      "params": {
        "trigger_symbol": "BTC",
        "trigger_price_type": "mark",
        "trigger_direction": "gte",
        "trigger_price": "66000",
        "execution_symbol": "BTC",
        "side": "bid",
        "amount": "0.01",
        "order_type": "market",
        "reduce_only": false
      }
    },
    "lifecycle": "open",
    "phase": "armed",
    "state": {
      // Progress for this strategy type
    },
    "applied_trade_history_id": 0,
    "applied_order_history_id": 0,
    "expires_at_ms": 1716286400000,
    "scheduled_start_at_ms": null,
    "scheduled_end_at_ms": null,
    "created_at_ms": 1716200000000,
    "updated_at_ms": 1716200000000,
    "owned_orders": []
  },
  "error": null,
  "code": null
}
```

| Field | Type | Description |
| - | - | - |
| `'strategy_id'` | string | Strategy ID (UUID) |
| `'revision'` | integer | Revision of the definition. Increases on each edit |
| `'account'` | string | Account address |
| `'strategy_type'` | string | Strategy type |
| `'definition'` | object | The `strategy_type` and `params` the strategy runs with. See [Strategy parameters](https://docs.pacifica.fi/api-documentation/api/rest-api/order-strategies/strategy-parameters.md) |
| `'lifecycle'` | string | `pending`, `open`, `paused`, `completed`, `cancelled`, `expired`, or `failed`. See [Lifecycle](https://docs.pacifica.fi/api-documentation/api/rest-api/order-strategies#lifecycle) |
| `'phase'` | string | Only while `open`: `armed` (waiting for a trigger) or `running` |
| `'terminal_reason'` | string | Only for some finished strategies. Why the strategy stopped, for example `user_cancel`, `boundary_cancel`, or `insufficient_balance` |
| `'state'` | object | Progress for this strategy type. The fields depend on the type |
| `'applied_trade_history_id'` | integer | Last trade history ID the strategy has processed |
| `'applied_order_history_id'` | integer | Last order history ID the strategy has processed |
| `'expires_at_ms'` | integer or null | Expiry time in milliseconds |
| `'scheduled_start_at_ms'` | integer or null | Start time in milliseconds |
| `'scheduled_end_at_ms'` | integer or null | End time in milliseconds |
| `'created_at_ms'` | integer | Creation time in milliseconds |
| `'updated_at_ms'` | integer | Last update time in milliseconds |
| `'owned_orders'` | array | Orders the strategy placed. See below |

**Owned order fields**

| Field | Type | Description |
| - | - | - |
| `'order_id'` | integer | Order ID |
| `'prev_order_id'` | integer or null | The order this one replaced, for example when a chase reprices |
| `'is_open'` | boolean | Whether the order is still open |
| `'client_order_id'` | string or null | Client order ID |
| `'take_profit_client_order_id'` | string or null | Client order ID of the attached take profit |
| `'stop_loss_client_order_id'` | string or null | Client order ID of the attached stop loss |

Orders that a strategy places carry its ID as `parent_id` in [Get open orders](https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-open-orders.md) and order history.

* Status 404: Strategy not found, or it belongs to another account
* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

response = requests.get(
    "/api/v1/order_strategies/0f8e7c2a-4b1d-4e5f-9a3b-2c1d0e9f8a7b?account=42trU9A5...",
    headers={"Accept": "*/*"},
)

data = response.json()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.