# API Endpoints

For detailed endpoint specifications, request/response schemas, and interactive testing, visit our [Swagger API Reference](https://api.dexodus.finance/docs).

### Account Endpoints

| Endpoint              | Method | Description                                |
| --------------------- | ------ | ------------------------------------------ |
| `/v1/account/balance` | `GET`  | Get USDC balance and smart account address |
| `/v1/account/history` | `GET`  | Get transactions history                   |

### Market Endpoints

| Endpoint                       | Method | Description                               |
| ------------------------------ | ------ | ----------------------------------------- |
| `/v1/markets`                  | `GET`  | Get all available markets                 |
| `/v1/markets/{marketId}/price` | `GET`  | Get current market price and funding rate |

### Position Endpoints

| Endpoint                     | Method | Description                                  |
| ---------------------------- | ------ | -------------------------------------------- |
| `/v1/positions`              | `GET`  | Get all active positions                     |
| `/v1/positions/{positionId}` | `GET`  | Get specific position details                |
| `/v1/positions/open`         | `POST` | Open a new position (market or limit)        |
| `/v1/positions/close`        | `POST` | Close an existing position (full or partial) |

### Order Endpoints

| Endpoint               | Method | Description                  |
| ---------------------- | ------ | ---------------------------- |
| `/v1/orders`           | `GET`  | Get all orders               |
| `/v1/orders/limit`     | `GET`  | Create a limit order (TP/SL) |
| `/v1/orders/{orderId}` | `POST` | Cancel a pending order       |


---

# 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.dexodus.finance/trading-api/api-endpoints.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.
