## Usage Examples
These examples reflect the current toolset. Inputs are JSON arguments for MCP tool calls.
---
### 1) Find a market and get live prices
1. Search markets:
```json
{"query":"election","limit":3}
```
2. Pick a market slug, then get details:
```json
{"slug":"will-biden-win-2024"}
```
3. Use `clobTokenIds` from the market to get prices:
```json
{"token_id":"clobTokenIds[0]","side":"BOTH"}
```
Notes:
- If no active CLOB, price tools may return 404.
---
### 2) Batch price checks
1. Get active markets:
```json
{"limit":1,"offset":0}
```
2. Use `clobTokenIds` for batch prices:
```json
{"token_ids":["clobTokenIds[0]","clobTokenIds[1]"]}
```
Notes:
- Empty `{}` or `[]` means no data for those tokens.
---
### 3) Order book + liquidity
```json
{"token_id":"clobTokenIds[0]"}
```
Returns:
- `get_order_book` gives bids/asks.
- `get_liquidity` gives USD liquidity metrics.
---
### 4) Price history
```json
{"token_id":"clobTokenIds[0]","interval":"1h","fidelity":100}
```
Notes:
- `history` can be empty if no trades.
---
### 5) Comments for an event
1. Get events:
```json
{"active":true,"limit":5}
```
2. Use `id` from an event in `list_comments`:
```json
{"parent_entity_type":"Event","parent_entity_id":80505,"limit":5}
```
Notes:
- `parent_entity_type` + `parent_entity_id` required in practice.
---
### 6) Public user data (positions & trades)
Positions:
```json
{"user":"0xabc..."}
```
Trades (optional market filter):
```json
{"user":"0xabc...","market":"0xconditionId"}
```
Notes:
- Use `conditionId` from market objects.
---
### 7) Realtime subscriptions
Subscribe to price changes:
```json
{"market_ids":["0xconditionId"],"callback_type":"notification"}
```
Check status:
```json
{}
```
Unsubscribe:
```json
{"subscription_id":"<id>"}
```
Notes:
- `connected=false` means offline; subscriptions persist but will not receive events.
---
### 8) Bridge quote and status
Supported assets:
```json
{}
```
Quote:
```json
{
"fromAmountBaseUnit":"10000000",
"fromChainId":"137",
"fromTokenAddress":"0x...",
"recipientAddress":"0x...",
"toChainId":"137",
"toTokenAddress":"0x..."
}
```
Status:
```json
{"address":"0x..."}
```
Notes:
- Unknown addresses may return 500.
---
### 9) Health checks
Gamma API:
```json
{}
```
Data API:
```json
{}
```