Crypto API Documentation

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:

ControlDescription
functionFunction: Specifies the desired dataset to be retrieved.
modeMode: Determines the data mode for the function.
orderOrder: Defines the sort order for the dataset (most often either ascending or descending).
limitLimit: Sets the limit for the number of results in the dataset (with a maximum of 50).
excludeExclude: Option to exclude stable coins and wrapped assets from the dataset.
keyKey: 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:

infoHuman-readable API message, useful for debugging.
updatedTimestamp indicating the last update of the data.
dataThe 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:

FunctionDescriptionModes
market*Assets by Market Cap(int) = start limit, (category) = asset class filter
movers*Large price movements24h, 7d, 14d, 30d
ranksTop ranking assetsmarket_cap, total_volume, ath_change, market_cap
volumeVolume vs. supply metricsmarket_cap, volume, circulating_supply, total_supply, price_change
supplyCirculating supply metricspercent, total_supply
rangeVolatility range metricsmarket_cap, total_volume_daily_range
global*Global market statistics.None.
headlines*Crypto News HeadlinesNone. Data is limited to 24 items and no article image when API key is not provided.
altsAltseason index and statusNone. See additional properties table below.
* = No API Key Required (Limited Data)

“alts” Function Additional JSON Properties

These JSON properties are returned in addition to “data” when using the “alts” function.

PropertyDescription
avgGainAverage Alt Season Index Gain in %
btcPerfBTC 30D Performance in %
altSeasonIs it altseason?
altPerfNumber of assets outperforming BTC
lcMovesLarge 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]