Base URL
https://api.taurusbase.com/v1
Introduction
Welcome to the Taurus Base API documentation. This API provides access to a variety of cryptocurrency data, including real-time prices, historical data, risk metrics, and performance comparisons.
Authentication
Authenticate requests with an API key by including it in the Authorization header:
GET https://api.taurusbase.com/v1/your-endpoint
Headers: {
"x-api-key": "sk_6a28d...."
}
Endpoints
Get Crypto Price
Fetch the latest price of a cryptocurrency pair.
Endpoint:
GET /price/BTCUSDT
Response Example:
{
"baseToken": "BTC",
"quoteToken": "USDT",
"price": 27000.45,
"network": "ethereum"
}
Error Examples:
Status Code: 400
{
"error": "Invalid pair format or tokens not found."
}
Status Code: 404
{
"error": "Price not found in any supported network."
}
Status Code: 500
{
"error": "Error fetching price.",
"details": "Detailed error message"
}
Get Historical Data
Retrieve historical data for a specific cryptocurrency.
Endpoint:
GET /historical-data?symbol=BTC&period=1-year
Response Example:
[
{
"price": {
"max": { "value": 69000, "date": "2023-11-09T00:00:00Z" },
"min": { "value": 34000, "date": "2023-05-22T00:00:00Z" }
},
"volume": {
"max": { "value": 4500000, "date": "2023-11-09T00:00:00Z" },
"min": { "value": 1300000, "date": "2023-06-15T00:00:00Z" }
}
}
]
Error Examples:
Status Code: 400
{
"error": "Invalid period type or missing required parameters."
}
Status Code: 500
{
"error": "Error fetching historical data.",
"details": "Detailed error message"
}
Get Risk and Volatility
Access risk and volatility metrics for a cryptocurrency symbol.
Endpoint:
GET /risk-volatility/ETH
Response Example:
{
"volatility": {
"daily": 0.015,
"annual": 0.237,
"explanation": {
"daily": "This asset typically varies around 1.5% per day.",
"annual": "This asset typically varies around 23.7% over a year."
}
},
"sharpeRatio": {
"value": 1.05,
"explanation": "This asset has a good risk-adjusted return."
}
}
Error Examples:
Status Code: 400
{
"error": "Not enough data for the specified symbol or period."
}
Status Code: 500
{
"error": "Error calculating risk and volatility metrics.",
"details": "Detailed error message"
}
Compare Multiple Crypto Prices
Fetch current prices for multiple cryptocurrency pairs.
Endpoint:
POST /prices
Body: { "pairs": ["BTCUSDT", "ETHUSDT"] }
Response Example:
{
"successful": [
{
"pair": "BTCUSDT",
"baseToken": "BTC",
"quoteToken": "USDT",
"price": 27000.45
}
],
"failed": [],
"summary": {
"total": 2,
"successful": 1,
"failed": 0
}
}
Error Examples:
Status Code: 400
{
"error": "Request body is required or invalid format for pairs."
}
Status Code: 500
{
"error": "Error processing request for one or more pairs.",
"details": "Detailed error message"
}
Get Correlation and Diversification
Retrieve correlation and diversification data for multiple tokens. Optional AI insights can be enabled with useAI parameter.
Endpoint:
GET /diversification/correlation?tokens=BTC,ETH&period=1y&useAI=true
Response Example:
{
"correlationAnalysis": {
"matrix": {
"BTC": { "ETH": 0.65 },
"ETH": { "BTC": 0.65 }
},
"explanations": {
"BTC": { "ETH": "BTC and ETH have a moderate positive correlation of 65%." }
},
"overview": "Analysis based on 1-year historical data for BTC, ETH."
},
"diversificationStrategy": {
"recommendations": [
{
"token": "BTC",
"recommendedTokens": ["XRP", "ADA"],
"explanation": "To diversify a portfolio containing BTC, consider adding XRP, ADA."
}
],
"methodology": "Recommendations are based on correlation coefficients below 0.3."
},
"aiInsights": "AI suggests that BTC and ETH move similarly, but adding XRP or ADA may reduce overall risk."
}
Error Examples:
Status Code: 400
{
"error": "Not enough data for the specified tokens or period."
}
Status Code: 500
{
"error": "Error calculating correlation and diversification.",
"details": "Detailed error message"
}
Compare Performance
Get performance comparison between a target cryptocurrency and others. Optional AI insights can be enabled with useAI parameter.
Endpoint:
GET /performance-comparison/BTC?comparisonSymbols=ETH,LTC&period=1y&useAI=true
Response Example:
{
"metrics": {
"targetSymbol": "BTC",
"averagePrice": 34000.25,
"maxPrice": 69000,
"minPrice": 30000,
"totalVolume": 1500000,
"volatility": 0.12,
"priceChange": -5000,
"priceChangePercentage": -12.5,
"comparisons": [
{
"comparisonSymbol": "ETH",
"averagePrice": 2200,
"totalVolume": 900000,
"maxPrice": 2500,
"minPrice": 2000,
"volatility": 0.15,
"priceChange": -300,
"priceChangePercentage": -11.5
}
]
},
"aiInsights": "BTC shows lower volatility than ETH, making it a potentially safer asset in terms of price stability."
}
Error Examples:
Status Code: 400
{
"error": "Target symbol or comparison symbols are missing or invalid."
}
Status Code: 500
{
"error": "Error fetching comparison metrics.",
"details": "Detailed error message"
}
Rate Limits & Usage
Each plan has different rate limits. The free plan allows up to 10 requests per second, while the enterprise plan allows up to 350 requests per second.
Common Errors
{
"error": "Invalid API Key",
"message": "The provided API key is invalid or expired."
}
{
"error": "Rate Limit Exceeded",
"message": "You have exceeded the maximum request rate for your plan."
}