Skip to main content

Connection

Endpoint
wss://api.pumpevm.fun/ws/v1/prediction/orderbook
Authentication
Authorization: Bearer <api_key>

Channels

ChannelDescriptionPayload
orderbookReal-time order book updatesBids, asks
tradesLive trade executionsTrade details
positionsUser position updatesPosition info
accountAccount balance updatesBalance, P&L

Subscribe

{
  "type": "subscribe",
  "channel": "orderbook",
  "marketId": "0x...",
  "outcome": "YES"
}

Unsubscribe

{
  "type": "unsubscribe",
  "channel": "orderbook",
  "marketId": "0x..."
}

Response messages

Order book update

{
  "type": "orderbook",
  "data": {
    "marketId": "0x...",
    "outcome": "YES",
    "bids": [["0.65", "1000"], ["0.64", "2000"], ["0.63", "1500"]],
    "asks": [["0.67", "500"], ["0.68", "1500"], ["0.69", "2000"]],
    "lastPrice": "0.66",
    "timestamp": "2025-06-20T12:00:00Z"
  }
}

Trade

{
  "type": "trade",
  "data": {
    "marketId": "0x...",
    "outcome": "YES",
    "price": "0.66",
    "size": "500",
    "side": "buy",
    "makerFee": "0.02",
    "takerFee": "0.05",
    "timestamp": "2025-06-20T12:00:00Z",
    "txHash": "0x..."
  }
}

Position update

{
  "type": "position",
  "data": {
    "marketId": "0x...",
    "outcome": "YES",
    "size": "1500",
    "entryPrice": "0.60",
    "currentPrice": "0.66",
    "unrealizedPnl": "+90.00",
    "realizedPnl": "+45.00",
    "timestamp": "2025-06-20T12:00:00Z"
  }
}

Account update

{
  "type": "account",
  "data": {
    "balance": "10000.00",
    "available": "8500.00",
    "locked": "1500.00",
    "totalPnl": "+250.00",
    "totalTrades": "127",
    "timestamp": "2025-06-20T12:00:00Z"
  }
}