xxyy-trade

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

XXYY Trade

XXYY 交易功能

On-chain token trading and data queries on Solana, Ethereum, BSC, and Base via XXYY Open API.
通过XXYY Open API在Solana、Ethereum、BSC和Base链上实现链上token交易与数据查询。

Prerequisites

前置条件

Set environment variables before use:
  • XXYY_API_KEY
    (required) -- Your XXYY Open API Key (format:
    xxyy_ak_xxxx
    ). How to get one: visit https://xxyy.io, register and log in, click the 9-dot grid icon in the top toolbar to open the API Key management page, then generate a new API Key.
  • XXYY_API_BASE_URL
    (optional) -- API base URL, defaults to
    https://www.xxyy.io
使用前需设置环境变量:

Authentication

身份验证

All requests require header:
Authorization: Bearer $XXYY_API_KEY
所有请求都需要携带请求头:
Authorization: Bearer $XXYY_API_KEY

API Reference

API 参考

Buy Token

购买Token

POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap
json
{
  "chain": "sol",
  "walletAddress": "<user_wallet>",
  "tokenAddress": "<token_contract>",
  "isBuy": true,
  "amount": 0.1,
  "tip": 0.001,
  "slippage": 20
}
POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap
json
{
  "chain": "sol",
  "walletAddress": "<user_wallet>",
  "tokenAddress": "<token_contract>",
  "isBuy": true,
  "amount": 0.1,
  "tip": 0.001,
  "slippage": 20
}

Buy Parameters

购买参数

ParamRequiredTypeValid valuesDescription
chain
YESstring
sol
/
eth
/
bsc
/
base
Only these 4 values accepted
walletAddress
YESstringSOL: Base58 32-44 chars; EVM: 0x+40hexWallet address on XXYY platform, must match chain
tokenAddress
YESstringValid contract addressToken contract address to buy
isBuy
YESboolean
true
Must be true for buy
amount
YESnumber> 0Amount in native currency (SOL/ETH/BNB)
tip
YESnumberSOL: 0.001-0.1 (unit: SOL); EVM: 0.1-100 (unit: Gwei)Priority fee for all chains. If not provided, falls back to priorityFee
slippage
NOnumber0-100Slippage tolerance %, default 20
model
NOnumber1 or 21=anti-sandwich (default), 2=fast mode
priorityFee
NOnumber>= 0Solana chain only. Extra priority fee in addition to tip
参数是否必填类型有效值描述
chain
string
sol
/
eth
/
bsc
/
base
仅接受这4个值
walletAddress
stringSOL: Base58格式32-44字符;EVM: 0x开头+40位十六进制字符XXYY平台上的钱包地址,必须与所选链匹配
tokenAddress
string有效的合约地址要购买的Token合约地址
isBuy
boolean
true
购买操作必须设为true
amount
number> 0原生货币(SOL/ETH/BNB)的数量
tip
numberSOL: 0.001-0.1(单位:SOL);EVM: 0.1-100(单位:Gwei)所有链的优先手续费。若未提供,将回退使用priorityFee
slippage
number0-100滑点容忍百分比,默认20
model
number1或21=防三明治攻击(默认),2=快速模式
priorityFee
number>= 0仅Solana链有效。在tip之外额外支付的优先手续费

Sell Token

出售Token

POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap
json
{
  "chain": "sol",
  "walletAddress": "<user_wallet>",
  "tokenAddress": "<token_contract>",
  "isBuy": false,
  "amount": 50,
  "tip": 0.001
}
POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap
json
{
  "chain": "sol",
  "walletAddress": "<user_wallet>",
  "tokenAddress": "<token_contract>",
  "isBuy": false,
  "amount": 50,
  "tip": 0.001
}

Sell Parameters

出售参数

