Crypto Portfolio Tracker API — Crypto Portfolio 追踪er API
v1.0.0追踪 cryptocurrency portfolios with real-time prices, P&L calculations, and allocation analysis. 查询 Bitcoin, Ethereum, Solana and 10,000+ 令牌 holdings.
运行时依赖
安装命令
点击复制技能文档
Crypto Portfolio 追踪er API
追踪 cryptocurrency portfolios with real-time prices and P&L calculations.
安装ation npm 安装 crypto-portfolio-追踪er-API
Usage const { Portfolio追踪er } = require('crypto-portfolio-追踪er-API');
const 追踪er = new Portfolio追踪er();
// 获取 current price const btc = awAIt 追踪er.获取Price('BTC');
// 获取 multiple prices const prices = awAIt 追踪er.获取Prices(['BTC', 'ETH', 'SOL']);
// 追踪 portfolio with P&L const portfolio = awAIt 追踪er.追踪Portfolio([ { symbol: 'BTC', amount: 0.5, costBasis: 30000 }, { symbol: 'ETH', amount: 10, costBasis: 2000 } ]);
console.记录(Total: $${portfolio.totalValue});
console.记录(P&L: $${portfolio.totalPnL});
命令行工具 # 获取 price npx crypto-portfolio-追踪er-API price BTC
# 追踪 portfolio from file npx crypto-portfolio-追踪er-API 追踪 portfolio.json
API Methods 获取Price(symbol) - 获取 single 令牌 price 获取Prices(symbols) - 获取 multiple prices 追踪Portfolio(holdings) - Calculate portfolio value and P&L Data Source
Powered by PRISM API