Polyrankdocs
Strategy Lab

POST /v1/lab/paper-runs/{id}/orders/{orderId}/cancel

Cancel one resting limit order of one of the caller’s paper runs (reason user): it takes no fill from now on; what it filled stays, and its signal’s row is written from it by the engine within seconds. 409 `order_not_open` when it already ended. Needs no plan. 404 `lab_paper_disabled` while LAB_PAPER_ENABLED is off.

POST
/v1/lab/paper-runs/{id}/orders/{orderId}/cancel

Cancel one resting limit order of one of the caller’s paper runs (reason user): it takes no fill from now on; what it filled stays, and its signal’s row is written from it by the engine within seconds. 409 order_not_open when it already ended. Needs no plan. 404 lab_paper_disabled while LAB_PAPER_ENABLED is off.

AuthorizationBearer <token>

API key: Authorization: Bearer pk_live_… (mint at polyrank.app/api-keys)

In: header

Path Parameters

id*string
orderId*integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/lab/paper-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/orders/1/cancel"
{  "id": 0,  "wallet": "string",  "token_id": "string",  "condition_id": "string",  "title": "string",  "status": "planned",  "cancel_reason": "string",  "reason": "string",  "limit_price": 0,  "usd": 0,  "shares": 0,  "tif": "gtd",  "expires_at": "string",  "ends_at": "string",  "post_only": true,  "placed_at": "string",  "ended_at": "string",  "filled_shares": 0,  "filled_usd": 0,  "maker_shares": 0,  "taker_shares": 0,  "fees_usd": 0,  "builder_fees_usd": 0,  "fills": [    {      "at": "string",      "price": 0,      "shares": 0,      "usd": 0,      "liquidity": "maker",      "fee_usd": 0,      "builder_fee_usd": 0    }  ],  "copy": {    "outcome": "string",    "reason": "string",    "won": 0,    "pnl_usd": 0,    "settled_at": "string"  }}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "feature": "string",  "field": "string",  "plan": "string",  "retry_after_sec": 0,  "retry_after_seconds": 0,  "reason": "string",  "running": 0,  "limit": 0,  "issues": [    null  ],  "trace_id": "string"}