ParamRequiredTypeValid valuesDescription
chain
YESstring
sol
/
eth
/
bsc
/
base
Only these 4 values accepted
walletAddress
YESstringSOL: Base58 32-44 chars; EVM: 0x+40hexWallet address on XXYY platform, must match chain
tokenAddress
YESstringValid contract addressToken contract address to sell
isBuy
YESboolean
false
Must be false for sell
amount
YESnumber1-100Sell percentage. Example: 50 = sell 50% of holdings
tip
YESnumberSOL: 0.001-0.1 (unit: SOL); EVM: 0.1-100 (unit: Gwei)Priority fee for all chains. If not provided, falls back to priorityFee
slippage
NOnumber0-100Slippage tolerance %, default 20
model
NOnumber1 or 21=anti-sandwich (default), 2=fast mode
priorityFee
NOnumber>= 0Solana chain only. Extra priority fee in addition to tip
参数是否必填类型有效值描述
chain
string
sol
/
eth
/
bsc
/
base
仅接受这4个值
walletAddress
stringSOL: Base58格式32-44字符;EVM: 0x开头+40位十六进制字符XXYY平台上的钱包地址,必须与所选链匹配
tokenAddress
string有效的合约地址要出售的Token合约地址
isBuy
boolean
false
出售操作必须设为false
amount
number1-100出售持仓的百分比。示例:50 = 出售50%的持仓
tip
numberSOL: 0.001-0.1(单位:SOL);EVM: 0.1-100(单位:Gwei)所有链的优先手续费。若未提供,将回退使用priorityFee
slippage
number0-100滑点容忍百分比,默认20
model
number1或21=防三明治攻击(默认),2=快速模式
priorityFee
number>= 0仅Solana链有效。在tip之外额外支付的优先手续费

tip / priorityFee Rules

tip / priorityFee 规则

  • tip
    (required) -- Universal priority fee for ALL chains. EVM chains (eth/bsc/base) use tip as the priority fee. If tip is not provided, the API falls back to priorityFee.
    • SOL chain: unit is SOL (1 = 1 SOL, very expensive). Recommended range: 0.001 - 0.1
    • EVM chains (eth/bsc/base): unit is Gwei. Recommended range: 0.1 - 100
  • priorityFee
    (optional) -- Only effective on Solana chain. Solana supports both tip and priorityFee simultaneously.
  • tip
    (必填)——所有链通用的优先手续费。EVM链(eth/bsc/base)将tip作为优先手续费。若未提供tip,API将回退使用priorityFee。
    • SOL链:单位为SOL(1 = 1 SOL,费用极高)。推荐范围:0.001 - 0.1
    • EVM链(eth/bsc/base):单位为Gwei。推荐范围:0.1 - 100
  • priorityFee
    (可选)——仅对Solana链有效。Solana支持同时使用tip和priorityFee。

Query Trade

查询交易记录

GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/trade?txId=<tx_id>
Response fields: txId, status (pending/success/failed), statusDesc, chain, tokenAddress, walletAddress, isBuy, baseAmount, quoteAmount
GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/trade?txId=<tx_id>
响应字段:txId, status(pending/success/failed), statusDesc, chain, tokenAddress, walletAddress, isBuy, baseAmount, quoteAmount

Ping

心跳检测(Ping)

GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/ping
Returns "pong" if API key is valid.
GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/ping
如果API密钥有效,将返回"pong"。

Feed (Scan Tokens)

Feed(Token扫描)

POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/feed/{type}?chain={chain}
Retrieve Meme token lists: newly launched, almost graduated, or graduated.
POST ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/feed/{type}?chain={chain}
获取Meme Token列表:新上线、即将毕业、已毕业。

Path & Query Parameters

路径与查询参数

ParamRequiredTypeValid valuesDescription
type
YESpath string
NEW
/
ALMOST
/
COMPLETED
NEW = newly launched, ALMOST = almost graduated, COMPLETED = graduated
chain
NOquery string
sol
/
bsc
Only these 2 chains supported. Default
sol
参数是否必填类型有效值描述
type
路径字符串
NEW
/
ALMOST
/
COMPLETED
NEW = 新上线,ALMOST = 即将毕业,COMPLETED = 已毕业
chain
查询字符串
sol
/
bsc
仅支持这2条链。默认
sol

Body (Filter Parameters)

请求体(过滤参数)

