### Fetch Coins with Pagination (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Demonstrates how to use pagination parameters `limit` and `skip` to control the number of results returned per page and the starting point of the results. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?limit=10&skip=20' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Get List of Blockchains Source: https://coinstats.app/api-docs/openapi/get-blockchains Fetches a list of all supported blockchains. Requires an API key for authentication. ```APIDOC ## GET /v1/wallet/blockchains ### Description Get the list of blockchains supported by CoinStats. ### Method GET ### Endpoint /v1/wallet/blockchains ### Parameters #### Header Parameters - **X-API-KEY** (string) - Required - API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the `X-API-KEY` request header. Never expose your key in client-side code. ### Response #### Success Response (200) - **name** (string) - Required - Human-readable name of the blockchain network. Example: `"BNB Smart Chain"` - **connectionId** (string) - Required - Unique identifier for the blockchain connection. Example: `"binancesmartchain"` - **chain** (string) - Required - Internal identifier for the blockchain network. Example: `"binance_smart"` - **icon** (string) - Required - URL to the blockchain network icon. Example: `"https://static.coinstats.app/portfolio_images/binancesmartchain.png"` #### Response Example ```json [ { "name": "BNB Smart Chain", "connectionId": "binancesmartchain", "chain": "binance_smart", "icon": "https://static.coinstats.app/portfolio_images/binancesmartchain.png" } ] ``` ``` -------------------------------- ### Fetch Coins by Contract Addresses (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Example of fetching coin data by specifying smart contract addresses. Multiple addresses can be provided as a comma-separated string. Matching is case-insensitive. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?contractAddresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0xdac17f958d2ee523a2206206994597c13d831ec7' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch Coins Sorted by Market Cap (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Example cURL request to sort the returned coins by market cap in descending order. Use `sortBy=marketCap` and `sortDir=desc`. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?sortBy=marketCap&sortDir=desc' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch Fear & Greed Index (cURL) Source: https://coinstats.app/api-docs/openapi/fear-and-greed Use this cURL command to make a GET request to the API endpoint. Replace `` with your actual API key. An API key is required to access the endpoint. ```bash curl --request GET \ --url https://api.coinstats.app/v1/insights/fear-and-greed \ --header 'X-API-KEY: ' ``` -------------------------------- ### Coin Data Response Example Source: https://coinstats.app/api-docs/openapi/get-coins This JSON object represents a successful response when fetching cryptocurrency data. It includes metadata about the pagination and a list of coins with their detailed attributes. ```json { "meta": { "page": 1, "limit": 20, "itemCount": 150, "pageCount": 8, "hasPreviousPage": false, "hasNextPage": true }, "result": [ { "id": "ethereum", "icon": "https://static.coinstats.app/coins/ethereum_32.png", "name": "Ethereum", "symbol": "ETH", "rank": 2, "price": 2680.45, "priceBtc": 0.062, "volume": 8520000000, "marketCap": 322100000000, "availableSupply": 120280000, "totalSupply": 120280000, "fullyDilutedValuation": 322100000000, "priceChange1h": -0.25, "priceChange1d": 1.85, "priceChange1w": 3.42, "priceChange1m": 7.21, "websiteUrl": "https://ethereum.org", "redditUrl": "https://reddit.com/r/ethereum", "twitterUrl": "https://twitter.com/ethereum", "contractAddress": null, "contractAddresses": [], "decimals": 18, "explorers": [ "https://etherscan.io" ], "liquidityScore": 88.7, "volatilityScore": 38.9, "marketCapScore": 92.1, "riskScore": 18.5, "avgChange": 2.14 } ] } ``` -------------------------------- ### Connection Fields Example Source: https://coinstats.app/api-docs/openapi/connect-portfolio-exchange This JSON object demonstrates the structure for `connectionFields`, which contains the necessary API credentials for the exchange. The specific fields required (e.g., `apiKey`, `apiSecret`) depend on the exchange specified in `connectionId`. ```json { "apiKey": "your_exchange_api_key_here", "apiSecret": "your_exchange_api_secret_here" } ``` -------------------------------- ### Get Supported Blockchains (cURL) Source: https://coinstats.app/api-docs/openapi/get-blockchains Use this cURL command to fetch the list of blockchains supported by CoinStats. Ensure you replace `` with your actual API key. ```bash curl --request GET \ --url https://api.coinstats.app/v1/wallet/blockchains \ --header 'X-API-KEY: ' ``` -------------------------------- ### Get API Status using cURL Source: https://coinstats.app/api-docs/openapi/get-api-status Use this cURL command to make a GET request to the API endpoint and check its status. The response indicates if the API is operational. ```bash curl --request GET \ --url https://api.coinstats.app/v1/status ``` -------------------------------- ### GET /v1/insights/btc-dominance Source: https://coinstats.app/api-docs/openapi/btc-dominance Fetches Bitcoin dominance data for a specified time range. The data is returned as an array of [timestamp, percentage] pairs. ```APIDOC ## GET /v1/insights/btc-dominance ### Description Fetches Bitcoin dominance data for a specified time range. The data is returned as an array of [timestamp, percentage] pairs. ### Method GET ### Endpoint /v1/insights/btc-dominance ### Query Parameters - **type** (enum) - Required - Time period for the data. Available options: `24h`, `1w`, `1m`, `3m`, `6m`, `1y`, `all`. ### Request Example ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/insights/btc-dominance?type=24h' \ --header 'X-API-KEY: ' ``` ### Response #### Success Response (200) - **data** (number[][]) - Required - Array of timestamp and BTC dominance percentage pairs. Pair structure: [timestamp, BTC dominance percentage] #### Response Example ```json { "data": [ [ 1746441300, 61.59 ], [ 1746441400, 62.1 ], [ 1746441500, 61.85 ] ] } ``` #### Authorizations - **X-API-KEY** (string) - Required - API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the `X-API-KEY` request header. Never expose your key in client-side code. ``` -------------------------------- ### Get All Coins Source: https://coinstats.app/api-docs/openapi/get-coins Fetches comprehensive data for all available cryptocurrencies. You can optionally filter, sort, and paginate the results. An API key is required for authentication. ```APIDOC ## GET /v1/coins ### Description Retrieves a list of cryptocurrencies with detailed market data. Supports filtering by various parameters and pagination. ### Method GET ### Endpoint https://api.coinstats.app/v1/coins ### Query Parameters - **currency** (string) - Optional - The currency to display coin prices and market data in. Defaults to USD. - **limit** (number) - Optional - Number of items to return per page. Defaults to 20. - **skip** (number) - Optional - Number of items to skip for pagination. - **coinIds** (string) - Optional - Filter coins by specific coin IDs. Use comma-separated values. - **name** (string) - Optional - Search for coins by their name. Supports partial matching. - **symbol** (string) - Optional - Filter coins by their ticker symbol. Use comma-separated values. - **contractAddresses** (string) - Optional - Filter coins by smart contract addresses. Use comma-separated values. - **blockchains** (string) - Optional - Filter coins by blockchain networks. Use comma-separated values. - **sortBy** (string) - Optional - Field to sort the results by. - **sortDir** (string) - Optional - Direction of sorting (asc or desc). - **includeRiskScore** (string) - Optional - When `true`, response includes the risk score field. ### Request Example ```bash curl --request GET \ --url https://api.coinstats.app/v1/coins?currency=USD&limit=10 \ --header 'X-API-KEY: ' ``` ### Response #### Success Response (200) - **meta** (object) - Pagination and metadata about the response. - **page** (number) - Current page number. - **limit** (number) - Items per page. - **itemCount** (number) - Total number of items. - **pageCount** (number) - Total number of pages. - **hasPreviousPage** (boolean) - Indicates if there is a previous page. - **hasNextPage** (boolean) - Indicates if there is a next page. - **result** (array) - An array of coin objects. - **id** (string) - Unique identifier for the coin. - **icon** (string) - URL of the coin's icon. - **name** (string) - Name of the coin. - **symbol** (string) - Ticker symbol of the coin. - **rank** (number) - Rank of the coin by market cap. - **price** (number) - Current price of the coin. - **priceBtc** (number) - Price of the coin in BTC. - **volume** (number) - Trading volume over the last 24 hours. - **marketCap** (number) - Market capitalization of the coin. - **availableSupply** (number) - Circulating supply of the coin. - **totalSupply** (number) - Total supply of the coin. - **fullyDilutedValuation** (number) - Fully diluted market capitalization. - **priceChange1h** (number) - Price change in the last 1 hour. - **priceChange1d** (number) - Price change in the last 24 hours. - **priceChange1w** (number) - Price change in the last 7 days. - **priceChange1m** (number) - Price change in the last 30 days. - **websiteUrl** (string) - URL of the coin's official website. - **redditUrl** (string) - URL of the coin's Reddit community. - **twitterUrl** (string) - URL of the coin's Twitter profile. - **contractAddress** (string or null) - Contract address on a specific blockchain (if applicable). - **contractAddresses** (array) - Array of contract addresses on different blockchains. - **decimals** (number) - Number of decimal places for the coin's price. - **explorers** (array) - Array of blockchain explorer URLs. - **liquidityScore** (number) - Score indicating the liquidity of the coin. - **volatilityScore** (number) - Score indicating the volatility of the coin. - **marketCapScore** (number) - Score indicating the market cap. - **riskScore** (number) - Score indicating the risk associated with the coin. - **avgChange** (number) - Average price change over a period. #### Response Example ```json { "meta": { "page": 1, "limit": 20, "itemCount": 150, "pageCount": 8, "hasPreviousPage": false, "hasNextPage": true }, "result": [ { "id": "ethereum", "icon": "https://static.coinstats.app/coins/ethereum_32.png", "name": "Ethereum", "symbol": "ETH", "rank": 2, "price": 2680.45, "priceBtc": 0.062, "volume": 8520000000, "marketCap": 322100000000, "availableSupply": 120280000, "totalSupply": 120280000, "fullyDilutedValuation": 322100000000, "priceChange1h": -0.25, "priceChange1d": 1.85, "priceChange1w": 3.42, "priceChange1m": 7.21, "websiteUrl": "https://ethereum.org", "redditUrl": "https://reddit.com/r/ethereum", "twitterUrl": "https://twitter.com/ethereum", "contractAddress": null, "contractAddresses": [], "decimals": 18, "explorers": [ "https://etherscan.io" ], "liquidityScore": 88.7, "volatilityScore": 38.9, "marketCapScore": 92.1, "riskScore": 18.5, "avgChange": 2.14 } ] } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden - **404** Not Found - **409** Conflict - **429** Too Many Requests - **503** Service Unavailable ``` -------------------------------- ### Get Coins List Source: https://coinstats.app/api-docs/openapi/get-coins Retrieve a list of coins with optional filters for supply, rank, price, and risk score. ```APIDOC ## GET /coins ### Description Retrieves a list of coins. This endpoint supports filtering by circulating supply, total supply, market cap rank, price, and risk score. ### Method GET ### Endpoint /coins ### Query Parameters - **availableSupply~equals** (number) - Optional - Filter coins with circulating supply equal to the specified amount. - **availableSupply~lessThan** (number) - Optional - Filter coins with circulating supply less than the specified amount. - **totalSupply~greaterThan** (number) - Optional - Filter coins with total supply greater than the specified amount. - **totalSupply~equals** (number) - Optional - Filter coins with total supply equal to the specified amount. - **totalSupply~lessThan** (number) - Optional - Filter coins with total supply less than the specified amount. - **rank~greaterThan** (number) - Optional - Filter coins with market cap rank greater than the specified number. - **rank~equals** (number) - Optional - Filter coins with market cap rank equal to the specified number. - **rank~lessThan** (number) - Optional - Filter coins with market cap rank less than the specified number. - **price~greaterThan** (number) - Optional - Filter coins with current price greater than the specified value. - **price~equals** (number) - Optional - Filter coins with current price equal to the specified value. - **price~lessThan** (number) - Optional - Filter coins with current price less than the specified value. - **riskScore~greaterThan** (number) - Optional - Filter coins with risk score greater than the specified value (0-100 scale). Only available when includeRiskScore=true. - **riskScore~equals** (number) - Optional - Filter coins with risk score equal to the specified value (0-100 scale). Only available when includeRiskScore=true. - **riskScore~lessThan** (number) - Optional - Filter coins with risk score less than the specified value (0-100 scale). Only available when includeRiskScore=true. ### Response #### Success Response (200) - **meta** (object) - Required - Pagination metadata including page info and totals. - **result** (object[]) - Required - Array of coin data items for the current page. #### Response Example ```json { "meta": { "page": 1, "limit": 20, "itemCount": 150, "pageCount": 8, "hasPreviousPage": false, "hasNextPage": true }, "result": [ { "id": "ethereum", "icon": "https://static.coinstats.app/coins/ethereum_32.png", "name": "Ethereum", "symbol": "ETH", "rank": 2, "price": 2680.45, "priceBtc": 0.062, "volume": 8520000000, "marketCap": 322100000000, "availableSupply": 120280000, "totalSupply": 120280000, "fullyDilutedValuation": 322100000000, "priceChange1h": -0.25, "priceChange1d": 1.85, "priceChange1w": 3.42, "priceChange1m": 7.21, "websiteUrl": "https://ethereum.org", "redditUrl": "https://reddit.com/r/ethereum", "twitterUrl": "https://twitter.com/ethereum", "contractAddress": null, "contractAddresses": [], "decimals": 18, "explorers": ["https://etherscan.io"], "liquidityScore": 88.7, "volatilityScore": 38.9, "marketCapScore": 92.1, "riskScore": 18.5, "avgChange": 2.14 } ] } ``` ``` -------------------------------- ### Successful Transaction Response Source: https://coinstats.app/api-docs/openapi/add-portfolio-transaction This is an example of a successful response when adding a transaction. It includes details about the transaction type, profit/loss, fees, and associated coin data. ```json { "transactionType": "Roll In", "date": "2025-08-28T08:35:50.384Z", "profitLoss": { "profit": -0.21637050600000052, "profitPercent": -3.5658153241650377, "currentValue": 5.851540654 }, "fee": { "coin": { "rank": 2, "identifier": "ethereum", "symbol": "ETH", "name": "Ethereum", "icon": "https://static.coinstats.app/coins/1650455629727.png", "priceChange24h": -5.74, "priceChange1h": 0.1, "priceChange7d": 1.12, "priceChange1m": 8.42, "volume": 61315198931.43572, "isFake": false, "isFiat": false }, "count": 0.001, "totalWorth": 25.5, "price": 25500, "toAddress": "0x42382d7853beb8d0ec968de4184a6a3c89cf6b5f", "fromAddress": "0x8ac77cbf06b44ec918e4ed99698e83a0be222e0e" }, "portfolioInfo": { "name": "KuCoin Spot", "icon": "https://static.coinstats.app/portfolio_images/kucoin_dark.png" }, "coinData": { "identifier": "pepe", "count": 596062, "symbol": "PEPE", "totalWorth": 6.06791116, "currentValue": 5.851540654 }, "transfers": [ { "transferType": "Received", "items": [ { "coin": { "rank": 2, "identifier": "ethereum", "symbol": "ETH", "name": "Ethereum", "icon": "https://static.coinstats.app/coins/1650455629727.png", "priceChange24h": -5.74, "priceChange1h": 0.1, "priceChange7d": 1.12, "priceChange1m": 8.42, "volume": 61315198931.43572, "isFake": false, "isFiat": false }, "count": -0.00000544, "toAddress": "0x42382d7853beb8d0ec968de4184a6a3c89cf6b5f", "fromAddress": "0x8ac77cbf06b44ec918e4ed99698e83a0be222e0e", "totalWorth": 0.0000054389555199999995, "price": 0.999808 } ] } ], "note": { "name": "KuCoin Spot", "icon": "https://static.coinstats.app/portfolio_images/kucoin_dark.png" } } ``` -------------------------------- ### Get API Status Source: https://coinstats.app/api-docs/openapi/get-api-status Returns the current availability status of the API. ```APIDOC ## GET /v1/status ### Description Returns the current availability status of the API. ### Method GET ### Endpoint /v1/status ### Response #### Success Response (200) - **status** (string) - Required - Current API status ### Response Example { "status": "ok" } ``` -------------------------------- ### Fetch Coins with Specific IDs (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Example cURL request to fetch data for specific coins using their IDs. Provide a comma-separated list of coin IDs to filter the results. Remember to include your API key. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?coinIds=bitcoin,ethereum,solana' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch BTC Dominance Data (24h) Source: https://coinstats.app/api-docs/openapi/btc-dominance Use this cURL command to get Bitcoin dominance data for the last 24 hours. Ensure you replace `` with your actual API key. The response contains an array of [timestamp, percentage] pairs. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/insights/btc-dominance?type=24h' \ --header 'X-API-KEY: ' ``` ```json { "data": [ [ 1746441300, 61.59 ], [ 1746441400, 62.1 ], [ 1746441500, 61.85 ] ] } ``` -------------------------------- ### Get Coins Source: https://coinstats.app/api-docs/openapi/get-coins Retrieve a list of coins with various filtering and sorting capabilities. This endpoint allows for detailed customization of the returned coin data. ```APIDOC ## GET /coins ### Description Retrieves a list of cryptocurrencies with extensive filtering and sorting options. ### Query Parameters - **include_risk_score** (boolean) - Optional - Set to "true" to include risk assessment metrics, or "false" to exclude them. - **categories** (string) - Optional - Filter coins by categories. Use comma-separated values (e.g., "defi,memecoins,gaming"). - **sortBy** (enum) - Optional - Field to sort results by. Available options: `rank`, `marketCap`, `price`, `volume`, `priceChange1h`, `priceChange1d`, `priceChange7d`, `priceChange1m`, `name`, `symbol`. - **sortDir** (enum) - Optional - Sort direction for the results. Use "asc" for ascending order or "desc" for descending order. Available options: `asc`, `desc`. - **marketCap~greaterThan** (number) - Optional - Filter coins with market capitalization greater than the specified value (in USD). - **marketCap~equals** (number) - Optional - Filter coins with market capitalization equal to the specified value (in USD). - **marketCap~lessThan** (number) - Optional - Filter coins with market capitalization less than the specified value (in USD). - **fullyDilutedValuation~greaterThan** (number) - Optional - Filter coins with fully diluted valuation greater than the specified value (in USD). - **fullyDilutedValuation~equals** (number) - Optional - Filter coins with fully diluted valuation equal to the specified value (in USD). - **fullyDilutedValuation~lessThan** (number) - Optional - Filter coins with fully diluted valuation less than the specified value (in USD). - **volume~greaterThan** (number) - Optional - Filter coins with 24-hour trading volume greater than the specified value (in USD). - **volume~equals** (number) - Optional - Filter coins with 24-hour trading volume equal to the specified value (in USD). - **volume~lessThan** (number) - Optional - Filter coins with 24-hour trading volume less than the specified value (in USD). - **priceChange1h~greaterThan** (number) - Optional - Filter coins with 1-hour price change greater than the specified percentage. - **priceChange1h~equals** (number) - Optional - Filter coins with 1-hour price change equal to the specified percentage. - **priceChange1h~lessThan** (number) - Optional - Filter coins with 1-hour price change less than the specified percentage. - **priceChange1d~greaterThan** (number) - Optional - Filter coins with 24-hour price change greater than the specified percentage. - **priceChange1d~equals** (number) - Optional - Filter coins with 24-hour price change equal to the specified percentage. - **priceChange1d~lessThan** (number) - Optional - Filter coins with 24-hour price change less than the specified percentage. - **priceChange7d~greaterThan** (number) - Optional - Filter coins with 7-day price change greater than the specified percentage. - **priceChange7d~equals** (number) - Optional - Filter coins with 7-day price change equal to the specified percentage. - **priceChange7d~lessThan** (number) - Optional - Filter coins with 7-day price change less than the specified percentage. - **priceChange1m~greaterThan** (number) - Optional - Filter coins with 1-month price change greater than the specified percentage. - **priceChange1m~equals** (number) - Optional - Filter coins with 1-month price change equal to the specified percentage. - **priceChange1m~lessThan** (number) - Optional - Filter coins with 1-month price change less than the specified percentage. - **availableSupply~greaterThan** (number) - Optional - Filter coins with circulating supply greater than the specified amount. - **availableSupply~equals** (number) - Optional - Filter coins with circulating supply equal to the specified amount. ``` -------------------------------- ### Fetch Fear & Greed Index Chart Data (cURL) Source: https://coinstats.app/api-docs/openapi/fear-and-greed-chart Use this cURL command to make a GET request to the API endpoint for historical Fear & Greed Index data. Remember to replace `` with your actual API key. ```bash curl --request GET \ --url https://api.coinstats.app/v1/insights/fear-and-greed/chart \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch Coins with Risk Score (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Example cURL request to include the risk score in the response. Set the `includeRiskScore` parameter to `true` to retrieve this additional data point for each coin. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?includeRiskScore=true' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Get the Crypto Fear & Greed Index Source: https://coinstats.app/api-docs/openapi/fear-and-greed Fetches the Crypto Fear & Greed Index, a measure of market sentiment ranging from 0 (Extreme Fear) to 100 (Extreme Greed). This indicator aggregates various factors to gauge investor emotions and helps identify potential market tops and bottoms. ```APIDOC ## GET /v1/insights/fear-and-greed ### Description Retrieves the Crypto Fear & Greed Index, which measures market sentiment from 0 (Extreme Fear) to 100 (Extreme Greed). It aggregates factors like volatility, market momentum, social media, and surveys to gauge investor emotional state, helping to identify potential market tops (greed) and bottoms (fear). ### Method GET ### Endpoint https://api.coinstats.app/v1/insights/fear-and-greed ### Parameters #### Header Parameters - **X-API-KEY** (string) - Required - API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the `X-API-KEY` request header. Never expose your key in client-side code. ### Response #### Success Response (200) - **name** (string) - Required - Name of the index. Example: "Fear and Greed Index" - **now** (object) - Required - Current Fear and Greed index data. Includes `value`, `value_classification`, `timestamp`, and `update_time`. - **yesterday** (object) - Required - Fear and Greed index data from yesterday. Includes `value`, `value_classification`, and `timestamp`. - **lastWeek** (object) - Required - Fear and Greed index data from last week. Includes `value`, `value_classification`, and `timestamp`. #### Response Example ```json { "name": "Fear and Greed Index", "now": { "value": 73, "value_classification": "Greed", "timestamp": 1747052304, "update_time": "2025-05-12T12:08:10.020Z" }, "yesterday": { "value": 73, "value_classification": "Greed", "timestamp": 1747052304 }, "lastWeek": { "value": 73, "value_classification": "Greed", "timestamp": 1747052304 } } ``` ``` -------------------------------- ### Get Historical Fear & Greed Index Data Source: https://coinstats.app/api-docs/openapi/fear-and-greed-chart Fetches historical daily data for the Crypto Fear & Greed Index. The response includes timestamps, numerical values (0-100), and sentiment classifications (e.g., 'Greed', 'Fear'). ```APIDOC ## GET /v1/insights/fear-and-greed/chart ### Description Retrieves historical daily values for the Crypto Fear & Greed Index, including timestamps, numerical values (0-100), and sentiment classifications. ### Method GET ### Endpoint https://api.coinstats.app/v1/insights/fear-and-greed/chart ### Parameters #### Header Parameters - **X-API-KEY** (string) - Required - API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the `X-API-KEY` request header. ### Response #### Success Response (200) - **name** (string) - Required - Name of the index. Example: "Fear and Greed Index" - **data** (object[]) - Required - Array of fear and greed data points. Each object contains: - **timestamp** (string) - The timestamp of the data point. - **value** (integer) - The numerical value of the index (0-100). - **value_classification** (string) - The sentiment classification (e.g., "Extreme Fear", "Fear", "Neutral", "Greed", "Extreme Greed"). ### Response Example ```json { "name": "Fear and Greed Index", "data": [ { "timestamp": "1746921600", "value": 75, "value_classification": "Greed" } ] } ``` ``` -------------------------------- ### Connect Wallet to Portfolio Source: https://coinstats.app/api-docs/openapi/connect-portfolio-wallet Use this cURL command to connect a wallet address to your account and create a new portfolio. Ensure you replace `` with your actual API key. The request body includes the wallet address, the blockchain network identifier, and an optional custom name for the portfolio. ```curl curl --request POST \ --url https://api.coinstats.app/v1/portfolio/wallet \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: ' \ --data \ '{ "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "connectionId": "ethereum", "name": "My Ethereum Wallet" }' ``` -------------------------------- ### Fetch All Coins Data (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Use this cURL command to fetch comprehensive data for all cryptocurrencies. Ensure you replace `` with your actual API key. This request returns detailed information including price, market cap, volume, and supply metrics. ```bash curl --request GET \ --url https://api.coinstats.app/v1/coins \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch Coins by Name (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins Demonstrates how to search for coins by their name using a cURL request. The `name` parameter supports partial matching, allowing you to find coins containing a specific substring. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?name=bitcoin' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Connect Wallet to Portfolio Source: https://coinstats.app/api-docs/openapi/connect-portfolio-wallet Connect a wallet to your account and create a tracked portfolio. This endpoint allows you to link a specific wallet address to a blockchain network, creating a new portfolio or associating it with an existing one. It returns a portfolio ID and connection status. ```APIDOC ## POST /v1/portfolio/wallet ### Description Connect a wallet to your account and create a tracked portfolio. This endpoint allows you to link a specific wallet address to a blockchain network, creating a new portfolio or associating it with an existing one. It returns a portfolio ID and connection status. ### Method POST ### Endpoint /v1/portfolio/wallet ### Parameters #### Request Body - **address** (string) - Required - Wallet address to connect. - **connectionId** (string) - Required - Blockchain network identifier (e.g., "ethereum", "polygon"). - **name** (string) - Optional - Custom display name for the portfolio. ### Request Example ```json { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "connectionId": "ethereum", "name": "My Ethereum Wallet" } ``` ### Response #### Success Response (200) - **portfolioId** (string) - The unique identifier of the connected portfolio. - **connectionId** (string) - The connectionId used to connect the portfolio. - **status** (string) - "connected" if a new portfolio was created, "existing" if the portfolio already exists. Available options: `connected`, `existing`. #### Response Example ```json { "portfolioId": "a1b2c3d4e5f6...", "connectionId": "ethereum", "status": "connected" } ``` #### Authorizations - **X-API-KEY** (string) - Required - API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the `X-API-KEY` request header. Never expose your key in client-side code. ``` -------------------------------- ### Add Transaction to Manual Portfolio (cURL) Source: https://coinstats.app/api-docs/openapi/add-portfolio-transaction Use this cURL command to send a POST request to add a new transaction to your manual portfolio. Ensure you replace `` with your actual API key and provide the correct transaction details. ```bash curl --request POST \ --url https://api.coinstats.app/v1/portfolio/transaction \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: ' \ --data ' { "coinId": "bitcoin", "count": 0.1, "date": 1715948176654, "price": 66252.93, "portfolioId": "xobgM6CHi1zaEJaCXmPWenVoS", "currency": "USD", "notes": "Some notes." } ' ``` -------------------------------- ### Fetch Coins by Currency (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins This cURL command shows how to specify the display currency for coin prices and market data. The default currency is USD. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?currency=EUR' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch BTC Dominance Data (All Time) Source: https://coinstats.app/api-docs/openapi/btc-dominance This cURL command retrieves all available historical Bitcoin dominance data. Replace `` with your valid API key. The data is returned as an array of [timestamp, percentage] pairs. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/insights/btc-dominance?type=all' \ --header 'X-API-KEY: ' ``` ```json { "data": [ [ 1746441300, 61.59 ], [ 1746441400, 62.1 ], [ 1746441500, 61.85 ] ] } ``` -------------------------------- ### Connect Exchange Account cURL Request Source: https://coinstats.app/api-docs/openapi/connect-portfolio-exchange Use this cURL command to connect an exchange account and create a tracked portfolio. Ensure you replace placeholder values with your actual API key, secret, and desired portfolio name. The `connectionId` should be a supported exchange identifier. ```curl curl --request POST \ --url https://api.coinstats.app/v1/portfolio/exchange \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: ' \ --data ' { "connectionId": "binance", "connectionFields": { "apiKey": "your_exchange_api_key_here", "apiSecret": "your_exchange_api_secret_here" }, "name": "My Binance Portfolio" }' ``` -------------------------------- ### Fetch Coins by Blockchain (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins This cURL command illustrates how to filter coins by specifying the blockchain network. You can provide a comma-separated list of common blockchain names. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?blockchains=ethereum,solana,binance-smart-chain' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Fetch Coins by Symbol (cURL) Source: https://coinstats.app/api-docs/openapi/get-coins This cURL command shows how to filter coins based on their trading symbol. Use standard symbols like BTC or ETH in the `symbol` query parameter. ```bash curl --request GET \ --url 'https://api.coinstats.app/v1/coins?symbol=BTC' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Sync Exchange Data via cURL Source: https://coinstats.app/api-docs/openapi/exchange-sync-status Use this cURL command to trigger a synchronization of your exchange portfolio. Ensure you include your API key and the correct portfolio ID. ```curl curl --request PATCH \ --url 'https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419' \ --header 'X-API-KEY: ' ``` -------------------------------- ### Successful Wallet Connection Response Source: https://coinstats.app/api-docs/openapi/connect-portfolio-wallet This is a successful response when a wallet is connected. It provides a unique portfolio ID and confirms the connection status. The `connectionId` returned matches the one sent in the request. ```json { "portfolioId": "a1b2c3d4e5f6...", "connectionId": "ethereum", "status": "connected" } ``` -------------------------------- ### Successful Sync Response Source: https://coinstats.app/api-docs/openapi/exchange-sync-status This is the expected JSON response upon a successful exchange data synchronization. ```json { "success": true } ```