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

# Open Positions

> Open Positions for Derivatives Trades

## Overview

The Open Positions API provides information about all currently open derivative positions held by a user on a specific date. Open positions represent active futures and options contracts that have not yet been closed. This data is essential for Quicko to:

* Calculate unrealized P\&L on active derivative positions
* Monitor margin requirements and risk exposure
* Prepare accurate profit/loss statements for tax compliance
* Track derivative holdings for regulatory reporting

## Query Parameters

Your API should accept an `as_on_date` query parameter to retrieve open positions for a specific date. This allows Quicko to fetch historical snapshots of derivative positions when needed for tax and compliance purposes.

```
GET /open-positions?as_on_date=YYYY-MM-DD
```

## Response Format

Your API should return open positions data organized by derivative category:

## Equity Derivatives

Equity derivatives open positions data should include the following fields:

| Param | Type | Required | Description |
| - | - | - | - |
| symbol | string | Yes | Symbol or description of the instrument |
| instrument\_type | string | Yes | Type, possible values: Futures, Options |
| strike\_price | number | No | Strike price of the contract |
| expiry\_date | number | No | Contract expiry date epoch |
| buy\_date | number | Yes | Buy date epoch |
| exchange | string | No | Exchange where trade is made |
| open\_quantity | number | Yes | Quantity of units held of the instrument |
| average\_price | number | Yes | Average buy price across all trades |
| previous\_closing\_price | number | Yes | Last traded price of the instrument |
| unrealized\_profit\_or\_loss | number | No | Unrealized P\&L = (Previous Closing Price - Average Price) × Open Quantity |

## Currency Derivatives

Currency derivatives open positions data should include the following fields:

| Param | Type | Required | Description |
| - | - | - | - |
| symbol | string | Yes | Symbol or description of the instrument |
| instrument\_type | string | Yes | Type, possible values: Futures, Options |
| strike\_price | number | No | Strike price of the contract |
| expiry\_date | number | No | Contract expiry date epoch |
| buy\_date | number | Yes | Buy date epoch |
| exchange | string | No | Exchange where trade is made |
| open\_quantity | number | Yes | Quantity of units held of the instrument |
| average\_price | number | Yes | Average buy price across all trades |
| previous\_closing\_price | number | Yes | Last traded price of the instrument |
| unrealized\_profit\_or\_loss | number | No | Unrealized P\&L = (Previous Closing Price - Average Price) × Open Quantity |

## Commodity Derivatives

Commodity derivatives open positions data should include the following fields:

| Param | Type | Required | Description |
| - | - | - | - |
| symbol | string | Yes | Symbol or description of the instrument |
| instrument\_type | string | Yes | Type, possible values: Futures, Options |
| strike\_price | number | No | Strike price of the contract |
| expiry\_date | number | No | Contract expiry date epoch |
| buy\_date | number | Yes | Buy date epoch |
| exchange | string | No | Exchange where trade is made |
| open\_quantity | number | Yes | Quantity of units held of the instrument |
| average\_price | number | Yes | Average buy price across all trades |
| previous\_closing\_price | number | Yes | Last traded price of the instrument |
| unrealized\_profit\_or\_loss | number | No | Unrealized P\&L = (Previous Closing Price - Average Price) × Open Quantity |


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