# Derivatives

Provides functionality to fetch details across **derivative** protocol.

**1. Get Assets**

* **Endpoint**: `GET /api/assets`
* **Description**: Retrieve a list of all assets.
* **Response**: JSON array of asset objects.

**2. Get Fills**

* **Endpoint**: `GET /api/fills`
* **Description**: Retrieve the fills for all trading orders.
* **Response**: JSON array of fill objects.

**3. Get Historical PnL**

* **Endpoint**: `GET /api/historical-pnl`
* **Description**: Fetch historical profit and loss records.
* **Response**: JSON array of PnL objects.

**4. Get Order**

* **Endpoint**: `GET /api/orders/{order_id}`
* **Description**: Retrieve a specific order by its ID.
* **Response**: JSON object representing the order.

**5. Get Orders**

* **Endpoint**: `GET /api/orders`
* **Description**: Fetch all current orders.
* **Response**: JSON array of order objects.

**6. Get Perpetual Positions**

* **Endpoint**: `GET /api/perpetual-positions`
* **Description**: Retrieve a list of all perpetual positions.
* **Response**: JSON array of position objects.

**7. Get Sub-Accounts**

* **Endpoint**: `GET /api/sub-accounts`
* **Description**: List all sub-accounts associated with the user.
* **Response**: JSON array of sub-account objects.

**8. Get Transfer**

* **Endpoint**: `GET /api/transfer`
* **Description**: Retrieve the status of a transfer.
* **Response**: JSON object representing the transfer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dexlens.io/sdk-and-api/api/derivatives.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
