SDK · Developers

Build on HedgeFUN.

Read every portfolio, its composition, participants and verified activity, plus live market data, from a public JSON API. Use the typed client or call it directly.

01 · Quickstart

Three calls to everything.

  • No keyRead endpoints are public and CORS-enabled.
  • TypedOne dependency-free TypeScript file, browser or Node 18+.
  • VerifiedEverything listed was confirmed on-chain before it was stored.
ts
import { HedgeFun } from "./hedgefun";

const hf = new HedgeFun();

// Every deployed portfolio, with its composition and fee mandate
const portfolios = await hf.portfolios();

// Live market data for each portfolio token
const quotes = await hf.quotes(portfolios.map((p) => p.mint));

// Verified on-chain activity for one portfolio
const activity = await hf.activity(portfolios[0]?.mint);
02 · Reference

API reference.

Base URL https://www.hedgefun.online

GET/api/universe

Asset universe

client: hf.assets()

Every asset a portfolio can hold: tokenized equities, pre-IPO tokens, live Pump.fun leaders and SOL, with live price, 24h change and liquidity.

GET/api/launches

Portfolios

client: hf.portfolios()

Every portfolio deployed through HedgeFUN: composition and weights, participant wallets, fee mandate, socials and deployment time. Only on-chain-verified deployments are listed.

GET/api/ledger

Activity record

client: hf.activity(mint)

Verified activity per portfolio: deployment, participant allocations, fee collections, reinvestment swaps and buybacks, each with its Solana signature.

mint
Optional. Limit to one portfolio token.
GET/api/market

Market data

client: hf.quotes([mint]) · hf.chart(mint)

Live quotes (price, market cap, 24h change, volume, liquidity) for up to 60 mints. Add chart=1 with a single mint for 15-minute candles.

mints
Comma-separated token mints (max 60).
mint + chart=1
One mint, returns quote plus candles.
POST/api/launches

Register a deployment

Records a deployment after verifying its create transaction on-chain: it succeeded, called the Pump.fun program and touched the mint. Sends nothing on-chain itself.

mint, signature
Token mint and the confirmed create transaction.
basket, wallets, fees
Composition, participant wallets and fee mandate.
POST/api/ledger

Record activity

Adds a verified entry to a portfolio's activity record. The signer must be the right party: the creator for collections, reinvestment and buybacks; a declared participant for allocations.

mint, kind, signature, amountSol
kind is mini-buy, collect, basket-buy or buyback.
03 · Deployment

How a portfolio deploys.

A HedgeFUN deployment is a standard Pump.fun token created with the official Pump.fun SDK, signed by the creator's wallet. The mint key is generated client-side. Allocation wallets receive their share in transactions approved alongside the create.

Transactions are capped at 1,232 bytes, so keep names short if you add priority-fee instructions. Simulate before asking the wallet to sign.

ts
import { OnlinePumpSdk, PUMP_SDK, getBuyTokenAmountFromSolAmount } from "@pump-fun/pump-sdk";
import { Connection, Keypair, LAMPORTS_PER_SOL, PublicKey, Transaction } from "@solana/web3.js";
import BN from "bn.js";

// 1. Host token metadata (name, symbol, image, description) at any https URI.
// 2. Build create_v2 + the initial position, signed by a fresh mint key.
const sdk = new OnlinePumpSdk(connection);
const global = await sdk.fetchGlobal();
const mint = Keypair.generate();
const solAmount = new BN(0.25 * LAMPORTS_PER_SOL);
const amount = getBuyTokenAmountFromSolAmount({
  global, feeConfig: await sdk.fetchFeeConfig(), mintSupply: null,
  bondingCurve: null, amount: solAmount, quoteMint: PublicKey.default,
});
const ixs = await PUMP_SDK.createV2AndBuyInstructions({
  global, mint: mint.publicKey, name, symbol, uri,
  creator: owner, user: owner, amount, solAmount,
  mayhemMode: false, holderReward: false,
});

// 3. Simulate, have the creator's wallet sign, send and confirm.
// 4. POST /api/launches with { mint, signature, basket, wallets, fees } to list it.