Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions docs/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2413,13 +2413,54 @@ Authorization: Bearer pmxt_live_...
| `category` | `string` | — | Exact match on normalized category. |
| `exchange` | `string` | — | Filter to a single venue (`polymarket`, `kalshi`, ...). |


> **Note:**
The SDK methods accept the same filters as the query parameters above:
`query`, `limit`, `offset`, `category`, and `exchange`. For
`fetch_markets` / `fetchMarkets`, pass `status="closed"` (Python) or
`status: "closed"` (TypeScript) to include closed markets.


#### Events shape



**Python:**

```python
import pmxt

router = pmxt.Router(pmxt_api_key="pmxt_live_...")

events = router.fetch_events(query="election", limit=2)
for event in events:
print(event.title, event.volume_24h)
```


**TypeScript:**

```typescript
import pmxt from "pmxtjs";

const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." });

const events = await router.fetchEvents({ query: "election", limit: 2 });
for (const event of events) {
console.log(event.title, event.volume24h);
}
```


**curl:**

```bash
curl "https://api.pmxt.dev/v0/events?query=election&limit=2" \
-H "Authorization: Bearer pmxt_live_..."
```



```json
{
"data": [
Expand Down Expand Up @@ -2447,11 +2488,44 @@ Exactly the same shape as [`UnifiedEvent`](https://pmxt.dev/docs/concepts/unifie

#### Markets shape



**Python:**

```python
import pmxt

router = pmxt.Router(pmxt_api_key="pmxt_live_...")

markets = router.fetch_markets(query="election", limit=3)
for market in markets:
print(market.title, market.volume_24h)
```


**TypeScript:**

```typescript
import pmxt from "pmxtjs";

const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." });

const markets = await router.fetchMarkets({ query: "election", limit: 3 });
for (const market of markets) {
console.log(market.title, market.volume24h);
}
```


**curl:**

```bash
curl "https://api.pmxt.dev/v0/markets?query=election&limit=3" \
-H "Authorization: Bearer pmxt_live_..."
```



```json
{
"data": [
Expand Down
77 changes: 69 additions & 8 deletions docs/router/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,46 @@ Authorization: Bearer pmxt_live_...
| `category` | `string` | — | Exact match on normalized category. |
| `exchange` | `string` | — | Filter to a single venue (`polymarket`, `kalshi`, ...). |

<Note>
The SDK methods accept the same filters as the query parameters above:
`query`, `limit`, `offset`, `category`, and `exchange`. For
`fetch_markets` / `fetchMarkets`, pass `status="closed"` (Python) or
`status: "closed"` (TypeScript) to include closed markets.
</Note>

## Events shape

```bash
curl "https://api.pmxt.dev/v0/events?query=election&limit=2" \
-H "Authorization: Bearer pmxt_live_..."
```
<Tabs>
<Tab title="Python">
```python
import pmxt

router = pmxt.Router(pmxt_api_key="pmxt_live_...")

events = router.fetch_events(query="election", limit=2)
for event in events:
print(event.title, event.volume_24h)
```
</Tab>
<Tab title="TypeScript">
```typescript
import pmxt from "pmxtjs";

const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." });

const events = await router.fetchEvents({ query: "election", limit: 2 });
for (const event of events) {
console.log(event.title, event.volume24h);
}
```
</Tab>
<Tab title="curl">
```bash
curl "https://api.pmxt.dev/v0/events?query=election&limit=2" \
-H "Authorization: Bearer pmxt_live_..."
```
</Tab>
</Tabs>

```json
{
Expand Down Expand Up @@ -69,10 +103,37 @@ Exactly the same shape as [`UnifiedEvent`](/concepts/unified-schema#unifiedevent

## Markets shape

```bash
curl "https://api.pmxt.dev/v0/markets?query=election&limit=3" \
-H "Authorization: Bearer pmxt_live_..."
```
<Tabs>
<Tab title="Python">
```python
import pmxt

router = pmxt.Router(pmxt_api_key="pmxt_live_...")

markets = router.fetch_markets(query="election", limit=3)
for market in markets:
print(market.title, market.volume_24h)
```
</Tab>
<Tab title="TypeScript">
```typescript
import pmxt from "pmxtjs";

const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." });

const markets = await router.fetchMarkets({ query: "election", limit: 3 });
for (const market of markets) {
console.log(market.title, market.volume24h);
}
```
</Tab>
<Tab title="curl">
```bash
curl "https://api.pmxt.dev/v0/markets?query=election&limit=3" \
-H "Authorization: Bearer pmxt_live_..."
```
</Tab>
</Tabs>

```json
{
Expand Down