Skip to main content

Create Token

PumpFun
StonkFun

Send the coin's name, symbol and image. You get back the create transaction, with your dev buy inside it if you want one, and the coin gets an address ending in pump. Sign with your wallet, send it, done. The image and details are uploaded for you; your keys never leave your machine.

POST https://sol.shrine.trade/api/create-token

Example​

import { Keypair, VersionedTransaction } from "@solana/web3.js";
import bs58 from "bs58";

const wallet = Keypair.fromSecretKey(bs58.decode("<your wallet private key, base58>"));

const { tx, mint } = await (await fetch("https://sol.shrine.trade/api/create-token", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
publicKey: wallet.publicKey.toBase58(),
name: "My Coin",
symbol: "MINE",
description: "What it is, in a sentence.",
imageUrl: "https://…/logo.png",
twitter: "https://x.com/…",
initialBuy: 0.5, // the dev buy, in the same transaction
}),
})).json();

const transaction = VersionedTransaction.deserialize(Buffer.from(tx, "base64"));
transaction.sign([wallet]); // the mint's signature is already in place

const sent = await (await fetch("https://sol.shrine.trade/api/send", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ signedTx: Buffer.from(transaction.serialize()).toString("base64") }),
})).json();
console.log(mint, sent.status, `https://solscan.io/tx/${sent.signature}`);
This launches a real coin

A create that lands is a coin on mainnet, with your wallet as its creator, for good. Try it with a throwaway wallet first.

Request​

FieldTypeNotes
publicKeystringCreator wallet. Signs, pays, and collects the creator fees later.
namestringUp to 32 bytes.
symbolstringUp to 13 bytes.
imageUrlstringThe coin's image, fetched by the API (up to 8 MB). Or imageBase64 with the bytes.
descriptionstringOptional.
twitter, telegram, websitestringOptional links.
initialBuynumberOptional dev buy in SOL, in the same transaction, so nobody can front-run the launch.
slippagenumberPercent, for the dev buy. Default 10.
uristringOptional. Already have a metadata JSON hosted? Pass its address instead of the image and links.
mintstringOptional. The public key of a mint keypair you generated yourself; it then signs too. Leave it out for an address ending in pump, already signed for in tx.
creatorFeeAddressstringOptional. The wallet that collects the creator's share of trading fees. Defaults to publicKey.
quoteMintstringOptional. Price the coin in USDC or any mint on pump.fun's custom pairs list instead of SOL. initialBuy and the fee are then in that quote.
mayhemModebooleanpump.fun mayhem mode.
holderRewardbooleanThe creator fee of every trade goes to the coin's holders, paid out by pump.fun. Permanent.
creatorFeeBpsnumberCustom pairs only: the coin's own creator fee, up to pump.fun's cap (300 today).
priorityFeenumberSOL.
jitoTipnumberSOL.

Response​

{
"tx": "<base64, signed by the mint, waiting for your wallet>",
"mint": "…pump",
"mintSecretKey": "…",
"bondingCurve": "…",
"feeLamports": 1250000,
"signers": ["<wallet>", "<mint>"]
}

When the launch and its dev buy do not fit one transaction, the answer also carries buyTx, the dev buy on the same blockhash: send tx then buyTx, or both as one bundle. To have other wallets buy in the launch block, put the create first in a bundle and refer to the coin by mintRef in the buys; a dev buy plus one more buy also fits one multi-action transaction.

Launch on StonkFun​

StonkFun launches coins priced in tokenised stocks, pre-IPO stocks, currencies or SOL. Their hosted flow is wrapped here: you get a quote, sign one payment transaction, StonkFun mints and lists the coin. Trading it afterwards is the trade endpoint like any other coin.

  1. GET /api/stonkfun/pairs lists what a launch may be priced in; pick a quoteMint from it.
  2. POST /api/stonkfun/launch with publicKey, quoteMint, name, symbol, logo (a data URL), mode (standard or reward) and devBuySol or devBuyPercent. The answer carries paymentTransaction, signedQuote and expiresAt.
  3. Sign paymentTransaction within ten minutes and POST /api/stonkfun/launch/submit with { "signedQuote", "signedTransaction", "logo" }; poll GET /api/stonkfun/launch/{paymentSignature} until completed.

StonkFun sets the launch fee (about 0.29 SOL, in payment.feeSol); shrine takes nothing on a launch. Never pay twice: a second payment is a second coin.

Try it​

Drop the coin's image, fill in the name and symbol, paste your wallet private key, and press Launch. The key stays in your browser: it signs there, and only the signed transaction goes to the relay. The image and details are uploaded for you. This launches a real coin on mainnet.

LimitsFree 1 req/sLite 3 req/sDeveloper 5 req/sSee plans →