Create a token
Launch a pons coin with a first buy in one transaction, and know its address before you sign.
Upload the image
Send it to POST /api/ipfs and take
metadata.imagefrom the answer.Ask for the create transaction
action: "create"withtokenMetadataand your dev buy in ETH.Send it
The answer already contains the coin's future address (
predicted.token).
POSThttps://api.trenchytools.lol/api/rh/trade-local
| Field | Type | Description |
|---|---|---|
| wallet | string | Your 0x address (the creator). |
| action | string | create. |
| tokenMetadata | object | { name, symbol, image, description?, twitter?, telegram?, website? }. |
| amount | number | Dev buy in ETH. Minimum 0.0001. |
| exemptWallets | string[] | Up to 31 wallets that skip the launch-window snipe tax (your other buyers). |
| slippage | number | Percent. 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 }
}