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

# Endpoints

Quick reference for all Turbine API endpoints.

Base URL:

```
https://api.turbinefi.com/api/v1
```

***

## Authentication (authentication.md)

| Method | Path        | Description                               | Auth |
| ------ | ----------- | ----------------------------------------- | ---- |
| POST   | `/api-keys` | Register a new API key (wallet signature) | No   |

***

## Markets (markets.md)

| Method | Path                   | Description                  | Auth |
| ------ | ---------------------- | ---------------------------- | ---- |
| GET    | `/markets`             | List all markets             | No   |
| GET    | `/stats/{marketId}`    | Get market statistics        | No   |
| GET    | `/holders/{marketId}`  | Get top token holders        | No   |
| GET    | `/activity/{marketId}` | Get market activity feed     | No   |
| GET    | `/platform/stats`      | Get platform-wide statistics | No   |
| GET    | `/comments/{marketId}` | Get market comments          | No   |
| POST   | `/comments/{marketId}` | Post a comment               | Yes  |

***

## Orderbook (orderbook.md)

| Method | Path                    | Description         | Auth |
| ------ | ----------------------- | ------------------- | ---- |
| GET    | `/orderbook/{marketId}` | Get orderbook depth | No   |

***

## Orders (orders.md)

| Method | Path                      | Description                      | Auth |
| ------ | ------------------------- | -------------------------------- | ---- |
| POST   | `/orders`                 | Submit a signed order            | Yes  |
| GET    | `/orders`                 | Get open orders for a trader     | Yes  |
| DELETE | `/orders/{hash}`          | Cancel an open order             | Yes  |
| GET    | `/users/{address}/orders` | Get all orders across markets    | Yes  |
| GET    | `/failed-trades`          | Get failed trade settlements     | No   |
| GET    | `/pending-trades`         | Get trades awaiting confirmation | No   |
| GET    | `/settlements/{txHash}`   | Look up settlement status        | No   |

***

## Trades (trades.md)

| Method | Path                        | Description                           | Auth |
| ------ | --------------------------- | ------------------------------------- | ---- |
| GET    | `/trades/{marketId}`        | Get recent trades for a market        | No   |
| GET    | `/users/{address}/activity` | Get user trade and settlement history | Yes  |

***

## Positions (positions.md)

| Method | Path                         | Description                         | Auth |
| ------ | ---------------------------- | ----------------------------------- | ---- |
| GET    | `/positions/{marketAddress}` | Get user position in a market       | Yes  |
| POST   | `/positions/{marketId}/sync` | Force-sync position from blockchain | Yes  |
| GET    | `/users/{address}/positions` | Get all positions across markets    | Yes  |

***

## Quick Markets (quick-markets.md)

| Method | Path                                   | Description                    | Auth |
| ------ | -------------------------------------- | ------------------------------ | ---- |
| GET    | `/quick-markets/{asset}`               | Get active quick market        | No   |
| GET    | `/quick-markets/{asset}/history`       | Get recent quick markets       | No   |
| GET    | `/quick-markets/{asset}/price`         | Get current asset price        | No   |
| GET    | `/quick-markets/{asset}/price-history` | Get 20-minute price history    | No   |
| GET    | `/quick-markets/{asset}/price-stream`  | SSE stream of real-time prices | No   |

***

## Resolution (resolution.md)

| Method | Path                     | Description                  | Auth |
| ------ | ------------------------ | ---------------------------- | ---- |
| GET    | `/resolution/{marketId}` | Get market resolution status | No   |

***

## Gasless Relayer (gasless-relayer.md)

| Method | Path                            | Description                          | Auth |
| ------ | ------------------------------- | ------------------------------------ | ---- |
| POST   | `/relayer/ctf-approval`         | Approve CTF transfers gaslessly      | Yes  |
| POST   | `/relayer/usdc-permit`          | Approve USDC spending gaslessly      | Yes  |
| POST   | `/relayer/ctf-redemption`       | Redeem outcome tokens for USDC       | Yes  |
| POST   | `/relayer/batch-ctf-redemption` | Batch redeem across multiple markets | Yes  |
| POST   | `/relayer/propose-resolution`   | Propose market resolution via UMA    | Yes  |
| POST   | `/relayer/settle-market`        | Settle market after dispute window   | Yes  |
| GET    | `/pending-claims`               | Get pending redemptions              | No   |
| GET    | `/failed-claims`                | Get failed redemptions               | No   |

***

## WebSocket (websocket.md)

| Protocol | Path      | Description                                    | Auth |
| -------- | --------- | ---------------------------------------------- | ---- |
| WS       | `/stream` | Real-time orderbook, trade, and market updates | No   |

### Event Types

| Event             | Description                      | Scope                   |
| ----------------- | -------------------------------- | ----------------------- |
| `orderbook`       | Full orderbook snapshot          | Per-market subscription |
| `trade`           | Trade executed                   | Per-market subscription |
| `trade_error`     | Settlement failed                | Per-market subscription |
| `order_cancelled` | Order cancelled                  | Per-market subscription |
| `quick_market`    | Quick market created or resolved | All clients             |


---

# 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:

```
GET https://docs.ojolabs.xyz/markets/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.