All filters are optional. Range parameters use comma-separated string format
"min,max"
. Leave one side empty to set only min or max (e.g.
"100,"
= min 100,
",50"
= max 50).
ParamTypeDescriptionExample
dex
string[]DEX platform filterSee DEX Values by Chain below
quoteTokens
string[]Quote token filterSee quoteTokens Values by Chain below
link
string[]Social media link filter
["x","tg","web"]
keywords
string[]Token name/symbol keyword match
["pepe","doge"]
ignoreWords
string[]Ignore keywords
["scam"]
mc
stringMarket cap range (USD)
"10000,500000"
liq
stringLiquidity range (USD)
"1000,"
vol
stringTrading volume range (USD)
"5000,100000"
holder
stringHolder count range
"50,"
createTime
stringCreation time range (minutes from now)
"1,20"
tradeCount
stringTrade count range
"100,"
buyCount
stringBuy count range
"50,"
sellCount
stringSell count range
"10,"
devBuy
stringDev buy amount range (native token)
"0.001,"
devSell
stringDev sell amount range (native token)
"0.001,"
devHp
stringDev holding % range
",60"
topHp
stringTop10 holding % range
",60"
insiderHp
stringInsider holding % range
",50"
bundleHp
stringBundle holding % range
",60"
newWalletHp
stringNew wallet holding % range
",30"
progress
stringGraduation progress % range (NEW/ALMOST only)
"1,90"
snipers
stringSniper count range
",5"
xnameCount
stringTwitter rename count range
",3"
tagHolder
stringWatched wallet buy count range
"1,2"
kol
stringKOL buy count range
"1,2"
dexPay
intDexScreener paid,
1
= filter paid only
1
oneLink
intAt least one social link,
1
= enabled
1
live
intCurrently live streaming,
1
= filter live
1
所有过滤参数均为可选。范围参数使用逗号分隔的字符串格式
"min,max"
。留空一侧可仅设置最小值或最大值(例如:
"100,"
= 最小值100,
",50"
= 最大值50)。
参数类型描述示例
dex
string[]DEX平台过滤见下方「按链划分的DEX值」
quoteTokens
string[]报价Token过滤见下方「按链划分的quoteTokens值」
link
string[]社交媒体链接过滤
["x","tg","web"]
keywords
string[]Token名称/符号关键词匹配
["pepe","doge"]
ignoreWords
string[]忽略关键词
["scam"]
mc
string市值范围(美元)
"10000,500000"
liq
string流动性范围(美元)
"1000,"
vol
string交易量范围(美元)
"5000,100000"
holder
string持仓者数量范围
"50,"
createTime
string创建时间范围(距现在的分钟数)
"1,20"
tradeCount
string交易次数范围
"100,"
buyCount
string买入次数范围
"50,"
sellCount
string卖出次数范围
"10,"
devBuy
string开发者买入数量范围(原生Token)
"0.001,"
devSell
string开发者卖出数量范围(原生Token)
"0.001,"
devHp
string开发者持仓百分比范围
",60"
topHp
string前10持仓者百分比范围
",60"
insiderHp
string内部人士持仓百分比范围
",50"
bundleHp
string捆绑持仓者百分比范围
",60"
newWalletHp
string新钱包持仓百分比范围
",30"
progress
string毕业进度百分比范围(仅NEW/ALMOST类型)
"1,90"
snipers
string狙击者数量范围
",5"
xnameCount
stringTwitter改名次数范围
",3"
tagHolder
string关注钱包买入次数范围
"1,2"
kol
stringKOL买入次数范围
"1,2"
dexPay
intDexScreener付费推广,
1
= 仅过滤付费推广的Token
1
oneLink
int至少有一个社交媒体链接,
1
= 启用该过滤
1
live
int当前正在直播,
1
= 仅过滤正在直播的Token
1

DEX Values by Chain

按链划分的DEX值

  • SOL:
    pump
    ,
    pumpmayhem
    ,
    bonk
    ,
    heaven
    ,
    believe
    ,
    daosfun
    ,
    launchlab
    ,
    mdbc
    ,
    jupstudio
    ,
    mdbcbags
    ,
    trends
    ,
    moonshotn
    ,
    boop
    ,
    moon
    ,
    time
  • BSC:
    four
    ,
    four_agent
    ,
    bnonly
    ,
    flap
  • SOL:
    pump
    ,
    pumpmayhem
    ,
    bonk
    ,
    heaven
    ,
    believe
    ,
    daosfun
    ,
    launchlab
    ,
    mdbc
    ,
    jupstudio
    ,
    mdbcbags
    ,
    trends
    ,
    moonshotn
    ,
    boop
    ,
    moon
    ,
    time
  • BSC:
    four
    ,
    four_agent
    ,
    bnonly
    ,
    flap

quoteTokens Values by Chain

