predictions
POST /api/v1/predictions/markets/<id>/buy/
Buy shares on a given side of a prediction market.
Request body (JSON): { "side": "yes" | "no", "amount": <SQUID to spend, numeric> }
Response on success (HTTP 200): { "shares_bought": "12.34", "total_cost": "500.00", "avg_price": "0.4056", "new_price": "0.53", "position": { "side": "yes", "shares": "15.22", "cost_basis": "750.00" } }
Errors: 400 — invalid body, business rule violation (TradingError) 404 — market not found
post/api/v1/predictions/markets/{market_id}/buy/
Request
- Base URL: https://api.leviathannews.xyz (the document declares no server; this is the origin it was published from)
- URL: https://api.leviathannews.xyz/api/v1/predictions/markets/{market_id}/buy/
- Auth: one of:
- HTTP bearer
- API key in cookie sessionid
Path parameters
market_idinteger required
Response
No response body
Changes
No recorded changes to this operation across all 1 revision of this API.