{"openapi":"3.1.0","info":{"title":"Noon Barbari API","version":"1.0.0","description":"Read-only crypto backtesting data: indicator signals, buy-and-hold, DCA outcomes, the Deflated-Sharpe overfitting check, the monthly Crypto Overfitting Index, and the open curve-fitting dataset. All responses carry attribution; data is CC BY 4.0. Not financial advice.","contact":{"url":"https://noonbarbari.xyz"},"license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://api.noonbarbari.xyz/v1","description":"Production (canonical)"},{"url":"https://noonbarbari.xyz/v1","description":"Production (apex alias)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"nb_<env>_<token>","description":"Send 'Authorization: Bearer nb_live_…'. Create a key in your account."}}},"paths":{"/signals":{"get":{"summary":"Indicator signals","description":"Daily indicator readings for one coin (?coin=) or the whole 50-coin board.","parameters":[{"name":"coin","in":"query","required":false,"schema":{"type":"string","example":"btc"},"description":"Lower-case ticker (btc, eth, …)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/buy-hold":{"get":{"summary":"Buy-and-hold outcomes","description":"Per-year buy-and-hold outcome for a coin (buy at the first daily close of the year, held to today).","parameters":[{"name":"coin","in":"query","required":true,"schema":{"type":"string","example":"btc"},"description":"Lower-case ticker (btc, eth, …)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/dca":{"get":{"summary":"Dollar-cost-averaging outcome","parameters":[{"name":"coin","in":"query","required":true,"schema":{"type":"string","example":"btc"},"description":"Lower-case ticker (btc, eth, …)."},{"name":"amount","in":"query","schema":{"type":"number","default":100},"description":"USD per purchase."},{"name":"frequency","in":"query","schema":{"type":"string","enum":["weekly","monthly"],"default":"weekly"}},{"name":"start_date","in":"query","schema":{"type":"string","format":"date"},"description":"Optional ISO start date."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/overfitting":{"post":{"summary":"Deflated Sharpe Ratio on your own numbers","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sharpe","length_days","n_trials"],"properties":{"sharpe":{"type":"number","description":"Annualised Sharpe ratio."},"timeframe":{"type":"string","enum":["1h","4h","1d","1w"],"default":"1d"},"length_days":{"type":"number","description":"Backtest length in days."},"n_trials":{"type":"integer","description":"How many variants you tried."},"skew":{"type":"number","default":0},"kurtosis":{"type":"number","default":3}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/overfitting-index":{"get":{"summary":"Crypto Overfitting Index","description":"The monthly Crypto Overfitting Index, current value plus history.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/dataset":{"get":{"summary":"Query the curve-fitting study","description":"Filter the open 11,440-run curve-fitting dataset. Returns headline overfitting stats plus matching per-template/coin picks.","parameters":[{"name":"template","in":"query","schema":{"type":"string","example":"super_trend"}},{"name":"coin","in":"query","required":false,"schema":{"type":"string","example":"btc"},"description":"Lower-case ticker (btc, eth, …)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/strategies":{"get":{"summary":"Strategy template catalogue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/backtests":{"post":{"summary":"Run a backtest (async, paid plans)","description":"Enqueue a real backtest of a house template from a start date; returns a job id to poll. Paid plans only; charged the plan's backtest_units and capped by per-plan concurrency. Backtest only — never live execution.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["strategy","start_date"],"properties":{"strategy":{"type":"string","description":"Template name from GET /strategies, e.g. super_trend."},"coin":{"type":"string","description":"Optional coin ticker to run the template on (from GET /signals); default btc.","example":"eth"},"start_date":{"type":"string","format":"date","example":"2022-01-01"},"starting_cash":{"type":"number","default":10000,"minimum":1,"maximum":1000000}}}}}},"responses":{"200":{"description":"Job queued (data.job_id + poll_url)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"403":{"description":"Backtest requires a paid plan","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Concurrency cap or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}},"/backtests/{id}":{"get":{"summary":"Poll a backtest job","description":"Owner-scoped. status is queued|running|done|error; result is populated when done. Polling is not charged against the monthly quota.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Endpoint payload (attribution + fields)."},"meta":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"404":{"description":"No such job","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri"}}}}}}}}}}}}}