跳到主要内容

代币信息

免费、无需密钥的读取。用它决定交易什么,并在调用 local-trade 之前确定买入的大小。金额是基础单位的原始字符串(BNB 为 wei,代币为 18 位小数单位);以 Formatted 结尾的字段是可读的十进制数。

代币

GET https://api.shrine.trade/bnb/api/token/{address}
GET https://api.shrine.trade/bnb/api/token/{address}?wallet=0x…
const TOKEN = "0x2f1952E00F6BA7655993120B8c41E5ab511e7777";

async function main() {
const res = await fetch(`https://api.shrine.trade/bnb/api/token/${TOKEN}`);
const t = await res.json();
if (t.error) throw new Error(`${t.error}: ${t.message}`);

console.log(t.symbol, t.status, "| 场所:", t.venue, "| 进度:", t.progressPct.toFixed(1) + "%");
console.log("计价资产", t.quoteAsset.symbol, "| 税率:", t.buyTaxBps, "/", t.sellTaxBps, "bps");
if (t.tax) console.log("创作者已收到", t.tax.totalPaidToBeneficiary, t.quoteAsset.symbol);
}

main();

保存为 token.js,运行 node token.js,不需要任何依赖。

加上 ?wallet=0x… 可以得到该钱包的 buyQuotaRemaining。一个真实的返回:

{
"protocol": "FLAP",
"token": "0x2f1952E00F6BA7655993120B8c41E5ab511e7777",
"name": "星际巨舰",
"symbol": "星际巨舰",
"tokenType": "tax_v3",
"isTaxToken": true,
"status": "Tradable",
"graduated": false,
"venue": "flap_curve",
"quoteAsset": {
"address": "0x0000000000000000000000000000000000000000",
"symbol": "BNB",
"decimals": 18,
"isNative": true
},
"pairToken": "BNB",
"bnbBuysAccepted": true,
"quoteReserve": "7232115677198697",
"quoteReserveFormatted": "0.007232115677198697",
"circulatingSupply": "1058452331420000000000000",
"circulatingSupplyFormatted": "1058452.33142",
"graduationSupply": "800000000000000000000000000",
"graduationSupplyFormatted": "800000000",
"progressPct": 0.13,
"price": "5556337995",
"curveFeeBps": 125,
"shrineFeeBps": 50,
"buyTaxBps": 1000,
"sellTaxBps": 1000,
"tax": {
"buyTaxBps": 1000,
"sellTaxBps": 1000,
"beneficiary": "0xF31b8fcD326e0aD7837af0aefed60cC71Db82595",
"beneficiaryIsVault": false,
"marketingBps": 10000,
"deflationBps": 0,
"dividendBps": 0,
"lpBps": 0,
"totalPaidToBeneficiary": "0.027083340900000001",
"pendingForBeneficiary": "0",
"taxProcessor": "0xaa0093AC156cDd7FE16af7C0a8cEAF3C4b38F38e"
},
"curve": {
"r": "6140000000000000000",
"h": "107036752000000000000000000",
"k": "6797205657280000000000000000"
}
}
字段含义
tokenType / isTaxTokenstandard_v3tax_v3(更早的发射:tax_v1tax_v2legacy)。税币对每笔交易收取 buyTaxBps / sellTaxBps,付给 tax.beneficiary
status / graduated / venueFlap 的状态:内盘为 Tradable,毕业后为 DEXvenue 是此刻交易去的地方:flap_curvepancakeswap
quoteAsset / pairToken代币的计价资产:BNB,或某个 ERC-20(USD1、NVDAB 或 TSLAB 等代币化股票、另一个 Flap 代币)。decimals 不一定是 18,XAUT 是 6。完整列表见 支持的计价资产
bnbBuysAcceptedtrue 时可以直接用 BNB 买:BNB 计价的代币总是如此,ERC-20 计价的代币在 Flap 支持途中兑换时也是。为 false 则需持有计价资产并使用 payWithQuote
quoteReserve / circulatingSupply曲线持有的计价资产数量,以及已卖出的代币数量。
graduationSupply / progressPctcirculatingSupply 达到 graduationSupply(BNB 链上为 8 亿)时曲线毕业到 PancakeSwap。progressPct 是进度,毕业后为 100。
price每枚代币的计价资产价格,18 位定点数,按 Flap Portal 的报告。
curveFeeBps / shrineFeeBpsFlap 在内盘的费用(毕业后为 0)和我们的费用(0.5%)。
pool毕业后的 PancakeSwap 池子。
maxBuyPerWallet / buyQuotaRemaining代币限制单钱包买入量时出现。buyQuotaRemaining 需要 ?wallet=。超出上限的买入按上限成交,多余部分退回。
tax仅税币:税如何分配(给受益人、销毁、分给持有者、注入流动性),已付出多少,还有多少在等待。见 创作者收益
curveFlap 的恒定乘积参数 (x + h)(y + r) = k,供链下报价使用。每个代币固定不变。