HELIX// sdk home trade explorer docs stats leaderboard risk receipts market copytrade
SDK download
SDK

HELIX-SDK · 5KB · zero deps. — bots, indexers, paper-trade rigs.

browser + node · works in mock and chain modes identically

Install

// browser (no bundler)
<!-- drop into any HTML -->
<script src="https://skew-production.up.railway.app/helix-sdk.js"></script>
// node
// download once
$ curl -O https://skew-production.up.railway.app/helix-sdk.js

// then in your bot
const Helix = require("./helix-sdk.js").Helix;

Read example

const helix = new Helix({ baseUrl: "https://skew-production.up.railway.app" });

const markets = await helix.getMarkets();
// → array of 24 perp markets with mark px, funding, OI, vol

const boot = await helix.getBootstrap();
// → { active, filledUsdc, capUsdc, multiplier, vestingDays, ... }

const positions = await helix.getPositions("0x…wallet");
// → user's open positions, key'd by market
click to fetch /api/markets through the SDK…

Write example · open a position

The SDK is mode-agnostic: in mock mode the server simulates the order; in chain mode the server returns unsigned tx calldata which the SDK forwards to your signer.

// 1. wallet/signer adapter — wraps window.ethereum or any EIP-1193 provider
const signer = Helix.eip1193Signer(window.ethereum, "0xYour…Wallet");

// 2. instantiate
const helix = new Helix({
  baseUrl: "https://skew-production.up.railway.app",
  signer: signer,
  wallet: "0xYour…Wallet",
});

// 3. open a 10× long on ETH-PERP with 1000 USDC margin
const r = await helix.openPosition({
  market: "ETH-PERP",
  side: "LONG",
  margin: 1000,
  leverage: 10,
});

// → r.mode = "mock" | "chain"
//   r.hash    (chain mode) tx hash
//   r.receipt (mock mode)  simulated order
click to simulate an order (mock mode)…

HLP bootstrap example

// deposit 5000 USDC with a referrer for the 10% kickback
const r = await helix.hlpDeposit(5000, "0xReferrerAddress");
// → .deposit.shares · HLP shares minted
//   .deposit.bootstrap.helixEmitted · vested $HELIX
//   .deposit.bootstrap.referrerKickback · paid to referrer

Full reference

// reads
getHealth()
getStats()
getMarkets()
getMarket(sym)
getFunding()
getTrades(limit)
getLiquidations(limit)
getHLP()
getBootstrap()
getToken()
getPositions(wallet)
// writes (need signer in chain mode)
openPosition({ market, side,
               margin, leverage })
closePosition(market, closePct)
hlpDeposit(amount, referrer?)
hlpWithdraw(shares)

// signer adapter
Helix.eip1193Signer(provider, addr)

HELIX-SDK v0.1.0 · 5KB minified · ISC license · source /helix-sdk.js