按链划分的quoteTokens值

  • SOL:
    sol
    ,
    usdc
    ,
    usd1
  • BSC:
    bnb
    ,
    usdt
    ,
    usdc
    ,
    usd1
    ,
    aster
    ,
    u
  • SOL:
    sol
    ,
    usdc
    ,
    usd1
  • BSC:
    bnb
    ,
    usdt
    ,
    usdc
    ,
    usd1
    ,
    aster
    ,
    u

Feed Response

Feed响应示例

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "items": [
      {
        "tokenAddress": "...",
        "symbol": "TOKEN",
        "name": "Token Name",
        "createTime": 1773140232851,
        "dexName": "PUMPFUN",
        "launchPlatform": { "name": "PUMPFUN", "progress": "12.89", "completed": false },
        "holders": 3,
        "priceUSD": 0.000003046,
        "marketCapUSD": 3046.80,
        "devHoldPercent": 12.48,
        "hasLink": false,
        "snipers": 0,
        "quoteToken": "sol"
      }
    ]
  },
  "success": true
}
Key response fields:
tokenAddress
,
symbol
,
name
,
createTime
,
dexName
,
launchPlatform
(name/progress/completed),
holders
,
priceUSD
,
marketCapUSD
,
devHoldPercent
,
hasLink
,
snipers
,
volume
,
tradeCount
,
buyCount
,
sellCount
,
topHolderPercent
,
insiderHp
,
bundleHp
json
{
  "code": 200,
  "msg": "success",
  "data": {
    "items": [
      {
        "tokenAddress": "...",
        "symbol": "TOKEN",
        "name": "Token Name",
        "createTime": 1773140232851,
        "dexName": "PUMPFUN",
        "launchPlatform": { "name": "PUMPFUN", "progress": "12.89", "completed": false },
        "holders": 3,
        "priceUSD": 0.000003046,
        "marketCapUSD": 3046.80,
        "devHoldPercent": 12.48,
        "hasLink": false,
        "snipers": 0,
        "quoteToken": "sol"
      }
    ]
  },
  "success": true
}
响应核心字段:
tokenAddress
,
symbol
,
name
,
createTime
,
dexName
,
launchPlatform
(name/progress/completed),
holders
,
priceUSD
,
marketCapUSD
,
devHoldPercent
,
hasLink
,
snipers
,
volume
,
tradeCount
,
buyCount
,
sellCount
,
topHolderPercent
,
insiderHp
,
bundleHp

Token Query

Token查询

GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/query?ca={contract_address}&chain={chain}
Query token details: price, security checks, tax rates, holder distribution, etc.
GET ${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/query?ca={contract_address}&chain={chain}
查询Token详情:价格、安全检测、税率、持仓者分布等。

Token Query Parameters

Token查询参数

ParamRequiredTypeValid valuesDescription
ca
YESstringContract addressToken contract address
chain
NOstring
sol
/
eth
/
bsc
/
base
Default
sol
. All 4 chains supported
参数是否必填类型有效值描述
ca
string合约地址Token合约地址
chain
string
sol
/
eth
/
bsc
/
base
默认
sol
。支持全部4条链

Token Query Response

Token查询响应示例

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "chainId": "bsc",
    "tokenAddress": "0x...",
    "baseSymbol": "TOKEN",
    "tradeInfo": {
      "marketCapUsd": 15464629.87,
      "price": 0.01546,
      "holder": 7596,
      "hourTradeNum": 20611,
      "hourTradeVolume": 2564705.05
    },
    "pairInfo": {
      "pairAddress": "0x...",
      "pair": "TOKEN - WBNB",
      "liquidateUsd": 581750.57,
      "createTime": 1772182240000
    },
    "securityInfo": {
      "honeyPot": false,
      "openSource": true,
      "noOwner": true,
      "locked": true
    },
    "taxInfo": { "buy": "0", "sell": "0" },
    "linkInfo": { "tg": "", "x": "", "web": "" },
    "dev": { "address": "0x...", "pct": 0.0 },
    "topHolderPct": 25.14,
    "topHolderList": [
      { "address": "0x...", "balance": 98665702.34, "pct": 9.86 }
    ]
  },
  "success": true
}
Response groups:
  • tradeInfo: marketCapUsd, price, holder, hourTradeNum, hourTradeVolume
  • pairInfo: pairAddress, pair, liquidateUsd, createTime
  • securityInfo: honeyPot, openSource, noOwner, locked
  • taxInfo: buy, sell (percentage strings)
  • dev: address, pct
  • topHolderPct and topHolderList: top 10 holder distribution
