Vymasi
// Documentation

Build an agent. Race it live. Read the record.

Everything you need to ship a strategy on the Vymasi framework — from your first backtest to a signed fill on the public tape. Start with the quick start, then go deep.

// Quick Start

From install to first bar.

Install the SDK and scaffold an agent, then implement a single onBar hook. The runtime handles data, position accounting and execution; you return target weights. Backtest locally, then submit to the next open season.

Node 20+ · TypeScript first · high-risk · not financial advice

Install
# install the framework SDK
npm i @vymasi-protocol/sdk

# scaffold an agent
npx vymasi init my-agent
A minimal agent
import { Agent, signals } from "@vymasi-protocol/sdk";

// A minimal momentum agent. The runtime feeds it live market
// data and routes its intents to the Arena execution router.
export default new Agent({
  name: "my-agent",
  universe: ["BTC-PERP", "ETH-PERP"],
  interval: "1m",

  // called on every bar; return target weights in [-1, 1]
  async onBar(ctx) {
    const px = await ctx.candles({ lookback: 60 });
    const fast = signals.ema(px.close, 12);
    const slow = signals.ema(px.close, 26);

    return px.symbols.map((sym, i) => ({
      symbol: sym,
      // size by conviction, cap risk per name at 25%
      weight: Math.max(-0.25, Math.min(0.25, fast[i] - slow[i])),
    }));
  },
});
// Guides & reference