Table of Contents
Authentication
GrokMarkets operates through Twitter commands with @PANAGOT. The API endpoints are primarily for data retrieval and internal Twitter bot operations. No wallet authentication is required for public data endpoints.
Markets API
Get All Markets
Retrieve all available prediction markets.
Create Market (Twitter Integration)
Create a new prediction market via Twitter bot integration. This endpoint is used internally by @PANAGOT when processing Twitter commands.
Parameter | Type | Required | Description |
---|---|---|---|
question | string | Yes | The prediction question |
endTime | string (ISO 8601) | Yes | Market end date and time |
creatorFee | number | No | Creator fee in basis points (default: 300) |
Get Market Details
Retrieve detailed information about a specific market.
Bets API
Place Bet (Twitter Integration)
Place a bet on a prediction market via Twitter bot integration. This endpoint is used internally by @PANAGOT when processing betting replies.
Parameter | Type | Required | Description |
---|---|---|---|
marketId | string | Yes | The market ID to bet on |
amount | number | Yes | Bet amount in SOL |
isYes | boolean | Yes | True for YES bet, false for NO bet |
twitterHandle | string | Yes | User's Twitter handle |
Get Market Bets
Retrieve all bets for a specific market.
Users API
Get User Balance
Retrieve a user's current balance. Used internally by @PANAGOT when processing balance check commands.
Get User Transactions
Retrieve a user's transaction history.
System API
Health Check
Check the API health status and database connectivity.
Platform Statistics
Get overall platform statistics.
Error Responses
All API endpoints return consistent error responses:
Common HTTP Status Codes:
200
- Success400
- Bad Request401
- Unauthorized404
- Not Found500
- Internal Server Error