{"openapi":"3.0.3","info":{"title":"FioTech Markets REST API","version":"2.0.0","description":"Comprehensive cryptocurrency market data, DEX liquidity scanner, CoinMarketCap Pro streaming, Upstash Redis caching, and PostgreSQL persistence.","contact":{"name":"FioTech Labs Engineering","url":"https://www.fiotech.org","email":"support@fiotech.org"}},"servers":[{"url":"https://markets.fiotech.org","description":"Official Production Server"},{"url":"https://marketsfiotechchainorg.vercel.app","description":"Vercel Edge Server"},{"url":"http://localhost:3000","description":"Local Development Server (Port 3000)"},{"url":"http://localhost:4000","description":"Local Development Server (Port 4000)"}],"tags":[{"name":"Cryptocurrencies","description":"Market rankings, spot prices, coin details, trending & gainers"},{"name":"Categories","description":"Crypto industry sectors and market cap tracking"},{"name":"DexScan","description":"Decentralized exchange pool liquidity and transaction monitoring"},{"name":"Market Intelligence","description":"Global capitalization, volume, Bitcoin/Ethereum dominance, and news"},{"name":"Converter","description":"Real-time cryptocurrency & fiat currency conversion calculator"},{"name":"Admin & Cache","description":"Upstash Redis cache control and database synchronization"}],"paths":{"/api/cryptocurrencies":{"get":{"tags":["Cryptocurrencies"],"summary":"List Top 100 Cryptocurrencies","description":"Returns real-time cryptocurrency rankings directly streamed from CoinMarketCap and cached with Upstash Redis.","parameters":[{"name":"category","in":"query","description":"Filter by category (e.g. 'Layer 1', 'DeFi', 'AI & Big Data', 'Memes')","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Search by token name or ticker symbol (e.g. 'BTC', 'FIO')","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Array of cryptocurrency objects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Cryptocurrency"}}}}}}}},"/api/cryptocurrencies/{coinId}":{"get":{"tags":["Cryptocurrencies"],"summary":"Get Asset Details by ID or Symbol","parameters":[{"name":"coinId","in":"path","required":true,"description":"Unique slug or ticker (e.g. 'fiotech', 'bitcoin', 'ethereum')","schema":{"type":"string"}}],"responses":{"200":{"description":"Detailed cryptocurrency profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cryptocurrency"}}}},"404":{"description":"Cryptocurrency not found"}}}},"/api/cryptocurrencies/trending":{"get":{"tags":["Cryptocurrencies"],"summary":"Top 5 Trending Tokens","responses":{"200":{"description":"Top trending cryptocurrencies sorted by 24h trading volume"}}}},"/api/cryptocurrencies/gainers-losers":{"get":{"tags":["Cryptocurrencies"],"summary":"Top 24h Gainers and Losers","responses":{"200":{"description":"Object containing gainers and losers arrays"}}}},"/api/categories":{"get":{"tags":["Categories"],"summary":"List Crypto Sectors","responses":{"200":{"description":"List of market categories with total market cap and 24h change"}}}},"/api/dex/pairs":{"get":{"tags":["DexScan"],"summary":"List DEX Liquidity Pairs","responses":{"200":{"description":"Live decentralized exchange liquidity pools across FioTech Chain, Ethereum, Solana, BNB Chain"}}}},"/api/market-stats":{"get":{"tags":["Market Intelligence"],"summary":"Global Market Overview","responses":{"200":{"description":"Total Market Cap, 24h Volume, BTC/ETH dominance, and Fear & Greed index"}}}},"/api/converter":{"get":{"tags":["Converter"],"summary":"Convert Currency Amounts","parameters":[{"name":"from","in":"query","required":true,"description":"Source currency or token","schema":{"type":"string","default":"bitcoin"}},{"name":"to","in":"query","required":true,"description":"Target currency or token","schema":{"type":"string","default":"usd"}},{"name":"amount","in":"query","required":false,"description":"Amount to convert","schema":{"type":"number","default":1}}],"responses":{"200":{"description":"Converted amount and exchange rate calculation"}}}},"/api/news":{"get":{"tags":["Market Intelligence"],"summary":"Crypto News & Sentiment Feed","responses":{"200":{"description":"Live curated news articles with sentiment tags"}}}},"/api/admin/stats":{"get":{"tags":["Admin & Cache"],"summary":"SB Admin 2 KPI Metrics","responses":{"200":{"description":"Primary, Warning, Success, and Danger card metrics"}}}},"/api/admin/cache":{"get":{"tags":["Admin & Cache"],"summary":"Upstash Redis Cache Status & Keys","responses":{"200":{"description":"Cache provider stats, hit rate, and active stored keys"}}},"delete":{"tags":["Admin & Cache"],"summary":"Flush All Cache or Delete Key","parameters":[{"name":"key","in":"query","required":false,"description":"Specific key to delete","schema":{"type":"string"}}],"responses":{"200":{"description":"Cache invalidation confirmation"}}},"post":{"tags":["Admin & Cache"],"summary":"Warm Cache & Sync Database with CoinMarketCap","responses":{"200":{"description":"Re-synchronization status"}}}}},"components":{"schemas":{"Cryptocurrency":{"type":"object","properties":{"id":{"type":"integer","example":1},"coinId":{"type":"string","example":"fiotech"},"name":{"type":"string","example":"FioTech"},"symbol":{"type":"string","example":"FIO"},"logoUrl":{"type":"string","example":"https://www.fiotech.org/fiotech-logo.png"},"currentPrice":{"type":"number","example":1.25},"marketCap":{"type":"number","example":1250000000},"volume24h":{"type":"number","example":85000000},"circulatingSupply":{"type":"number","example":1000000000},"totalSupply":{"type":"number","example":1000000000},"maxSupply":{"type":"number","nullable":true,"example":1000000000},"priceChangePercentage1h":{"type":"number","example":0.8},"priceChangePercentage24h":{"type":"number","example":12.4},"priceChangePercentage7d":{"type":"number","example":38.5},"rank":{"type":"integer","example":1},"category":{"type":"string","example":"Layer 1"},"sparkline":{"type":"array","items":{"type":"number"}}}}}}}