json
{
  "code": 200,
  "msg": "success",
  "data": {
    "chainId": "bsc",
    "tokenAddress": "0x...",
    "baseSymbol": "TOKEN",
    "tradeInfo": {
      "marketCapUsd": 15464629.87,
      "price": 0.01546,
      "holder": 7596,
      "hourTradeNum": 20611,
      "hourTradeVolume": 2564705.05
    },
    "pairInfo": {
      "pairAddress": "0x...",
      "pair": "TOKEN - WBNB",
      "liquidateUsd": 581750.57,
      "createTime": 1772182240000
    },
    "securityInfo": {
      "honeyPot": false,
      "openSource": true,
      "noOwner": true,
      "locked": true
    },
    "taxInfo": { "buy": "0", "sell": "0" },
    "linkInfo": { "tg": "", "x": "", "web": "" },
    "dev": { "address": "0x...", "pct": 0.0 },
    "topHolderPct": 25.14,
    "topHolderList": [
      { "address": "0x...", "balance": 98665702.34, "pct": 9.86 }
    ]
  },
  "success": true
}
响应分组:
  • tradeInfo: marketCapUsd, price, holder, hourTradeNum, hourTradeVolume
  • pairInfo: pairAddress, pair, liquidateUsd, createTime
  • securityInfo: honeyPot, openSource, noOwner, locked
  • taxInfo: buy, sell(百分比字符串)
  • dev: address, pct
  • topHolderPcttopHolderList: 前10持仓者分布

Execution Rules

执行规则

  1. Always confirm before trading -- Ask user to confirm: chain, token address, amount/percentage, buy or sell
  2. Use Bash with curl to call the API
  3. Poll trade result -- After swap submission, query trade status up to 3 times with 5s intervals
  4. Show transaction link -- Always display the block explorer URL with the txId
  5. Never retry failed swap requests -- show the error to user instead
  6. Chain-wallet validation -- walletAddress must match the selected chain. A Solana wallet cannot be used for BSC/ETH/Base trades and vice versa. If the user provides a mismatched wallet/chain combination, warn them and ask to correct before proceeding.
  7. Strict parameter validation -- Before calling the API, validate EVERY field:
    • All required parameters must be present and have legal values
    • chain
      must be one of
      sol
      /
      eth
      /
      bsc
      /
      base
    • isBuy
      must be boolean
      true
      or
      false
    • amount
      for buy: must be > 0; for sell: must be 1-100
    • tip
      must be provided; SOL chain: 0.001-0.1 (unit: SOL); EVM chains: 0.1-100 (unit: Gwei). If tip is outside the recommended range, must warn the user about potentially high cost and require explicit confirmation before proceeding
    • model
      if provided must be 1 or 2
    • priorityFee
      if provided only applies to Solana chain
    • Do NOT send any field names outside the parameter tables above
    • If any validation fails, refuse to send the request and ask the user to correct
  1. 交易前必须确认——请求用户确认:链、Token地址、数量/百分比、买入或卖出操作
  2. 使用Bash和curl调用API
  3. 轮询交易结果——提交swap请求后,最多查询3次交易状态,每次间隔5秒
  4. 显示交易链接——必须显示包含txId的区块浏览器地址
  5. 失败请求不重试——若swap请求失败,直接向用户展示错误信息
  6. 链与钱包验证——walletAddress必须与所选链匹配。Solana钱包不能用于BSC/ETH/Base交易,反之亦然。若用户提供的钱包与链不匹配,需警告用户并要求修正后再继续。
  7. 严格参数验证——调用API前,必须验证每一个字段:
    • 所有必填参数必须存在且值合法
    • chain
      必须是
      sol
      /
      eth
      /
      bsc
      /
      base
      之一
    • isBuy
      必须是布尔值
      true
      false
    • 买入操作的
      amount
      必须>0;卖出操作的
      amount
      必须在1-100之间
    • 必须提供
      tip
      ;SOL链的tip需在0.001-0.1之间(单位:SOL);EVM链的tip需在0.1-100之间(单位:Gwei)。若tip超出推荐范围,必须警告用户可能产生高额费用,并要求用户明确确认后再继续
    • 若提供
      model
      ,必须是1或2
    • 若提供
      priorityFee
      ,仅对Solana链有效
    • 禁止发送参数表中未列出的字段
    • 若任何验证失败,拒绝发送请求并要求用户修正

