Arm an exit rule
MCP tool: set_exit_rule
Prices are 0 to 1, the same scale as the market. At least one trigger is required: a rule with no trigger is protection you do not actually have.
These only ever reduce a position, so they need the write scope rather than trade.
DELETE /v1/exits with the same platform and positionKey cancels the rule.
Body parameters
platformstringrequired"polymarket" or "kalshi".
positionKeystringrequiredFrom the portfolio endpoint.
stopLossPricenumberSell if the price falls to this. Must be below takeProfitPrice.
takeProfitPricenumberSell if the price rises to this.
trailingPctnumberSell after a fall of this percent from the high water mark.
refPricenumberSeeds the trailing high water mark. Defaults to the current price.
Response
One rule per position: arming again replaces the previous rule rather than adding a second.
curl -X POST https://api.rivo.markets/v1/exits \
-H "Authorization: Bearer rivo_live_..." \
-H "Content-Type: application/json" \
-d '{
"platform": "polymarket",
"positionKey": "7194...2f10",
"stopLossPrice": 0.5,
"takeProfitPrice": 0.9
}'import requests
r = requests.post(
"https://api.rivo.markets/v1/exits",
headers={"Authorization": "Bearer rivo_live_..."},
json={
"platform": "polymarket",
"positionKey": "7194...2f10",
"stopLossPrice": 0.5,
"takeProfitPrice": 0.9,
},
)
print(r.json()["data"])const res = await fetch("https://api.rivo.markets/v1/exits", {
method: "POST",
headers: {
Authorization: "Bearer rivo_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
platform: "polymarket",
positionKey: "7194...2f10",
stopLossPrice: 0.5,
takeProfitPrice: 0.9,
}),
});
const { data } = await res.json();response
{
"success": true,
"data": { "armed": true, "positionKey": "7194...2f10" }
}