{"api":1,"about":"Cupel's API for its apps: the catalogue of strategies and runs, versioned data releases, Cupel account sign-up for data access, and submitted strategies. Read-only except where said. Results are hypothetical: backtests, not advice.","endpoints":[{"method":"GET","path":"/api/v1","returns":"this description"},{"method":"GET","path":"/api/v1/openapi.yaml","returns":"the OpenAPI 3.1 spec for the routes cupel-portfolios calls"},{"method":"GET","path":"/api/v1/catalogue/strategies?limit=&offset=","returns":"strategies with each currency's anchor run, its stored metrics (CAGR, Sortino, max drawdown and the rest), its grade and evidence status beside ratings 1-5"},{"method":"GET","path":"/api/v1/catalogue/strategies/{id}","returns":"one strategy, its variations and runs, each run with its stored metrics"},{"method":"GET","path":"/api/v1/catalogue/runs/{id}","returns":"one run, its stored metrics, its rating and its daily equity"},{"method":"GET","path":"/api/v1/catalogue/fx","returns":"Canadian dollars per US dollar by day"},{"method":"GET","path":"/api/v1/catalogue/portfolios/{slug}","returns":"a public example portfolio as last built, in percentages: objective, settings, accounts' shares, holdings and their runs"},{"method":"POST","path":"/api/v1/app/login","returns":"{login_id, secret, check, url, expires_in}: the app opens url in the person's browser, where they sign in and approve; check is the code both show"},{"method":"POST","path":"/api/v1/app/login/take","body":"{secret}","returns":"202 {pending} until approved; then, once, 200 {install_token, email, country, region}"},{"method":"POST","path":"/api/v1/app/logout","auth":"Bearer install token","returns":"the token is no token from then on"},{"method":"GET","path":"/api/v1/releases/current","auth":"Bearer install token","returns":"the current release's manifest"},{"method":"GET","path":"/api/v1/releases/{id}","auth":"Bearer install token","returns":"a release's manifest: as_of, rating_method, parts with SHA-256"},{"method":"GET","path":"/api/v1/releases/{id}/parts/{part}","auth":"Bearer install token","returns":"one part's bytes (Parquet)"},{"method":"GET","path":"/api/v1/releases/{id}/diff?base={id}","auth":"Bearer install token","returns":"the parts that differ from a base release"},{"method":"POST","path":"/api/v1/register","body":"{email, country: CA|US, region, licence_version}","returns":"202: a link is sent to the address (signs up for a Cupel account; the app is open source and downloaded separately)"},{"method":"GET","path":"/api/v1/register/verify?token=","returns":"{install_token}: the API token for Cupel data access, kept by the app, sent as Bearer"},{"method":"POST","path":"/api/v1/submissions","auth":"Bearer install token","body":"{name, source, rules, assent_version}","returns":"{submission_id}"},{"method":"GET","path":"/api/v1/submissions/{id}","auth":"Bearer install token","returns":"its status and outcome, and matches: what Cupel already has like it ({layer, relation, strategy_id, variation_id, evidence})"},{"method":"POST","path":"/api/v1/referrals","returns":"403 until counsel has answered (TODO.md 33)"}]}