Feed Rules

Feed功能规则

  1. type validation -- Only accept
    NEW
    ,
    ALMOST
    ,
    COMPLETED
    (uppercase). Reject any other value.
  2. chain validation -- Feed only supports
    sol
    and
    bsc
    . If user specifies
    eth
    or
    base
    , reject and inform them that Feed scanning is only available on Solana and BSC chains.
  3. Single query mode (default) -- Call the Feed API once, format and display key info for each token: symbol, priceUSD, marketCapUSD, holders, devHoldPercent, launchPlatform (name + progress).
  4. Continuous monitor mode -- Activate only when user explicitly says "持续监控", "monitor", or "watch":
    • Use a Bash polling loop, calling Feed API every 5 seconds
    • Deduplicate by
      tokenAddress
      — only display newly appeared tokens
    • Loop limit: 480 seconds (8 minutes). Set Bash timeout to 540000ms
    • After loop ends, use AskUserQuestion to ask: continue monitoring / view token details / buy a token / stop
    • When continuing, preserve the seen
      tokenAddress
      set to avoid repeats
  5. Filter guidance -- Before querying, optionally ask user about filter preferences (market cap range, liquidity, holder count, etc.). If not asked, use no filters (return all).
  6. No auto-trading -- Feed scanning is for observation only. NEVER automatically buy or sell based on scan results.
  7. Error handling -- See Error Codes table. For data query APIs:
    code == 200
    with
    success == true
    means success;
    code == 300
    is server error (inform user to retry later);
    code == 8060/8061
    means stop immediately;
    code == 8062
    means wait 2 seconds and retry.
  1. type参数验证——仅接受
    NEW
    ALMOST
    COMPLETED
    (大写)。拒绝其他任何值。
  2. chain参数验证——Feed功能仅支持
    sol
    bsc
    。若用户指定
    eth
    base
    ,需拒绝并告知用户Feed扫描仅支持Solana和BSC链。
  3. 单次查询模式(默认)——调用一次Feed API,格式化并展示每个Token的核心信息:symbol、priceUSD、marketCapUSD、holders、devHoldPercent、launchPlatform(名称+进度)。
  4. 持续监控模式——仅当用户明确提出「持续监控」「monitor」或「watch」时启用:
    • 使用Bash轮询循环,每5秒调用一次Feed API
    • 通过
      tokenAddress
      去重——仅展示新出现的Token
    • 循环限制:480秒(8分钟)。设置Bash超时为540000ms
    • 循环结束后,询问用户:继续监控 / 查看Token详情 / 购买Token / 停止
    • 若用户选择继续,保留已记录的
      tokenAddress
      集合以避免重复展示
  5. 过滤引导——查询前可选择询问用户的过滤偏好(市值范围、流动性、持仓者数量等)。若未询问,则不使用任何过滤条件(返回所有结果)。
  6. 禁止自动交易——Feed扫描仅用于观察。绝不能根据扫描结果自动执行买入或卖出操作。
  7. 错误处理——参考错误码表。对于数据查询API:
    code == 200
    success == true
    表示成功;
    code == 300
    为服务器错误(告知用户稍后重试);
    code == 8060/8061
    表示立即停止;
    code == 8062
    表示等待2秒后重试。

Token Query Rules

Token查询规则

  1. ca required -- Contract address (
    ca
    ) must be provided. If missing, ask user for it.
  2. chain validation -- Supports all 4 chains:
    sol
    ,
    eth
    ,
    bsc
    ,
    base
    . Default
    sol
    .
  3. HoneyPot warning -- If
    securityInfo.honeyPot == true
    , display a prominent warning that this token is a honeypot and trading it is extremely risky.
  4. High tax alert -- If
    taxInfo.buy
    or
    taxInfo.sell
    > 5%, warn user about high tax rates.
  5. Display format -- Present results in groups: Trade Info → Security Check → Tax Rates → Holder Distribution → Social Links.
  6. Trade follow-up -- After displaying query results, optionally ask user if they want to buy this token, linking to the Buy Token flow.
  7. Error handling -- Same as Feed Rules (see Error Codes table).
  1. ca参数必填——必须提供合约地址(
    ca
    )。若缺失,需向用户索要。
  2. chain参数验证——支持全部4条链:
    sol
    eth
    bsc
    base
    。默认
    sol
  3. 蜜罐警告——若
    securityInfo.honeyPot == true
    ,需显示显眼警告,告知用户该Token是蜜罐,交易风险极高。
  4. 高税率提醒——若
    taxInfo.buy
    taxInfo.sell
    > 5%,需提醒用户该Token税率较高。
  5. 展示格式——按分组展示结果:交易信息 → 安全检测 → 税率 → 持仓者分布 → 社交链接。
  6. 交易跟进——展示查询结果后,可选择询问用户是否要购买该Token,跳转至购买Token流程。
  7. 错误处理——与Feed功能规则相同(参考错误码表)。

