Sell a position
MCP tool: sell_position
dryRun defaults to true. A live sell requires the trade scope and an Idempotency-Key header.
To protect a position automatically rather than selling now, arm an exit rule instead.
Body parameters
platformstringrequired"polymarket" or "kalshi".
positionKeystringrequiredFrom the portfolio endpoint.
sharesnumberOmit to sell the whole position.
slippageBpsnumber0 to 2000.
dryRunbooleandefault: trueMust be explicitly false to sell.
Response
A live call returns sold true with an orderId.
curl -X POST https://api.rivo.markets/v1/positions/sell \
-H "Authorization: Bearer rivo_live_..." \
-H "Content-Type: application/json" \
-d '{
"platform": "polymarket",
"positionKey": "7194...2f10",
"dryRun": true
}'import requests
r = requests.post(
"https://api.rivo.markets/v1/positions/sell",
headers={"Authorization": "Bearer rivo_live_..."},
json={
"platform": "polymarket",
"positionKey": "7194...2f10",
"dryRun": True,
},
)
print(r.json()["data"])const res = await fetch("https://api.rivo.markets/v1/positions/sell", {
method: "POST",
headers: {
Authorization: "Bearer rivo_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
platform: "polymarket",
positionKey: "7194...2f10",
dryRun: true,
}),
});
const { data } = await res.json();response
{
"success": true,
"data": { "dryRun": true, "sold": false, "positionKey": "7194...2f10", "shares": "all" }
}