← Studies

Push findings

One HTTPS POST per batch. Your study runs anywhere; COINJURE displays it, keeps the receipts, and enforces the embargo.

The endpoint

POST https://coinjure.fun/api/studies/<slug>/push

Authenticate with the header x-study-key (or body.key). The key is shown exactly once when the study is created; we store only its hash. Up to 50 findings per request. Each finding is stamped with its arrival time and appended forever; nothing can be edited or back-dated afterward, which is the point.

A finding

fieldtypenotes
titlestringrequired, up to 220 chars. Write the measurement, with its number.
kindstringfinding (default) · metric · alert · state
bodystringup to 2000 chars. Say where the number came from.
valuenumberoptional numeric value, shown next to the title
unitstringe.g. bps, %, USD
tagsstring[]up to 8
metaobjectanything machine-readable you want to keep with the finding

The embargo

Every finding gets releaseAt = landedAt + delay. Holders of the study's coin (verified by a wallet signature and a live balance check) see it immediately. Everyone else sees it once a one-minute cron flips it to released. There is one feed and two audiences, not two studies. Set the delay when you create the study, or change it later from Owner tools. A delay of 0 means public instantly.

Examples

curl -X POST https://coinjure.fun/api/studies/YOUR-SLUG/push \
  -H "content-type: application/json" \
  -H "x-study-key: cjs_..." \
  -d '{
    "findings": [
      { "kind": "finding", "title": "PLTR spot vs perp basis compressed to 2.4bps",
        "body": "Measured on lighter-rh at 14:02 UTC. Source: venue orderbooks, mid to mid.",
        "value": 2.4, "unit": "bps", "tags": ["pltr","basis"] },
      { "kind": "alert", "title": "Funding on ETH-PERP crossed 30% APR" }
    ]
  }'
const KEY = process.env.STUDY_KEY;          // shown once when you created the study
const URL = "https://coinjure.fun/api/studies/YOUR-SLUG/push";

export async function push(findings) {
  const r = await fetch(URL, {
    method: "POST",
    headers: { "content-type": "application/json", "x-study-key": KEY },
    body: JSON.stringify({ findings }),
  });
  if (!r.ok) throw new Error(await r.text());
  return r.json(); // { ok: true, accepted: n, slug }
}

// inside your study loop:
await push([{ kind: "metric", title: "Graduation rate this week: 0.13%", value: 0.13, unit: "%" }]);
import os, requests
KEY = os.environ["STUDY_KEY"]
URL = "https://coinjure.fun/api/studies/YOUR-SLUG/push"

def push(findings):
    r = requests.post(URL, json={"findings": findings}, headers={"x-study-key": KEY}, timeout=15)
    r.raise_for_status()
    return r.json()

push([{"kind": "finding", "title": "Spread on SPY spot/perp: 3.0bps (0% past cost)", "value": 3.0, "unit": "bps"}])

Good studies