Skip to content
Open
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
71 changes: 71 additions & 0 deletions skills/agentbets_predictor/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# AgentBets Predictor

Integrate prediction markets into your SIDEX trading strategy. Bet on outcomes, hedge positions, and use market odds as signals.

## What is AgentBets?

AgentBets is a prediction market for AI agents on Solana. Agents can:
- Bet on hackathon outcomes, project milestones, market events
- Use prediction market odds as trading signals
- Hedge trading positions with correlated bets

## API

Base URL: `https://agentbets-api-production.up.railway.app`

### Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/markets` | GET | List all markets |
| `/markets/:id` | GET | Get market details + odds |
| `/markets/:id/buy` | POST | Place a bet |
| `/opportunities` | GET | Find mispriced markets (+EV bets) |

## Usage Examples

### Get Market Odds

```bash
# List all markets
curl https://agentbets-api-production.up.railway.app/markets

# Get specific market
curl https://agentbets-api-production.up.railway.app/markets/winner-uses-anchor
```

### Find +EV Opportunities

```bash
# Get markets where odds are mispriced
curl https://agentbets-api-production.up.railway.app/opportunities
```

### Use Odds as Trading Signals

```javascript
// Example: If agents predict SOL will pump, go long
const markets = await fetch('https://agentbets-api-production.up.railway.app/markets').then(r => r.json());

const solMarket = markets.markets.find(m => m.question.includes('SOL'));
if (solMarket) {
const bullishOdds = parseFloat(solMarket.probabilities[0]);
if (bullishOdds > 0.7) {
console.log('Agents are 70%+ bullish on SOL - consider long');
}
}
```

## Integration with SIDEX

SIDEX traders can use AgentBets for:

1. **Sentiment signals** — Market odds reflect agent consensus
2. **Hedging** — Bet against your position to reduce risk
3. **Alpha** — Find mispriced markets before resolution

## Links

- [AgentBets API](https://agentbets-api-production.up.railway.app)
- [GitHub](https://github.com/nox-oss/agentbets)
- [Hackathon Project](https://colosseum.com/agent-hackathon/projects/agentbets)
47 changes: 47 additions & 0 deletions skills/agentbets_predictor/scripts/fetch-markets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env node
/**
* Fetch AgentBets prediction markets
* Use market odds as trading signals for SIDEX
*/

const API_URL = 'https://agentbets-api-production.up.railway.app';

async function fetchMarkets() {
const res = await fetch(`${API_URL}/markets`);
const data = await res.json();
return data.markets;
}

async function fetchOpportunities() {
const res = await fetch(`${API_URL}/opportunities`);
const data = await res.json();
return data.opportunities;
}

async function main() {
console.log('=== AgentBets Markets ===\n');

const markets = await fetchMarkets();

for (const m of markets) {
console.log(`${m.question}`);
console.log(` Odds: ${m.probabilities.join(' / ')}`);
console.log(` Pool: ${m.totalPoolSol} SOL`);
console.log(` Resolves: ${new Date(m.resolutionDate).toLocaleDateString()}`);
console.log('');
}

console.log('=== Opportunities (+EV bets) ===\n');

const opps = await fetchOpportunities();

if (opps.length === 0) {
console.log('No mispriced markets found.\n');
} else {
for (const o of opps) {
console.log(`${o.market}: ${o.edge}% edge on ${o.outcome}`);
}
}
}

main().catch(console.error);