NovaMarketLabs
Docs · API reference

Docs

REST API, SDK, programmatic trading and agent-integration reference. New here? See “Build by market” on the home page.

What NovaMarket Labs gives you

Labs is the research-and-build side of NovaMarket: design strategies, backtest them deterministically, share them, and turn the good ones into trading programs. Labs holds no funds — live capital lives on the main site.

Strategy library

Browse published & verified strategies with real backtest curves; fork any one into your studio.

Dev Studio

Write Python in a classic or IDE (vibe) shell, backtest in a sandbox, read validation-tail metrics, keep a version history, then publish.

Trading programs

Turn a validated strategy into a program (hosted or self-hosted); pick a claimable pool and go live on the main site.

Community

Likes, comments, author follows and forks — with de-identified authorship.

Backtest engine

Deterministic sim, real Hyperliquid & on-chain Uniswap (spot) history, real Polymarket events, and universe feeds; grid/random parameter search, walk-forward validation tail, taker fees + slippage, per-fill blotter.

AI copilot

Streamed chat, optimize/explain/generate, per-hunk inline diff and ⌘I ghost-text — every AI edit lands as a diff you confirm.

Ways to build

Pick the surface that fits how you work — every path shares one backtest engine and one strategy model.

Online Dev Studio

No install — write & backtest in the browser

  • Classic UI: form + cards, high information density
  • Vibe UI: IDE layout — file tree, big editor, ⌘K palette, terminal console
  • Switch anytime; your preference is remembered
  • Same save / backtest / publish under both skins

Local SDK

Your editor, your repo

  • pip install nova-strategy-sdk
  • Same StrategyBase interface as the studio
  • Backtest & iterate offline; open-source (MIT)

REST API + agents

Read pools & params programmatically

  • Anonymous GET, JSON, RFC 7807 errors
  • OpenAPI 3.1 + llms.txt + agents.json discovery
  • Authenticated order placement for operators

Trading programs

From strategy to live execution

  • Hosted: the platform runs your core
  • Self-hosted: download a starter bundle and run it yourself; orders queue to the platform executor
  • Live deploy (mint operator, bind pool, fund) happens on the main site

AI copilot — use cases

The studio assistant shares your current code, latest backtest metrics and lint errors. Four modes, one context:

🤖 ChatAsk anything

When

Stuck on the SDK, an indicator, or why a trade didn't fill

Example

“How do I add an ATR-based stop to this strategy?” — a streamed answer that already sees your code.

✨ SuggestOptimize

When

The backtest runs but Sharpe is weak or drawdown is deep

Example

Returns a summary + concrete suggestions + revised code you review in a diff, then “Apply & backtest” in one click.

📊 AnalyzeExplain the backtest

When

You have a result and want to know what drove it

Example

A structured read-out: verdict, drivers, risks (e.g. in-sample vs validation-tail overfitting), next steps.

🛠 GenerateIdea → skeleton

When

You know the idea in words, not code yet

Example

“Mean-reversion on ETH using a 20-bar z-score, long below -2, exit at 0.” → a lint-checked StrategyBase draft you confirm in a diff.

AI never edits your code silently — generated or revised code always lands as a diff you confirm before it touches the editor.

NovaMarket Agent API

A public read-only API for AI agents and developers: read pools, params, balances and settlements directly. All GET, anonymous, JSON; amounts are USDC base units (decimals: 6, big integers returned as strings); errors follow RFC 7807. No write/trade operations.

Read-only · no auth · CORS

Machine-discoverable

Endpoints

GET/api/v1/protocolPlatform metadata: brand, chain, contracts, markets, discovery links
GET/api/v1/contractsDeployed contract addresses
GET/api/v1/marketsSupported markets (HL/PM/UNI) and coming soon
GET/api/v1/healthChain reachability & config status
GET/api/v1/poolsAll pools: params + live balances
GET/api/v1/pools/{address}A single pool's details
GET/api/v1/pools/{address}/settlementsRecent on-chain settlements (best-effort)

Base URL: https://novamarket.io/api/v1

curl

curl https://novamarket.io/api/v1/pools

JavaScript

const r = await fetch("https://novamarket.io/api/v1/pools");
const { items } = await r.json();
console.log(items[0].balances.investorNav); // USDC base units (string)

Python

