> For the complete documentation index, see [llms.txt](https://docs.dexodus.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexodus.finance/trading-api/api-endpoints.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.dexodus.finance/trading-api/api-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
