predictions

POST /api/v1/predictions/markets/<id>/sell/

Sell shares back to the market on a given side.

Request body (JSON): { "side": "yes" | "no", "shares": <number of shares to sell, numeric> }

Response on success (HTTP 200): { "shares_sold": "5.00", "squid_returned": "230.50", "new_price": "0.47", "position": { "side": "yes", "shares": "7.34", "cost_basis": "350.00" } }

Errors: 400 — invalid body, business rule violation (TradingError) 404 — market not found

post/api/v1/predictions/markets/{market_id}/sell/

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}/sell/
  • 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.