{"openapi":"3.1.0","info":{"title":"x402 Multi-Chain Blockchain & Lighter Intelligence API","version":"4.0.0","description":"Pay-per-call blockchain data API for NEAR Protocol, Solana, and Base (Ethereum L2), plus proprietary Lighter DEX intelligence (spreads, depth, whales, signals, XLP). All data endpoints require x402 USDC micropayment on Solana or Base. No API keys, no signup — just attach a payment header.","contact":{"email":"openclaw@proton.me"}},"servers":[{"url":"https://ironflip.duckdns.org","description":"Production"}],"paths":{"/api/near/account/{id}/balance":{"get":{"operationId":"getNearBalance","summary":"NEAR account balance","description":"Returns native NEAR balance breakdown (total, staked, available). Price: $0.001 USDC.","tags":["NEAR"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"relay.near"}],"responses":{"200":{"description":"Balance data","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string"},"total":{"type":"string"},"available":{"type":"string"},"staked":{"type":"string"}}}}}},"402":{"description":"Payment required — x402 USDC on Solana"}}}},"/api/near/account/{id}/keys":{"get":{"operationId":"getNearAccessKeys","summary":"NEAR access keys","description":"Returns all access keys (full + function-call) for an account. Price: $0.001 USDC.","tags":["NEAR"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Access key list"},"402":{"description":"Payment required"}}}},"/api/near/tx/{hash}":{"get":{"operationId":"getNearTransaction","summary":"NEAR transaction details","description":"Returns full transaction with receipts, actions, and status. Requires sender_id query param. Price: $0.001 USDC.","tags":["NEAR"],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}},{"name":"sender_id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction data"},"402":{"description":"Payment required"}}}},"/api/near/validators":{"get":{"operationId":"getNearValidators","summary":"NEAR validators","description":"Returns current validator set with stake amounts, block production, and slashing status. Price: $0.002 USDC.","tags":["NEAR"],"responses":{"200":{"description":"Validator list"},"402":{"description":"Payment required"}}}},"/api/near/validators/{id}":{"get":{"operationId":"getNearValidatorById","summary":"NEAR validator details","description":"Returns detailed info for a specific validator including uptime percentage. Price: $0.001 USDC.","tags":["NEAR"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Validator detail"},"402":{"description":"Payment required"}}}},"/api/near/account/{id}/staking":{"get":{"operationId":"getNearStaking","summary":"NEAR staking delegations","description":"Returns staking positions across top 50 validators for an account. Price: $0.002 USDC.","tags":["NEAR"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Staking positions"},"402":{"description":"Payment required"}}}},"/api/near/nft/{contract}/tokens":{"get":{"operationId":"getNearNftTokens","summary":"NEAR NFT tokens","description":"Returns NFT tokens on a contract with metadata. Price: $0.002 USDC.","tags":["NEAR"],"parameters":[{"name":"contract","in":"path","required":true,"schema":{"type":"string"}},{"name":"from_index","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}}],"responses":{"200":{"description":"NFT token list"},"402":{"description":"Payment required"}}}},"/api/near/defi/pools":{"get":{"operationId":"getNearDefiPools","summary":"NEAR DeFi pools (Ref Finance)","description":"Returns liquidity pool data from Ref Finance. Price: $0.005 USDC.","tags":["NEAR"],"parameters":[{"name":"from_index","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}}],"responses":{"200":{"description":"Pool list"},"402":{"description":"Payment required"}}}},"/api/solana/account/{id}/balance":{"get":{"operationId":"getSolanaBalance","summary":"SOL balance","description":"Returns SOL balance in lamports and SOL. Price: $0.001 USDC.","tags":["Solana"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"}],"responses":{"200":{"description":"Balance data"},"402":{"description":"Payment required"}}}},"/api/solana/account/{id}/info":{"get":{"operationId":"getSolanaAccountInfo","summary":"Solana account info","description":"Returns account metadata (owner, executable, rent epoch, data size). Price: $0.001 USDC.","tags":["Solana"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Account info"},"402":{"description":"Payment required"}}}},"/api/solana/account/{id}/tokens":{"get":{"operationId":"getSolanaTokenAccounts","summary":"SPL token holdings","description":"Returns all SPL token accounts for a wallet, USDC sorted first. Price: $0.002 USDC.","tags":["Solana"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Token account list"},"402":{"description":"Payment required"}}}},"/api/solana/account/{id}/stakes":{"get":{"operationId":"getSolanaStakeAccounts","summary":"Solana stake accounts","description":"Returns staking positions with validator, amount, and activation epoch. Price: $0.002 USDC.","tags":["Solana"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stake account list"},"402":{"description":"Payment required"}}}},"/api/solana/account/{id}/transactions":{"get":{"operationId":"getSolanaRecentTransactions","summary":"Recent Solana transactions","description":"Returns recent transaction signatures for an address. Price: $0.002 USDC.","tags":["Solana"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":50,"default":10}}],"responses":{"200":{"description":"Transaction list"},"402":{"description":"Payment required"}}}},"/api/solana/tx/{signature}":{"get":{"operationId":"getSolanaTransaction","summary":"Solana transaction details","description":"Returns parsed transaction with instructions, logs, and fee. Price: $0.001 USDC.","tags":["Solana"],"parameters":[{"name":"signature","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction data"},"402":{"description":"Payment required"}}}},"/api/solana/validators":{"get":{"operationId":"getSolanaValidators","summary":"Solana validators","description":"Returns top 30 vote accounts by activated stake with commission rates. Price: $0.002 USDC.","tags":["Solana"],"responses":{"200":{"description":"Validator list"},"402":{"description":"Payment required"}}}},"/api/solana/tokens/prices":{"get":{"operationId":"getSolanaTokenPrices","summary":"Top Solana token prices","description":"Returns prices and 24h change for top Solana tokens (SOL, USDC, JUP, JTO, etc.). Price: $0.002 USDC.","tags":["Solana"],"responses":{"200":{"description":"Token price list"},"402":{"description":"Payment required"}}}},"/api/solana/network/stats":{"get":{"operationId":"getSolanaNetworkStats","summary":"Solana network statistics","description":"Returns epoch info, TPS, total/circulating supply. Price: $0.002 USDC.","tags":["Solana"],"responses":{"200":{"description":"Network stats"},"402":{"description":"Payment required"}}}},"/api/base/account/{id}/balance":{"get":{"operationId":"getBaseBalance","summary":"ETH balance on Base","description":"Returns ETH balance in wei and human-readable ETH on Base L2. Price: $0.001 USDC.","tags":["Base"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"0x364839A584817393D347Aaf40D4f860EE40Fb884"}],"responses":{"200":{"description":"Balance data"},"402":{"description":"Payment required"}}}},"/api/base/account/{id}/info":{"get":{"operationId":"getBaseAccountInfo","summary":"Base account info","description":"Returns account type (EOA vs contract), nonce, balance, and code size. Price: $0.001 USDC.","tags":["Base"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Account info"},"402":{"description":"Payment required"}}}},"/api/base/account/{id}/tokens":{"get":{"operationId":"getBaseTokenBalances","summary":"ERC-20 token balances on Base","description":"Returns balances for popular Base ERC-20 tokens (USDC, USDbC, DAI, WETH, cbETH, AERO). Price: $0.002 USDC.","tags":["Base"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Token balance list"},"402":{"description":"Payment required"}}}},"/api/base/tx/{hash}":{"get":{"operationId":"getBaseTransaction","summary":"Base transaction details","description":"Returns full transaction with receipt, status, gas used, and log count. Price: $0.001 USDC.","tags":["Base"],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction data"},"402":{"description":"Payment required"}}}},"/api/base/block/latest":{"get":{"operationId":"getBaseLatestBlock","summary":"Latest Base block","description":"Returns latest block number, timestamp, tx count, gas used, and base fee. Price: $0.002 USDC.","tags":["Base"],"responses":{"200":{"description":"Block data"},"402":{"description":"Payment required"}}}},"/api/base/gas":{"get":{"operationId":"getBaseGasPrice","summary":"Base gas price","description":"Returns current gas price in wei and gwei on Base L2. Price: $0.001 USDC.","tags":["Base"],"responses":{"200":{"description":"Gas price"},"402":{"description":"Payment required"}}}},"/api/base/network/stats":{"get":{"operationId":"getBaseNetworkStats","summary":"Base network statistics","description":"Returns chain ID, block number, and gas price for Base L2. Price: $0.002 USDC.","tags":["Base"],"responses":{"200":{"description":"Network stats"},"402":{"description":"Payment required"}}}},"/api/lighter/spreads/current":{"get":{"operationId":"getLighterSpreadsCurrent","summary":"Current Lighter vs Hyperliquid spreads","description":"Returns current bid-ask spreads for BTC/ETH/SOL/HYPE/LIT on both Lighter and Hyperliquid, with spread_diff_bps showing which venue is tighter. 5-minute granularity from continuous collection. Price: $0.01 USDC.","tags":["Lighter Intelligence"],"responses":{"200":{"description":"Current spread data"},"402":{"description":"Payment required"}}}},"/api/lighter/spreads/history":{"get":{"operationId":"getLighterSpreadsHistory","summary":"Historical spread timeseries","description":"Returns historical bid-ask spread timeseries for a symbol. 5-minute granularity, up to 7 days. Includes depth at 0.3% bands for both exchanges. Price: $0.03 USDC.","tags":["Lighter Intelligence"],"parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string","enum":["BTC","ETH","SOL","HYPE","LIT"]},"description":"Trading pair symbol"},{"name":"hours","in":"query","schema":{"type":"integer","maximum":168,"default":24},"description":"Hours of history (max 168 = 7 days)"}],"responses":{"200":{"description":"Spread history timeseries"},"402":{"description":"Payment required"}}}},"/api/lighter/depth/current":{"get":{"operationId":"getLighterDepthCurrent","summary":"Current order book depth snapshot","description":"Returns current order book depth across all markets at 0.3% band, comparing Lighter and Hyperliquid. Shows which venue has deeper liquidity per market. Price: $0.01 USDC.","tags":["Lighter Intelligence"],"responses":{"200":{"description":"Depth snapshot"},"402":{"description":"Payment required"}}}},"/api/lighter/whales":{"get":{"operationId":"getLighterWhales","summary":"Lighter whale positions","description":"Returns live whale positions on Lighter DEX — bias (long/short), total value, net exposure, unrealized PnL, and individual positions. Price: $0.02 USDC.","tags":["Lighter Intelligence"],"responses":{"200":{"description":"Whale position data"},"402":{"description":"Payment required"}}}},"/api/lighter/signals":{"get":{"operationId":"getLighterSignals","summary":"Lighter signal wallet scores","description":"Returns signal wallet scores with S/A/B tier classification, total scores, and PnL metrics. S-tier wallets have historically strong performance. Price: $0.02 USDC.","tags":["Lighter Intelligence"],"responses":{"200":{"description":"Signal score data"},"402":{"description":"Payment required"}}}},"/api/lighter/xlp":{"get":{"operationId":"getLighterXlp","summary":"XLP experimental LP data","description":"Returns XLP (experimental liquidity provider) data across 26 markets — collateral, volume share, fees earned, PnL, position direction. Includes snapshot + recent history. Price: $0.02 USDC.","tags":["Lighter Intelligence"],"responses":{"200":{"description":"XLP LP data"},"402":{"description":"Payment required"}}}}},"x-x402-payment":[{"chain":"Solana","token":"USDC","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","payTo":"91xx1zU7hV59fiYq9jzJtThzgHkzm1JRjtgeKK1TGwA7","facilitator":"https://facilitator.x402endpoints.online","protocol":"https://x402.org"},{"chain":"Base","token":"USDC","network":"eip155:8453","payTo":"0x364839A584817393D347Aaf40D4f860EE40Fb884","facilitator":"https://facilitator.x402endpoints.online","protocol":"https://x402.org"}]}