Developer

Examples

Use-case recipes for building with the REST API and WebSocket stream. Copy a snippet, swap in your key, and run it.

Need a key first? Create one on the Keys page. The full contract lives in the API reference.

Build a live event board

REST

Populate a schedule, let users open a match, then load the latest odds for their selected bookmaker set.

  • /sports
  • /competitions
  • /events
  • /events/{id}/odds
Shell
curl "https://api.photonodds.com/api/v1/events?sport=football&bookmakers=bet365,unibet&limit=25" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Power a best-price betting slip

REST

Resolve the best current price for a market, period, line, and list of bookmakers before a user places a bet elsewhere.

  • /events/{id}/odds/best
Shell
curl "https://api.photonodds.com/api/v1/events/evt_123/odds/best?market=moneyline&period=full_time&bookmakers=bet365,unibet" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Watch odds movement with WebSocket

WebSocket planWebSocket

Stream odds changes into a trading screen or worker without polling. REST + WebSocket plans allow one active socket per user, across all of your keys. Run it server-side: browser WebSocket clients cannot send the X-API-Key header.

  • /ws/odds
Node.js
import WebSocket from 'ws'

const ws = new WebSocket('wss://api.photonodds.com/api/v1/ws/odds?bookmakers=bet365,unibet', {
  headers: { 'X-API-Key': process.env.PHOTONODDS_API_KEY },
})

ws.on('message', (raw) => {
  const message = JSON.parse(raw.toString())
  if (message.type === 'odds_changes') console.log(message.cursor, message.data)
})

Trigger line-movement alerts

REST

Poll recent changes for watched books and compare each update with your last stored price.

  • /odds/changes
Shell
curl "https://api.photonodds.com/api/v1/odds/changes?market=moneyline&bookmakers=bet365&limit=100" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Backfill a model with odds history

REST

Replay how a selection moved before kickoff for model calibration, pricing research, or post-match review.

  • /events/{id}/odds/history
Shell
curl "https://api.photonodds.com/api/v1/events/evt_123/odds/history?bookmaker=bet365&market=moneyline&outcome=home&limit=200" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Rank EV+ opportunities

Paid API planREST

Feed a value dashboard or alert queue filtered to the books and markets your users can actually act on.

  • /ev-plus
Shell
curl "https://api.photonodds.com/api/v1/ev-plus?sport=football&bookmaker=bet365&market=moneyline&limit=50" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Monitor arbitrage windows

Paid API planREST

Run a short-interval worker that stores cross-book opportunities with your own execution status.

  • /arbitrage
Shell
curl "https://api.photonodds.com/api/v1/arbitrage?bookmaker=bet365&limit=25" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

Inspect quota and bookmaker bindings

REST

Check the active tier, hourly cap, selected bookmakers, and reset availability before a job starts.

  • /me
  • /bookmakers/reset
Shell
curl "https://api.photonodds.com/api/v1/me" \
  -H "X-API-Key: $PHOTONODDS_API_KEY"

18+ only. Betting carries risk. Please gamble responsibly. Get help