Polyrankdocs
Strategy Lab

PATCH /v1/lab/paper-runs/{id}

Change when one of the caller’s ACTIVE paper runs ends: `ends_at` (ISO 8601) at least 1 hour and at most 90 days from now (400 `invalid_ends_at` otherwise), or `null` for no end (it runs until stopped). A new end gets its own notice about 24 hours before it. 409 `paper_run_not_active` when the run already stopped; 404 when it is not the caller’s. Answers the run as GET /v1/lab/paper-runs/:id does (its newest 100 copies). Needs no plan. 404 `lab_paper_disabled` while LAB_PAPER_ENABLED is off.

PATCH
/v1/lab/paper-runs/{id}

Change when one of the caller’s ACTIVE paper runs ends: ends_at (ISO 8601) at least 1 hour and at most 90 days from now (400 invalid_ends_at otherwise), or null for no end (it runs until stopped). A new end gets its own notice about 24 hours before it. 409 paper_run_not_active when the run already stopped; 404 when it is not the caller’s. Answers the run as GET /v1/lab/paper-runs/:id does (its newest 100 copies). 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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/lab/paper-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "ends_at": "string"  }'
{  "id": "string",  "strategy_id": "string",  "status": "active",  "wallets": [    "string"  ],  "wallets_refreshed_at": "string",  "started_at": "string",  "stopped_at": "string",  "ends_at": "string",  "stop_reason": "user",  "graded_at": "string",  "resolved_copies": 0,  "promotable": true,  "stats": {    "property1": null,    "property2": null  },  "notes": [    "string"  ],  "known_issues": [    "string"  ],  "kind": "copy",  "entry_order": "market",  "wallet_rules": [    {      "wallet": "string",      "label": "string",      "chips": [        {          "key": "string",          "words": "string"        }      ]    }  ],  "seat": {    "at": "string",    "source": "history_ranking",    "score": "string",    "window_days": 0,    "min_positions": 0,    "recomputed": true,    "wallets": [      {        "wallet": "string",        "rank": 0,        "score": 0,        "n": 0      }    ]  },  "copies": [    {      "wallet": "string",      "token_id": "string",      "condition_id": "string",      "title": "string",      "category": "string",      "signal_at": "string",      "leader_price": 0,      "leader_usd": 0,      "outcome": "string",      "reason": "string",      "entry_at": "string",      "entry_price": 0,      "entry_delay_s": 0,      "clip_usd": 0,      "tradable_usd": 0,      "exit_at": "string",      "exit_price": 0,      "won": 0,      "pnl_usd": 0,      "settled_at": "string",      "signal": {        "kind": "string",        "side": "buy",        "token": "string",        "price": 0,        "ref": 0      },      "signal_kind": "wallet",      "rule": {        "moment": "string",        "ask": 0,        "bid": 0,        "phase": "string",        "outcome": "yes",        "days_to_end": 0,        "conditions": [          {            "feature": "string",            "op": "string",            "value": 0,            "window_h": 0,            "actual": 0,            "holds": true,            "words": "string",            "unit": "string"          }        ],        "basis": "top"      },      "shares": 0,      "fills": [        {          "at": 0,          "usd": 0,          "shares": 0,          "px": 0,          "try": -9007199254740991        }      ],      "top_up": {        "tries": -9007199254740991,        "times": -9007199254740991,        "every_s": 0,        "ended": "string",        "summary": "string"      },      "exit_legs": [        {          "seq": -9007199254740991,          "rule": "string",          "sold_at": "string",          "shares": 0,          "proceeds_usd": 0,          "avg_price": 0,          "try": -9007199254740991,          "floor": 0        }      ],      "exit_held": {        "rule": "string",        "shares": 0,        "tries": -9007199254740991      },      "adds": {        "added": -9007199254740991,        "refused": -9007199254740991,        "added_usd": 0,        "refused_by": {          "property1": -9007199254740991,          "property2": -9007199254740991        }      }    }  ]}
{  "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"}