bet
Place bets on prediction markets for cryptocurrency and stock price movements. Specify game type, direction (UP/DOWN), probability price, and share quantity to execute trades.
Instructions
Place a bet on a prediction market. Cost = shares * price.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameType | Yes | Game type, e.g. 'btc-5min' | |
| side | Yes | Predict UP or DOWN | |
| price | Yes | Probability price 0.01-0.99 (0.5 = even odds) | |
| shares | Yes | Number of shares to buy |
Implementation Reference
- src/index.ts:156-172 (handler)The handler logic for the 'bet' tool, which performs an API POST request to place a bet.
case "bet": return { content: [ { type: "text", text: JSON.stringify( await apiPost(`/api/games/${args?.gameType}/bet`, { side: args?.side, price: args?.price, shares: args?.shares, }), null, 2, ), }, ], }; - src/index.ts:69-82 (schema)The schema definition for the 'bet' tool, specifying input parameters and descriptions.
{ name: "bet", description: "Place a bet on a prediction market. Cost = shares * price.", inputSchema: { type: "object" as const, properties: { gameType: { type: "string", description: "Game type, e.g. 'btc-5min'" }, side: { type: "string", enum: ["UP", "DOWN"], description: "Predict UP or DOWN" }, price: { type: "number", description: "Probability price 0.01-0.99 (0.5 = even odds)" }, shares: { type: "number", description: "Number of shares to buy" }, }, required: ["gameType", "side", "price", "shares"], }, },