import httpx
r = httpx.get("https://novamarket.io/api/v1/pools").json()
for p in r["items"]:
    print(p["strategy"]["label"], p["status"]["name"])

Integration notes for AI agents

  • Discovery: fetch /.well-known/agents.json for capabilities and OpenAPI/llms links.
  • Context: read /llms.txt (concise) or /llms-full.txt (with mechanism notes).
  • Data: /api/v1/pools to list, /pools/{address} for details, /settlements for settlements.
  • Fields: bps is basis points (1500=15%); status 0 Funding / 1 Awaiting operator / 2 Active / 3 Halted / 4 Closed; market 0 HL / 1 PM / 2 UNI.

Investor deposits/stakes go through on-chain signed transactions. Operators and program operators can place orders programmatically with an API key (see the trading section below). Read-only data here is not investment advice. Mechanism

Programmatic trading (operators & programs)

Any pool operator — a human wallet or a program EOA — can trade through the same authenticated API. Mint an API key (or a program key on the program console), then call the pool trading endpoints with a Bearer header.

curl

# place an order (operator API key; queued to the executor)
curl -X POST https://novamarket.io/api/pools/0xPOOL/orders \
  -H "Authorization: Bearer nm_xxxxxxxx_..." \
  -H "Content-Type: application/json" \
  -d '{"symbol":"ETH","side":"BUY","size":0.5,"clientOrderId":"my-uuid-1"}'

# poll the result / live snapshots
curl -H "Authorization: Bearer nm_xxxxxxxx_..." \
  https://novamarket.io/api/pools/0xPOOL/positions

Queue semantics: POST /orders returns 201 with a PENDING order — the platform executor routes it to the venue on its next ~30s cycle. 201 means queued, not filled; poll GET /orders/{id} or the SSE /stream for the result. clientOrderId makes retries idempotent.

Auth: the same Authorization: Bearer header accepts an API key (nm_…) or a SIWE session JWT (POST /api/auth/nonce → sign → POST /api/auth/verify returns the token). Keys are minted from a logged-in session only.

Common errors

  • 401 unauthenticated — missing/invalid key or session
  • 403 not operator — the caller is not the pool's on-chain operator (or the key isn't scoped to this pool)
  • 409 conflict — pool not Active or no venue credential
  • 200 — duplicate clientOrderId: idempotent dedup, returns the original order
Operators placing orders programmatically → get an API key

Strategy SDK

Quant developers write one strategy class and run the same logic in deterministic backtests and on real venues. A strategy's name is the pool's on-chain strategyType — declaring/accepting a pool with that name means you operate with it. Strategies are developer-defined; the platform presets none.

SDK source · README
$pip install nova-strategy-sdk
from strategy_sdk import StrategyBase, register, indicators as ind

@register("MyTrend")                  # name = on-chain strategyType
class MyTrend(StrategyBase):
    params = {"fast": 10, "slow": 30, "size": 5.0}
    async def on_tick(self, ctx):     # called every tick
        sym = ctx.conn_symbol()
        hist = await ctx.history(sym, 31)
        f, s = ind.ema(hist, 10), ind.ema(hist, 30)
        if f and s:
            await ctx.target(sym, 5.0 if f > s else 0.0)   # move to target position

# Backtest:  fp-strategy backtest MyTrend --seed 7 --steps 300

ctx provides price/history/position/equity and buy/sell/target/flatten (with max_position/max_order risk clamps); indicators include sma/ema/rsi/zscore/bollinger/atr. Backtest with the built-in deterministic simulator (seeded GBM, reproducible) or real Hyperliquid candles.

Trendfast / slow / size

EMA fast/slow crossover: long in an uptrend, else flat

Backtest 240 stepsReturn 8.78%Sharpe 1.65Max drawdown 2.28%
Mean reversionwindow / k / size

z-score buys dips below mean, exits on reversion

Backtest 240 stepsReturn 3.73%Sharpe 1.72Max drawdown 1.31%
Market makingref_window / max_inventory / spread

inventory skew around mid: hold more when cheaper

Backtest 240 stepsReturn 3.00%Sharpe 1.91Max drawdown 0.54%
Gridgrid_pct / levels / unit

even grid in a range: add a step on each drop, trim on each rise

Backtest 240 stepsReturn 1.62%Sharpe 1.64Max drawdown 0.41%

Backtest curves are examples on a deterministic simulated price path (same path), to illustrate behavior — not real returns.