Skip to main content

Create Token

Launch a pump.fun coin without handing anyone a key. You generate the mint keypair on your machine and send only its public key; the returned transaction needs two signatures, your wallet's and the mint's, and you apply both locally. An optional initialBuy puts your dev buy in the same transaction so nobody can front-run the launch.

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

Request

FieldTypeNotes
publicKeystringCreator wallet. Fee payer, first signer, receives creator fees later.
mintstringPublic key of a keypair you generated. Second signer.
namestringUp to 32 bytes.
symbolstringUp to 13 bytes.
uristringMetadata JSON URL. Get one from upload-metadata below, or host it yourself.
initialBuynumberOptional dev buy in SOL, in the same transaction.
slippagenumberPercent, for the dev buy. Default 10.
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 quote-control list instead of SOL. initialBuy is then in that quote, and so is the fee.
mayhemModebooleanpump.fun mayhem mode for the coin.
holderRewardbooleanA holder rewards coin: the creator fee of every trade is set aside for the coin's holders and paid out by pump.fun. Permanent; there is nothing for the creator to claim afterwards, and creatorFeeAddress is not used as the recipient.
creatorFeeBpsnumberCustom pairs only (a quote other than SOL or USDC): the coin's own creator fee, up to pump.fun's current cap (300 today). SOL- and USDC-paired coins always use the standard schedule.
priorityFeenumberSOL.
jitoTipnumberSOL.

Every launch uses pump.fun's create_v2: the coin is a Token-2022 mint. With quoteMint set, the dev buy and every later trade settle in that quote, and the response carries quoteMint and feeMint. Allowed quotes are USDC and the mints on pump.fun's custom pairs list; anything else is refused before a transaction is built, as are cashback coins, which pump.fun no longer creates.

To launch and have other wallets buy in the same block, put the create in the first transaction of a bundle and the buys in the next ones, referring to the new coin by mintRef. A dev buy plus one more buy also fits in one multi-action transaction, on SOL and on a custom quote alike.

Upload metadata

POST https://sol.shrine.trade/api/upload-metadata pins the image and the metadata JSON through pump.fun's own IPFS endpoint and hands back the uri. Free.

{
"name": "My Coin",
"symbol": "COIN",
"description": "…",
"imageUrl": "https://…/logo.png",
"twitter": "https://x.com/…",
"telegram": "https://t.me/…",
"website": "https://…"
}

imageUrl is fetched by us (up to 8 MB); pass imageBase64 instead to send the bytes directly. The answer is { "uri": "https://ipfs.io/ipfs/…", "image": "https://ipfs.io/ipfs/…", "metadata": { … } }; put uri in the create request.

Example

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

const wallet = Keypair.fromSecretKey(bs58.decode(process.env.WALLET_SECRET));
const mint = Keypair.generate(); // keep this: it is the token's identity

const res = await fetch("https://sol.shrine.trade/api/create-token", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
publicKey: wallet.publicKey.toBase58(),
mint: mint.publicKey.toBase58(),
name: "My Coin",
symbol: "MINE",
uri: "https://ipfs.io/ipfs/<metadata json>",
initialBuy: 0.5,
slippage: 10,
priorityFee: 0.0005,
}),
});
const { tx } = await res.json();

const transaction = VersionedTransaction.deserialize(Buffer.from(tx, "base64"));
transaction.sign([wallet, mint]); // both signers, wallet first
const connection = new Connection(process.env.RPC_URL);
const sig = await connection.sendRawTransaction(transaction.serialize());
console.log(`https://solscan.io/tx/${sig}`);

Response

{
"tx": "<base64 unsigned transaction>",
"blockhash": "…",
"mint": "…",
"bondingCurve": "…",
"feeLamports": 1250000,
"signers": ["<wallet>", "<mint>"]
}

Fees

Creation itself is free apart from network rent. The dev buy pays the normal 0.25% trade fee, included in the transaction.

Try it

Builds the unsigned transaction only. Generate a throwaway mint keypair and paste its public key; nothing is created until you sign and submit.