Turn Your Ideas into Reality with Our User-Friendly Digital Asset Exchange API. Tailored endpoints allow you to access the datasets that matter most to you with ease. Unlock the potential of your data and build better solutions with our customizable options.
Contents
Features at a Glance
Easy and Convenient
Get the data you need with ease thanks to our pre-made API calls. We also offer rich features for advanced users who are building custom applications.
Market Movers
Track the assets with the largest price increase or decrease over a specified time frame (24 hours, 7 days, 14 days, 30 days).
Top Ranks
Keep track of the top assets and sort them by market capitalization, 24-hour volume, or all-time high change to stay informed on market trends.
Alt Season Index
Stay ahead of the market and monitor top altcoin movements against BTC to detect the start of an altcoin season and capitalize on opportunities.
Volume and Supply
Monitor market liquidity by tracking the circulating supply and trade volume of the top assets. Use this information to make better-informed trading decisions.
Trading Range
Find the best assets to daytrade by identifying those with the largest trading range and the most volume, maximizing your opportunities for success.
Global Market Stats
Get a comprehensive view of the market by monitoring key metrics like sentiment and BTC dominance, giving you a better understanding of market participants and trends.
Crypto News Headlines
Stay on top of the latest crypto news from top sources across the web.
Quick Start
The Crypto Market API has 6 main controls for data retrieval:
Control | Description |
function | Function: Specifies the desired dataset to be retrieved. |
mode | Mode: Determines the data mode for the function. |
order | Order: Defines the sort order for the dataset (most often either ascending or descending). |
limit | Limit: Sets the limit for the number of results in the dataset (with a maximum of 50). |
exclude | Exclude: Option to exclude stable coins and wrapped assets from the dataset. |
key | Key: User-provided API key for accessing advanced functions. |
Example API Call Structure
https://api.viewbits.com/v1/crypto?function=[FUNCTION]&mode=[MODE]&order=[ORDER]&limit=[LIMIT]&exclude=[EXCLUDE]&key=[YOUR_KEY]
API Response
The API returns a JSON object with the following properties:
info | Human-readable API message, useful for debugging. |
updated | Timestamp indicating the last update of the data. |
data | The main API data, containing the requested information |
Sample API Response
{ "info": "API Information Based on Call", "updated": "1234567890", "data": [{DATA OBJECT},{DATA OBJECT},...] } ] }
1. Function
function=[option]
To retrieve useful API data, you must first specify a function from the options below:
Function | Description | Modes |
market* | Assets by Market Cap | (int) = start limit, (category) = asset class filter |
movers* | Large price movements | 24h, 7d, 14d, 30d |
ranks | Top ranking assets | market_cap, total_volume, ath_change, market_cap |
volume | Volume vs. supply metrics | market_cap, volume, circulating_supply, total_supply, price_change |
supply | Circulating supply metrics | percent, total_supply |
range | Volatility range metrics | market_cap, total_volume_daily_range |
global* | Global market statistics. | None. |
headlines* | Crypto News Headlines | None. Data is limited to 24 items and no article image when API key is not provided. |
alts | Altseason index and status | None. See additional properties table below. |
“alts” Function Additional JSON Properties
These JSON properties are returned in addition to “data” when using the “alts” function.
Property | Description |
avgGain | Average Alt Season Index Gain in % |
btcPerf | BTC 30D Performance in % |
altVerdict | Is it altseason? |
altPerf | Number of assets outperforming BTC |
lcMoves | Large Cap Moves vs. BTC |
2. Mode
mode=[option]
The API mode serves as a filter to refine the data within a particular function. When no mode is specified, the default mode for the function will be used. Consult the Functions section to see the available modes for each function.
3. Order
order=[asc,desc]
The order parameter allows you to sort the data within the dataset either in ascending or descending order. Please note that the sort order may be the reverse of what you expect, depending on the type of data being retrieved.
4. Limit
limit=[num]
The limit parameter allows you to specify the amount of data you want to retrieve in the API dataset. By default, a limited number of results will be returned. To retrieve a larger amount of data, an API key is required.
5. Exclude
exclude=[true]
The exclude feature enables you to remove stable coins and wrapped assets from the dataset. This can be achieved by adding the apiexclude tag to the API call.
6. Advanced Data
key=[api_key]
The API key is a user-supplied identifier that is required to access advanced API functions and increased rate limits. Without an API key, certain functions may be limited in their capabilities.
7. Example Calls
Some calls for the most popular datasets are included below for reference or to use as a starting point:
Top Gainers This Week
https://api.viewbits.com/v1/crypto?function=movers&mode=7d&key=[YOUR_KEY]
Top Losers This Month
https://api.viewbits.com/v1/crypto?function=movers&mode=30d&order=asc&key=[YOUR_KEY]
24H Volume vs. Circulating Supply by Highest Volume
https://api.viewbits.com/v1/crypto?function=volume&mode=total_volume&order=desc&key=[YOUR_KEY]
24H Volume vs. Circulating Supply by Biggest Gain
https://api.viewbits.com/v1/crypto?function=volume&mode=price_change&order=desc&key=[YOUR_KEY]
Lowest Circulating Supply %
https://api.viewbits.com/v1/crypto?function=volume&mode=percent&order=asc&key=[YOUR_KEY]
Daily Range (24H) by Highest Volume
https://api.viewbits.com/v1/crypto?function=range&mode=total_volume&order=desc&key=[YOUR_KEY]
Daily Range (24H) by Market Cap
https://api.viewbits.com/v1/crypto?function=range&mode=market_cap&order=asc&key=[YOUR_KEY]
Global Market Stats
https://api.viewbits.com/v1/crypto?function=global&key=[YOUR_KEY]
Crypto News Headlines
https://api.viewbits.com/v1/crypto?function=headlines&limit=50&key=[YOUR_KEY]