Wallet Address Formats

钱包地址格式

ChainFormatExample pattern
SOLBase58, 32-44 characters
7xKX...
ETH / BSC / Base0x + 40 hex characters
0x1a2B...
格式示例模式
SOLBase58格式,32-44字符
7xKX...
ETH / BSC / Base0x开头+40位十六进制字符
0x1a2B...

Block Explorer URLs

区块浏览器地址

  • SOL:
    https://solscan.io/tx/{txId}
  • ETH:
    https://etherscan.io/tx/{txId}
  • BSC:
    https://bscscan.com/tx/{txId}
  • BASE:
    https://basescan.org/tx/{txId}
  • SOL:
    https://solscan.io/tx/{txId}
  • ETH:
    https://etherscan.io/tx/{txId}
  • BSC:
    https://bscscan.com/tx/{txId}
  • BASE:
    https://basescan.org/tx/{txId}

Error Codes

错误码

CodeMeaningScope
200SuccessData query APIs (Feed, Token Query)
300Server error — inform user to retry laterData query APIs (Feed, Token Query)
8060API Key invalidAll APIs
8061API Key disabledAll APIs
8062Rate limitedAll APIs — data query: retry after 2s; trade: retry after 1s (except swap, see Execution Rules #5)
错误码含义适用范围
200成功数据查询API(Feed、Token查询)
300服务器错误——告知用户稍后重试数据查询API(Feed、Token查询)
8060API密钥无效所有API
8061API密钥已禁用所有API
8062请求频率受限所有API——数据查询:等待2秒后重试;交易:等待1秒后重试(swap操作除外,见执行规则第5条)

Example curl

curl示例

bash
undefined
bash
undefined

Buy

购买Token

curl -s -X POST "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap"
-H "Authorization: Bearer $XXYY_API_KEY"
-H "Content-Type: application/json"
-d '{"chain":"sol","walletAddress":"...","tokenAddress":"...","isBuy":true,"amount":0.1,"tip":0.001}'
curl -s -X POST "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/swap"
-H "Authorization: Bearer $XXYY_API_KEY"
-H "Content-Type: application/json"
-d '{"chain":"sol","walletAddress":"...","tokenAddress":"...","isBuy":true,"amount":0.1,"tip":0.001}'

Query Trade

查询交易记录

curl -s "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/trade?txId=..."
-H "Authorization: Bearer $XXYY_API_KEY"
curl -s "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/trade?txId=..."
-H "Authorization: Bearer $XXYY_API_KEY"

Feed - Scan newly launched tokens on SOL (with filters)

Feed功能 - 扫描SOL链上新上线的Token(带过滤条件)

curl -s -X POST "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/feed/NEW?chain=sol"
-H "Authorization: Bearer $XXYY_API_KEY"
-H "Content-Type: application/json"
-d '{"mc":"10000,500000","holder":"50,","insiderHp":",50"}'
curl -s -X POST "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/feed/NEW?chain=sol"
-H "Authorization: Bearer $XXYY_API_KEY"
-H "Content-Type: application/json"
-d '{"mc":"10000,500000","holder":"50,","insiderHp":",50"}'

Token Query

Token查询

curl -s "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/query?ca=TOKEN_ADDRESS&chain=sol"
-H "Authorization: Bearer $XXYY_API_KEY"
undefined
curl -s "${XXYY_API_BASE_URL:-https://www.xxyy.io}/api/trade/open/api/query?ca=TOKEN_ADDRESS&chain=sol"
-H "Authorization: Bearer $XXYY_API_KEY"
undefined