Claim Creator Fees
If you launched a token, every trade on it earns you a share: what's left of the trading fee after Pons's 30%, plus all of your creator tax. It isn't sent to you automatically - you claim it. Two endpoints, free and keyless.
What's waiting
GET https://api.shrine.trade/evm/api/fees/{wallet}?token={yourToken}
{
"wallet": "0xfc1FFd8b43631Ba04a347FAF930fA1Dc547BFcb2",
"escrow": "0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9e",
"asset": "USDG",
"decimals": 6,
"claimable": "39388954",
"claimableFormatted": "39.388954",
"unswept": "1935146",
"unsweptFormatted": "1.935146",
"total": "41324100",
"totalFormatted": "41.3241",
"hasClaimable": true
}
total is what a claim pays out right now, in the launch's quote asset (asset). claimable is already in Pons's escrow; unswept is still on the token's curve and gets collected as part of the claim. hasClaimable: false means don't bother - you'd only pay gas.
Leave token out to see just the ETH escrow balance.
Claim it
POST https://api.shrine.trade/evm/api/claim-fees
Send { "from": "0x…", "token": "0x…" } - your wallet and your launched token - and you get back the transactions that pay everything out to your wallet: one or two, send them in order.
- JavaScript
- Python
const { JsonRpcProvider, Wallet } = require("ethers");
// ─── change these ─────────────────────────────────────
const PRIVATE_KEY = "0xYOUR_PRIVATE_KEY";
const TOKEN = "0xYOUR_LAUNCHED_TOKEN";
// ──────────────────────────────────────────────────────
async function main() {
const wallet = new Wallet(
PRIVATE_KEY,
new JsonRpcProvider("https://rpc.mainnet.chain.robinhood.com", 4663),
);
// 1. Ask shrine.trade to build the claim.
const res = await fetch("https://api.shrine.trade/evm/api/claim-fees", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ from: wallet.address, token: TOKEN }),
});
const data = await res.json();
if (data.error) throw new Error(`${data.error}: ${data.message}`);
console.log("claiming", data.claimingFormatted, data.asset);
// 2. Sign locally and send, in order - the key never leaves this script.
for (const tx of data.txs) {
const sent = await wallet.sendTransaction({
to: tx.to,
data: tx.data,
value: BigInt(tx.value),
gasLimit: BigInt(tx.gas),
maxFeePerGas: BigInt(tx.maxFeePerGas),
maxPriorityFeePerGas: BigInt(tx.maxPriorityFeePerGas),
nonce: tx.nonce,
});
await sent.wait();
console.log(tx.description + ": https://robinscan.io/tx/" + sent.hash);
}
}
main();
Save it as claim.js, then:
npm install ethers
node claim.js
import requests
from web3 import Web3
# ─── change these ─────────────────────────────────────
PRIVATE_KEY = "0xYOUR_PRIVATE_KEY"
TOKEN = "0xYOUR_LAUNCHED_TOKEN"
# ──────────────────────────────────────────────────────
w3 = Web3(Web3.HTTPProvider("https://rpc.mainnet.chain.robinhood.com"))
account = w3.eth.account.from_key(PRIVATE_KEY)
# 1. Ask shrine.trade to build the claim.
data = requests.post(
"https://api.shrine.trade/evm/api/claim-fees",
json={"from": account.address, "token": TOKEN},
).json()
if "error" in data:
raise SystemExit(f"{data['error']}: {data['message']}")
print("claiming", data["claimingFormatted"], data["asset"])
# 2. Sign locally and send, in order - the key never leaves this script.
for tx in data["txs"]:
signed = w3.eth.account.sign_transaction(
{
"to": tx["to"],
"data": tx["data"],
"value": int(tx["value"]),
"gas": tx["gas"],
"maxFeePerGas": int(tx["maxFeePerGas"]),
"maxPriorityFeePerGas": int(tx["maxPriorityFeePerGas"]),
"nonce": tx["nonce"],
"chainId": tx["chainId"],
},
account.key,
)
h = w3.eth.send_raw_transaction(signed.raw_transaction)
w3.eth.wait_for_transaction_receipt(h)
print(tx["description"] + ":", f"https://robinscan.io/tx/0x{h.hex().removeprefix('0x')}")
Save it as claim.py, then:
pip install web3 requests
python claim.py
Notes
- Only the
creatorFeeRecipientcan claim - your wallet unless you set another at launch./api/token/{address}shows which. - Launches priced in an ERC-20 (USDG, NVDA, …) pay out in that asset. Pass the launched token and the API works out the rest.
- Launched with buybacks on? Then Pons collects the curve's fees for you on its own schedule, and the claim covers what has arrived in the escrow so far.
nothing_to_claimtells you when the rest is still on the curve. - These are Pons's fees to you as a creator. Our 1% is separate and never touches this escrow.