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

# Get Operation

> GET /v1/operations/:id — Check operation status

<Note>
  **Endpoint:** `GET https://api.rebelfi.io/v1/operations/:id`
</Note>

Get the current status of an operation.

### Path Parameters

| Parameter | Type     | Required | Description  |
| --------- | -------- | -------- | ------------ |
| `id`      | `number` | Yes      | Operation ID |

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.rebelfi.io/v1/operations/123" \
    -H "x-api-key: your_api_key"
  ```

  ```typescript SDK theme={null}
  const operation = await client.operations.get(123);
  ```
</CodeGroup>

### Example Response (Awaiting Signature)

```json theme={null}
{
  "operationId": 123,
  "type": "supply",
  "status": "AWAITING_SIGNATURE",
  "transactions": [
    {
      "id": 456,
      "blockchain": "solana",
      "status": "unsigned",
      "unsignedTransaction": "AQAAAA...base64...",
      "description": "Supply 1000 USDC to Kamino"
    }
  ],
  "expiresAt": "2024-01-15T10:35:00Z"
}
```

### Example Response (Confirmed)

```json theme={null}
{
  "operationId": 123,
  "type": "supply",
  "status": "CONFIRMED",
  "transactions": [
    {
      "id": 456,
      "blockchain": "solana",
      "status": "confirmed",
      "txHash": "5abc...xyz",
      "confirmations": 32,
      "blockNumber": 245678901,
      "description": "Supply 1000 USDC to Kamino"
    }
  ],
  "expiresAt": "2024-01-15T10:35:00Z"
}
```

### Example Response (Failed)

```json theme={null}
{
  "operationId": 123,
  "type": "supply",
  "status": "FAILED",
  "transactions": [
    {
      "id": 456,
      "blockchain": "solana",
      "status": "failed",
      "txHash": "5abc...xyz",
      "error": "Transaction reverted: slippage exceeded",
      "failureCode": "REVERTED",
      "revertReason": "SlippageExceeded",
      "description": "Supply 1000 USDC to Kamino"
    }
  ],
  "expiresAt": "2024-01-15T10:35:00Z"
}
```

### Operation Status Values

| Status               | Description                                             |
| -------------------- | ------------------------------------------------------- |
| `PENDING`            | Operation created, building transactions                |
| `AWAITING_SIGNATURE` | Unsigned transaction ready for signing                  |
| `SUBMITTED`          | Transaction submitted, waiting for confirmation         |
| `CONFIRMED`          | Successfully confirmed on-chain                         |
| `FAILED`             | Transaction failed or operation was cancelled/timed out |

<Info>
  Cancelled and timed-out operations are reported as `failed` when retrieved via GET. The cancel endpoint returns `"status": "CANCELLED"` in its own response.
</Info>

### Transaction Failure Codes

| Code                 | Description                          |
| -------------------- | ------------------------------------ |
| `REVERTED`           | Smart contract execution reverted    |
| `OUT_OF_GAS`         | Transaction ran out of gas           |
| `TIMEOUT`            | Not included in block within timeout |
| `NONCE_TOO_LOW`      | Nonce already used                   |
| `INSUFFICIENT_FUNDS` | Not enough SOL for gas               |
| `REPLACED`           | Replaced by another transaction      |
| `DROPPED`            | Dropped from mempool                 |
| `UNKNOWN`            | Unknown failure                      |

### Errors

| Code                  | Description                |
| --------------------- | -------------------------- |
| `OPERATION_NOT_FOUND` | Operation ID doesn't exist |
