TrenchyToolsAPI

Create a token

Launch a pons coin with a first buy in one transaction, and know its address before you sign.

Also on Solana
  1. Upload the image

    Send it to POST /api/ipfs and take metadata.image from the answer.

  2. Ask for the create transaction

    action: "create" with tokenMetadata and your dev buy in ETH.

  3. Send it

    The answer already contains the coin's future address (predicted.token).

POSThttps://api.trenchytools.lol/api/rh/trade-local
FieldTypeDescription
walletstringYour 0x address (the creator).
actionstringcreate.
tokenMetadataobject{ name, symbol, image, description?, twitter?, telegram?, website? }.
amountnumberDev buy in ETH. Minimum 0.0001.
exemptWalletsstring[]Up to 31 wallets that skip the launch-window snipe tax (your other buyers).
slippagenumberPercent. Default 5.
JavaScript
const r = await fetch(`${BASE}/api/rh/trade-local?api-key=${API_KEY}`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    wallet: account.address,
    action: 'create',
    tokenMetadata: { name: 'My Coin', symbol: 'MYC', image: imageUrl, twitter: 'https://x.com/mycoin' },
    amount: 0.01,      // dev buy: 0.01 ETH
    slippage: 5,
  }),
}).then((r) => r.json())

console.log('your coin will be', r.predicted.token, '· pons launch fee', r.launchFeeEth, 'ETH')
for (const tx of r.transactions) {
  const hash = await wallet.sendTransaction({ to: tx.to, data: tx.data, value: BigInt(tx.value) })
  if (tx.label === 'create') await chain.waitForTransactionReceipt({ hash })
}
Response
{
  "chainId": 4663,
  "transactions": [ { "label": "create", "to": "0x…router", "value": "10500000000000000", … }, { "label": "fee", … } ],
  "predicted": { "token": "0x9a21…", "curve": "0x…" },
  "launchFeeEth": 0.0005,
  "expected": { "tokens": 5823000, "eth": 0.01 }
}