NAV
shell python javascript

Introduction

Welcome to the Bitformance API! You can use our API to access cryptocurrency data that powers the Bitformance website, including information on various coins, market trends, and historical data.

We offer language bindings in Shell, JavaScript, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples using the tabs in the top right.

To access the API, you'll need both an API-KEY and an API-SECRET-KEY. Free API keys are available to all users with limited calls per month and restricted access to certain endpoints. For additional access and higher usage limits, please contact the Bitformance Team at contact@bitformance.com.

Authentication

To authorize, use this code:

import requests

url = "https://api.bitformance.com/api/v2/api_endpoint_here"
headers = {
    "API-KEY": "your_api_key_here",
    "API-SECRET-KEY": "your_api_secret_key_here"
}

response = requests.get(url, headers=headers)
print(response.json())
curl "https://api.bitformance.com/api/v2/api_endpoint_here" \
  -H "API-KEY: your_api_key_here" \
  -H "API-SECRET-KEY: your_api_secret_key_here"
const fetch = require('node-fetch');

const url = "https://api.bitformance.com/api/v2/api_endpoint_here";
const headers = {
    "API-KEY": "your_api_key_here",
    "API-SECRET-KEY": "your_api_secret_key_here"
};

fetch(url, { headers })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));

Make sure to replace your_api_key_here and your_api_secret_key_here with your API key and your Secret Key.

Bitformance uses API keys to allow access to the API. You can register a new Bitformance API key by creating an account on Our Website and navigating to the API Keys Dashboard once logged in.

User Access

The access to each endpoint is subscription based. Endpoints with the "free" tier designation are available to all users. Some endpoints require a higher tier, or paid subscription. The available tiers are listed below:

Rate Limits

The frequency at which users can call the endpoints are based on the user's tier subscription. Default rate limits are listed below and apply to most endpoints, however some endpoints have custom rate limits. Please read the endpoint's documentation on its rate limits for more information.

Historical Data Access

Different subscription tiers have access to different amounts of historical data:

Endpoints

Get Browsable Indexes

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Without query parameters
url = "https://api.bitformance.com/api/v2/get-browsable-indexes"
headers = {
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_api_secret_key"
}

response = requests.get(url, headers=headers)
indexes = response.json()

# With query parameters
params = {
    "sortField": "marketcap",
    "sortOrder": "desc",
    "indexType": "all"
}

response = requests.get(url, headers=headers, params=params)
indexes = response.json()
# Without query parameters
curl "https://api.bitformance.com/api/v2/get-browsable-indexes" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_api_secret_key"

# With query parameters
curl "https://api.bitformance.com/api/v2/get-browsable-indexes?sortField=marketcap&sortOrder=desc&indexType=all" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_api_secret_key"
const fetch = require('node-fetch');

// Without query parameters
const url = "https://api.bitformance.com/api/v2/get-browsable-indexes";
const headers = {
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_api_secret_key"
};

fetch(url, { headers })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));

// With query parameters
const params = new URLSearchParams({
    sortField: 'marketcap',
    sortOrder: 'desc',
    indexType: 'all'
});

fetch(`${url}?${params.toString()}`, { headers })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));

The above command returns JSON structured like this:

{
  "success": true,
  "data": [
    {
      "index_info": {
        "_id": "65569daf76cd9d2bc8ec55b5",
        "created": "2023-11-16 22:54:38.948000",
        "updated": "2024-08-24 12:01:06.870000",
        "initial_timestamp": 1483315200,
        "name": "50/50 Bitcoin + Ethereum",
        "description": "50/50 Bitcoin + Ethereum with a monthly rebalance and an initial starting balance of $1,000.",
        "algorithm": "market_cap",
        "sector": "Cryptocurrency",
        "industry": "Digital Currency",
        "asset_type": "cryptocurrency",
        "weighting_method": "custom",
        "rebalancing_interval": "monthly",
        "custom_weights": {
          "BTC": 0.5,
          "ETH": 0.5
        }
      },
      "index_holdings": [
        {
          "ticker": "BTC",
          "id": 1
        },
        {
          "ticker": "ETH",
          "id": 1027
        }
      ],
      "index_performance": {
        "initial_value": 1000.0,
        "value": 15847.23,
        "change_24hour": 234.56,
        "changepct_24hour": 1.5,
        "change_7d": -567.89,
        "changepct_7d": -3.46,
        "change_1m": 1234.56,
        "changepct_1m": 8.44,
        "change_3m": 2345.67,
        "changepct_3m": 17.37,
        "change_6m": 3456.78,
        "changepct_6m": 27.85,
        "change_1y": 4567.89,
        "changepct_1y": 40.47,
        "drawdown": -15.23,
        "marketcap": 128456789.12,
        "asset_performance_24h_bullish": 1,
        "asset_performance_24h_bearish": 1,
        "asset_sma_200d_over": 1,
        "asset_sma_200d_under": 1,
        "asset_sma_50d_over": 1,
        "asset_sma_50d_under": 1,
        "asset_1y_high": 0,
        "asset_1y_low": 0,
        "asset_alltime_high": 0,
        "asset_alltime_low": 0,
        "asset_new_highs": 0,
        "asset_new_lows": 0,
        "asset_performance_7d_bearish": 1,
        "asset_performance_7d_bullish": 1,
        "asset_sma_200d_over_7d": 1,
        "asset_sma_200d_under_7d": 1,
        "asset_sma_50d_over_7d": 1,
        "asset_sma_50d_under_7d": 1,
        "asset_1y_high_7d": 0,
        "asset_1y_low_7d": 0,
        "asset_alltime_high_7d": 0,
        "asset_alltime_low_7d": 0
      }
    }
  ]
}

This endpoint retrieves all publicly available browsable indexes. You can filter, sort, and organize the results using optional query parameters.

HTTP Request

GET https://api.bitformance.com/api/v2/get-browsable-indexes

Query Parameters

Parameter Type Default Description
sortField string marketcap Field to sort by. Accepted values: marketcap, market_cap, name, created, updated, value, change_24hour, changepct_24hour, change_7d, changepct_7d, change_1m, changepct_1m, change_3m, changepct_3m, change_6m, changepct_6m, change_1y, changepct_1y
sortOrder string desc Sort direction. Accepted values: asc, desc
indexType string bitformance Type of indexes to return. Accepted values: bitformance, sector, aggregated, all

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
updated Timestamp indicating when the index was last updated.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index.
description The description of the index.
algorithm The algorithm used to construct the index (e.g., "market_cap", "equal_weight", "sector_ranked").
sector The sector classification of the index.
industry The industry classification of the index (if applicable).
asset_type The type of assets included in the index (e.g., "cryptocurrency").
weighting_method The method used to assign weights to the assets in the index.
rebalancing_interval The frequency at which the index is rebalanced.
custom_weights Contains custom weighting values if the "weighting_method" is "custom".
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id Unique asset identifier (CMC ID).
index_performance Description
initial_value The initial value of the index on inception, also known as the starting investment.
value Current value of the index.
change_24hour Absolute change in index value over the last 24 hours.
changepct_24hour Percentage change in index value over the last 24 hours.
change_7d Absolute change in index value over the last 7 days.
changepct_7d Percentage change in index value over the last 7 days.
change_1m Absolute change in index value over the last 1 month.
changepct_1m Percentage change in index value over the last 1 month.
change_3m Absolute change in index value over the last 3 months.
changepct_3m Percentage change in index value over the last 3 months.
change_6m Absolute change in index value over the last 6 months.
changepct_6m Percentage change in index value over the last 6 months.
change_1y Absolute change in index value over the last 1 year.
changepct_1y Percentage change in index value over the last 1 year.
drawdown Maximum drawdown percentage of the index.
marketcap Total market capitalization of all assets in the index.
asset_performance_24h_bullish Number of assets in the index whose current live price is at or above their last daily close (last_daily_close).
asset_performance_24h_bearish Number of assets in the index whose current live price is lower than their last daily close (last_daily_close), i.e. the asset has lost value since the previous day's close.
asset_sma_200d_over Number of assets currently trading at or above their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_200d_under Number of assets currently trading below their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_50d_over Number of assets currently trading at or above their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_sma_50d_under Number of assets currently trading below their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_1y_high Number of assets whose current live price is higher than their 1-year high (one_year_high) — the highest daily closing price recorded over the trailing ~365 days.
asset_1y_low Number of assets whose current live price is lower than their 1-year low (one_year_low) — the lowest daily closing price recorded over the trailing ~365 days.
asset_alltime_high Number of assets whose current live price is higher than their all-time high (all_time_high) — the highest daily closing price ever recorded for that asset.
asset_alltime_low Number of assets whose current live price is lower than their all-time low (all_time_low) — the lowest daily closing price ever recorded for that asset.
asset_new_highs Number of assets whose current live price is higher than their 7-day high (weekly_high) — the highest daily closing price recorded over the trailing 7 days.
asset_new_lows Number of assets whose current live price is lower than their 7-day low (weekly_low) — the lowest daily closing price recorded over the trailing 7 days.
index_performance (7-day variants) Description
asset_performance_7d_bearish Number of assets whose current live price is below the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2) — a rougher, week-scale version of asset_performance_24h_bearish.
asset_performance_7d_bullish Number of assets whose current live price is at or above the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2).
asset_sma_200d_over_7d Number of assets whose current live price or 7-day high (weekly_high) is at or above their 200-day SMA (avg_price_200d) — true if the asset was above its 200-day average at any point in the last 7 days, not just right now.
asset_sma_200d_under_7d Number of assets where neither the current live price nor the 7-day high crossed at or above the 200-day SMA.
asset_sma_50d_over_7d Number of assets whose current live price or 7-day high (weekly_high) is at or above their 50-day SMA (avg_price_50d).
asset_sma_50d_under_7d Number of assets where neither the current live price nor the 7-day high crossed at or above the 50-day SMA.
asset_1y_high_7d Number of assets whose current live price or 7-day high (weekly_high) exceeds their 1-year high (one_year_high) — true if the asset hit a new 1-year high at any point in the last 7 days, not just right now.
asset_1y_low_7d Number of assets whose current live price or 7-day low (weekly_low) is below their 1-year low (one_year_low).
asset_alltime_high_7d Number of assets whose current live price or 7-day high (weekly_high) exceeds their all-time high (all_time_high).
asset_alltime_low_7d Number of assets whose current live price or 7-day low (weekly_low) is below their all-time low (all_time_low).

Get All Coins

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

response = requests.get('https://api.bitformance.com/api/v2/get-all-coins', 
    headers={
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    },
    params={
        'page': 1,
        'page_size': 100,
        'sortBy': 'market_cap',
        'sortOrder': 'desc',
        'exclude_fields': 'description'
    })

coin_data = response.json()
curl -G "https://api.bitformance.com/api/v2/get-all-coins" \
  --data-urlencode "page=1" \
  --data-urlencode "page_size=100" \
  --data-urlencode "sortBy=market_cap" \
  --data-urlencode "sortOrder=desc" \
  --data-urlencode "exclude_fields=description" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const response = await fetch('https://api.bitformance.com/api/v2/get-all-coins?page=1&page_size=100&sortBy=market_cap&sortOrder=desc&exclude_fields=description', {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
});

const coinData = await response.json();

The above command returns JSON structured like this:

{
  "success": true,
  "data": [
    {
      "coin_id": 1,
      "coin_slug": "bitcoin",
      "name": "Bitcoin",
      "symbol": "BTC",
      "tier_lvl_1": "Digital Currency",
      "tier_lvl_2": "General",
      "last_updated": "2024-08-25T22:12:00.000Z",
      "price": 64510.34179357949,
      "market_cap": 1273762311113.9631,
      "volume": 17528186093.072506,
      "last_daily_close": 64176.36706695918,
      "all_time_high": 73079.3733787985,
      "all_time_low": 0.04951,
      "avg_price_200d": 63241.400978283695,
      "avg_price_50d": 61652.955475512186,
      "change_24hour": 65334.582599120564,
      "changepct_24hour": 1.27768786,
      "change_7day": 69978.65742318358,
      "changepct_7day": 8.4766496,
      "change_1m": -1234.56,
      "changepct_1m": -1.87,
      "change_3m": 2345.67,
      "changepct_3m": 3.64,
      "change_6m": 5678.90,
      "changepct_6m": 8.81,
      "change_1y": 12345.67,
      "changepct_1y": 19.15,
      "one_year_high": 73079.3733787985,
      "one_year_low": 25684.019423324316,
      "weekly_high": 64176.36706695918,
      "weekly_low": 58482.74531725411
    }
  ]
}

This endpoint retrieves a paginated list of cryptocurrency data. Returns 100 coins per page by default, with options for sorting, filtering, and field selection.

HTTP Request

GET https://api.bitformance.com/api/v2/get-all-coins

Query Parameters

Parameter Type Default Description
page integer 1 Specifies the page number to retrieve (e.g., 1, 2, 3, etc.)
page_size integer 100 Number of coins to return per page. Maximum value is 200
sortBy string market_cap Field to sort by. Accepted values: market_cap, price, name, symbol, volume, change_24hour, changepct_24hour, change_7day, changepct_7day, all_time_high, all_time_low
sortOrder string desc Sort direction. Accepted values: asc, desc
tax_only string - When present (any value), returns only coins with valid taxonomy classification, excluding "Uncategorized" and "BLACKLIST" coins
include_fields string - Comma-separated list of fields to add to the default set of response fields. Mainly useful for adding back description, which is excluded by default. Example: description
exclude_fields string - Comma-separated list of fields to remove from the default set of response fields. Example: tier_lvl_1,tier_lvl_2

Field Selection

include_fields and exclude_fields both start from the default set of fields (every field listed below except description, which is excluded by default) and can be combined in the same request:

Include Fields

Add description back into the default response: GET /api/v2/get-all-coins?include_fields=description

Exclude Fields

Remove specific fields from the default response: GET /api/v2/get-all-coins?exclude_fields=tier_lvl_1,tier_lvl_2

Combining Both

exclude_fields takes priority when a field appears in both lists: GET /api/v2/get-all-coins?include_fields=description&exclude_fields=description This still excludes description, since exclude_fields overrides include_fields for that field.

Available Fields

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data (array of coin objects) Description
coin_id Unique coin identifier (CMC ID).
coin_slug URL-friendly version of the coin's name.
name The full name of the cryptocurrency.
symbol The ticker symbol of the cryptocurrency.
description Description of the cryptocurrency. (Excluded by default)
tier_lvl_1 The level 1 taxonomy classification of the cryptocurrency (sector).
tier_lvl_2 The level 2 taxonomy classification of the cryptocurrency (sub-sector/industry).
last_updated The timestamp of the last time the data for this cryptocurrency was updated.
price The current live price of the cryptocurrency (in USD). Refreshed roughly every 5 minutes from the market data feed.
market_cap The total market capitalization of the cryptocurrency (price × circulating supply).
volume The total trading volume of the cryptocurrency over the last 24 hours.
last_daily_close The cryptocurrency's closing price on the most recently completed UTC trading day. Recalculated once per day; does not move with the live price field between daily runs.
all_time_high The highest daily closing price ever recorded for this cryptocurrency, based on its full daily price history. Recalculated once per day, so the live price can trade above this value intraday before that day's close is folded in.
all_time_low The lowest daily closing price ever recorded for this cryptocurrency. Recalculated once per day, same caveat as all_time_high.
avg_price_200d The 200-day simple moving average (SMA) of daily closing prices — the mean of the trailing 200 daily closes. Recalculated once per day, not a live average of the price field.
avg_price_50d The 50-day simple moving average (SMA) of daily closing prices — the mean of the trailing 50 daily closes. Recalculated once per day, not a live average of the price field.
change_24hour The change in the cryptocurrency's value over the last 24 hours in dollars.
changepct_24hour The percentage change in the cryptocurrency's value over the last 24 hours.
change_7day The change in the cryptocurrency's value over the last 7 days in dollars.
changepct_7day The percentage change in the cryptocurrency's value over the last 7 days.
change_1m The change in the cryptocurrency's value over the last 1 month in dollars.
changepct_1m The percentage change in the cryptocurrency's value over the last 1 month.
change_3m The change in the cryptocurrency's value over the last 3 months in dollars.
changepct_3m The percentage change in the cryptocurrency's value over the last 3 months.
change_6m The change in the cryptocurrency's value over the last 6 months in dollars.
changepct_6m The percentage change in the cryptocurrency's value over the last 6 months.
change_1y The change in the cryptocurrency's value over the last 1 year in dollars.
changepct_1y The percentage change in the cryptocurrency's value over the last 1 year.
one_year_high The highest daily closing price recorded over the trailing ~365 days (the most recent 366 daily records). Recalculated once per day, so the live price can exceed this value intraday before that day's close updates the baseline.
one_year_low The lowest daily closing price recorded over the trailing ~365 days. Recalculated once per day, same caveat as one_year_high.
weekly_high The highest daily closing price recorded over the trailing 7 days. Recalculated once per day.
weekly_low The lowest daily closing price recorded over the trailing 7 days. Recalculated once per day.

Get Coin Data

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-coin-data"
params = {
    "symbols": "BTC,ETH",
    "timeseries_interval": "daily",
    "start": "1639612800",
    "metric": "closing_price",
    "exclude_fields": "description"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

coin_data = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-coin-data"
symbols="BTC,ETH"
timeseries_interval="daily"
start="1639612800"
metric="closing_price"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "symbols=$symbols" \
  --data-urlencode "timeseries_interval=$timeseries_interval" \
  --data-urlencode "start=$start" \
  --data-urlencode "metric=$metric" \
  --data-urlencode "exclude_fields=description" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-coin-data';
const params = new URLSearchParams({
    symbols: 'BTC,ETH',
    timeseries_interval: 'daily',
    start: '1639612800',
    metric: 'closing_price',
    exclude_fields: 'description'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": [
    {
      "cmc_id": 1,
      "symbol": "BTC",
      "name": "Bitcoin",
      "marketcap": 1275614678405.117,
      "volume": 17575445269.965878,
      "price": 64604.15587964322,
      "change_24hour": 65292.934075997626,
      "change_7day": 70188.21847699354,
      "changepct_24hour": 1.06615153,
      "changepct_7day": 8.64350369,
      "change_1m": -1234.56,
      "changepct_1m": -1.87,
      "change_3m": 2345.67,
      "changepct_3m": 3.64,
      "change_6m": 5678.90,
      "changepct_6m": 8.81,
      "change_1y": 12345.67,
      "changepct_1y": 19.15,
      "tier_lvl_1": "Digital Currency",
      "tier_lvl_2": "General",
      "daily_timeseries_data": [
        {
          "date": "2021-12-16 00:00:00",
          "value": 48830.04419072105
        },
        {
          "date": "2021-12-17 00:00:00",
          "value": 47937.389462730425
        },
        {
          "date": "2021-12-18 00:00:00",
          "value": 46336.761330639274
        },
        {
          "date": "2021-12-19 00:00:00",
          "value": 47827.85538517314
        }
      ],
      "initial_value": 48830.04419072105
    },
    {
      "cmc_id": 1027,
      "symbol": "ETH",
      "name": "Ethereum",
      "marketcap": 281239666935.0205,
      "volume": 13784465135.147797,
      "price": 2337.312950154836,
      "change_24hour": 2350.33965816199,
      "change_7day": 2235.9280441047767,
      "changepct_24hour": 0.55733692,
      "changepct_7day": -4.33766929,
      "change_1m": -123.45,
      "changepct_1m": -5.01,
      "change_3m": 234.56,
      "changepct_3m": 10.88,
      "change_6m": 345.67,
      "changepct_6m": 17.35,
      "change_1y": 1234.56,
      "changepct_1y": 111.88,
      "tier_lvl_1": "Smart Contract Platform",
      "tier_lvl_2": "Layer 1",
      "daily_timeseries_data": [
        {
          "date": "2021-12-16 00:00:00",
          "value": 4018.3886028698
        },
        {
          "date": "2021-12-17 00:00:00",
          "value": 3962.4696385927
        },
        {
          "date": "2021-12-18 00:00:00",
          "value": 3879.4866765735
        },
        {
          "date": "2021-12-19 00:00:00",
          "value": 3960.8600159608
        }
      ],
      "initial_value": 4018.3886028698
    }
  ]
}

This endpoint retrieves detailed information and historical data for specific cryptocurrencies by their symbols.

HTTP Request

GET https://api.bitformance.com/api/v2/get-coin-data

Query Parameters

Parameter Type Required Description
symbols string Yes Comma-separated list of cryptocurrency symbols (e.g., "BTC,ETH,DOGE"). Maximum 10 symbols per request.
timeseries_interval string No Time interval for historical data. Accepted values: daily, fivemin. When daily is used, returns one data point per day at UTC-0. When fivemin is used, returns 24-hour data with data points every 5 minutes.
start integer No UNIX (Epoch) timestamp indicating when the timeseries data should begin. Data access is limited based on subscription tier.
metric string No The metric to return in timeseries data. Accepted values: closing_price, market_cap. Defaults to closing_price.
include_fields string No Comma-separated list of fields to add to the default set of response fields. Mainly useful for adding back description, which is excluded by default. Example: description
exclude_fields string No Comma-separated list of fields to remove from the default set of response fields. Example: tier_lvl_1,tier_lvl_2

Field Selection

include_fields and exclude_fields both start from the default set of fields (every field listed below except description, which is excluded by default) and can be combined in the same request:

Include Fields

Add description back into the default response: GET /api/v2/get-coin-data?symbols=BTC,ETH&include_fields=description

Exclude Fields

Remove specific fields from the default response: GET /api/v2/get-coin-data?symbols=BTC,ETH&exclude_fields=tier_lvl_1,tier_lvl_2

Combining Both

exclude_fields takes priority when a field appears in both lists: GET /api/v2/get-coin-data?symbols=BTC,ETH&include_fields=description&exclude_fields=description This still excludes description, since exclude_fields overrides include_fields for that field.

Available Fields

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data (array of coin objects) Description
cmc_id Unique coin identifier (CoinMarketCap ID).
symbol The ticker symbol of the cryptocurrency.
name The full name of the cryptocurrency.
marketcap The total market capitalization of the cryptocurrency (price × circulating supply).
volume The total trading volume of the cryptocurrency over the last 24 hours.
price The current price of the cryptocurrency (in USD).
change_24hour The change in the cryptocurrency's value over the last 24 hours in dollars.
change_7day The change in the cryptocurrency's value over the last 7 days in dollars.
changepct_24hour The percentage change in the cryptocurrency's value over the last 24 hours.
changepct_7day The percentage change in the cryptocurrency's value over the last 7 days.
change_1m The change in the cryptocurrency's value over the last 1 month in dollars.
changepct_1m The percentage change in the cryptocurrency's value over the last 1 month.
change_3m The change in the cryptocurrency's value over the last 3 months in dollars.
changepct_3m The percentage change in the cryptocurrency's value over the last 3 months.
change_6m The change in the cryptocurrency's value over the last 6 months in dollars.
changepct_6m The percentage change in the cryptocurrency's value over the last 6 months.
change_1y The change in the cryptocurrency's value over the last 1 year in dollars.
changepct_1y The percentage change in the cryptocurrency's value over the last 1 year.
description Description of the cryptocurrency. (Excluded by default)
tier_lvl_1 The level 1 taxonomy classification of the cryptocurrency (sector).
tier_lvl_2 The level 2 taxonomy classification of the cryptocurrency (sub-sector/industry).
daily_timeseries_data Array of daily price data points (only when timeseries_interval=daily).
fivemin_timeseries_data Array of 5-minute price data points (only when timeseries_interval=fivemin).
initial_value The first value in the timeseries data (only when timeseries_interval is specified).

Get Bitformance Altcoin Index

Access Tier: STARTER

Credits Cost: 5 credits per request

Rate Limits

Tier Limit
Free Not accessible
Starter 15 requests per minute
Analyst 15 requests per minute
Professional 20 requests per minute
Enterprise Custom
import requests

response = requests.get('https://api.bitformance.com/api/v2/get-bitformance-altcoin-index', 
    headers={
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    },
    params={
        'timeseries_interval': 'daily',
        'weighting_method': 'market_cap',
        'metric': 'closing_price',
        'exclude_fields': 'description'
    })

index_data = response.json()
curl -G "https://api.bitformance.com/api/v2/get-bitformance-altcoin-index" \
  --data-urlencode "timeseries_interval=daily" \
  --data-urlencode "weighting_method=market_cap" \
  --data-urlencode "metric=closing_price" \
  --data-urlencode "exclude_fields=description" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const response = await fetch('https://api.bitformance.com/api/v2/get-bitformance-altcoin-index?timeseries_interval=daily&weighting_method=market_cap&metric=closing_price&exclude_fields=description', {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
});

const indexData = await response.json();

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "index_info": {
      "_id": "66bab123456789abcdef0123",
      "created": "2024-01-15T10:30:00.000Z",
      "updated": "2024-08-25T22:30:00.000Z",
      "initial_timestamp": "2017-04-01T00:00:00.000Z",
      "name": "Bitformance Altcoin Index",
      "description": "Tracks the performance of the top altcoins weighted by market capitalization",
      "algorithm": "top_ranked",
      "sector": "All",
      "industry": "All",
      "asset_type": "dynamic",
      "weighting_method": "market_cap",
      "rebalancing_interval": "monthly",
      "custom_weights": {}
    },
    "index_holdings": [
      {
        "ticker": "ETH",
        "id": 1027,
        "quantity": 15.234567
      },
      {
        "ticker": "BNB", 
        "id": 1839,
        "quantity": 8.456789
      }
    ],
    "index_performance": {
      "marketcap": 12500000000.50,
      "initial_value": 1000.0,
      "value": 2847.23,
      "drawdown": -12.45,
      "change_24hour": 2851.67,
      "change_7d": 2734.89,
      "changepct_24hour": 0.16,
      "changepct_7d": -3.95,
      "change_1m": 2623.45,
      "change_3m": 2156.78,
      "change_6m": 1987.34,
      "change_1y": 1543.21,
      "changepct_1m": -7.86,
      "changepct_3m": -24.26,
      "changepct_6m": -30.20,
      "changepct_1y": -45.80,
      "asset_new_highs": 3,
      "asset_new_lows": 1,
      "asset_performance_24h_bearish": 12,
      "asset_performance_24h_bullish": 38,
      "asset_sma_200d_over": 25,
      "asset_sma_200d_under": 25,
      "asset_sma_50d_over": 30,
      "asset_sma_50d_under": 20,
      "asset_1y_high": 8,
      "asset_1y_low": 2,
      "asset_alltime_high": 5,
      "asset_alltime_low": 0,
      "asset_performance_7d_bearish": 10,
      "asset_performance_7d_bullish": 40,
      "asset_sma_200d_over_7d": 27,
      "asset_sma_200d_under_7d": 23,
      "asset_sma_50d_over_7d": 32,
      "asset_sma_50d_under_7d": 18,
      "asset_1y_high_7d": 9,
      "asset_1y_low_7d": 2,
      "asset_alltime_high_7d": 6,
      "asset_alltime_low_7d": 0
    },
    "daily_timeseries_data": [
      {
        "date": "2017-04-01 00:00:00",
        "value": 1000.0
      },
      {
        "date": "2017-04-02 00:00:00", 
        "value": 1089.5754208146486
      },
      {
        "date": "2017-04-04 00:00:00",
        "value": 1134.4590760724552
      }
    ],
    "constituent_info": [
      {
        "coin_id": 1027,
        "coin_slug": "ethereum",
        "name": "Ethereum",
        "symbol": "ETH",
        "tier_lvl_1": "Smart Contract Platform",
        "tier_lvl_2": "Layer 1",
        "last_updated": "2024-08-25T22:28:00.000Z",
        "price": 2337.312950154836,
        "market_cap": 281239666935.0205,
        "volume": 13784465135.147797,
        "last_daily_close": 2350.33965816199,
        "all_time_high": 4066.690353397678,
        "all_time_low": 1540.9732397056287,
        "avg_price_200d": 2789.45,
        "avg_price_50d": 2456.12,
        "change_24hour": 2350.33965816199,
        "changepct_24hour": 0.55733692,
        "change_7day": 2235.9280441047767,
        "changepct_7day": -4.33766929,
        "change_1m": -123.45,
        "changepct_1m": -5.01,
        "change_3m": 234.56,
        "changepct_3m": 10.88,
        "change_6m": 345.67,
        "changepct_6m": 17.35,
        "change_1y": 1234.56,
        "changepct_1y": 111.88,
        "one_year_high": 4066.690353397678,
        "one_year_low": 1540.9732397056287,
        "weekly_high": 2768.615443493595,
        "weekly_low": 2573.834787768792
      }
    ]
  }
}

This endpoint returns information and performance data for the Bitformance Altcoin Index, which tracks the top altcoins weighted by market capitalization.

HTTP Request

GET https://api.bitformance.com/api/v2/get-bitformance-altcoin-index

Query Parameters

Parameter Type Default Description
timeseries_interval string - Time interval for historical data. Accepted values: daily, fivemin. When daily is used, returns one data point per day at UTC-0. When fivemin is used, returns 24-hour data with data points every 5 minutes.
weighting_method string market_cap The weighting method for the index. Accepted values: market_cap, equal_weight. Defaults to market_cap if not specified or invalid.
metric string closing_price The metric to return in timeseries data. Accepted values: closing_price, market_cap. Defaults to closing_price.
include_fields string - Comma-separated list of fields to add to the default set of constituent_info fields. Mainly useful for adding back description, which is excluded by default. Example: description
exclude_fields string - Comma-separated list of fields to remove from the default set of constituent_info fields. Example: avg_price_200d,avg_price_50d

Field Selection for Constituent Info

include_fields and exclude_fields both start from the default set of constituent fields (every field listed below except description, which is excluded by default) and can be combined in the same request:

Include Fields

Add description back into each constituent object: GET /api/v2/get-bitformance-altcoin-index?include_fields=description

Exclude Fields

Remove specific fields from constituent objects: GET /api/v2/get-bitformance-altcoin-index?exclude_fields=avg_price_200d,avg_price_50d

Combining Both

exclude_fields takes priority when a field appears in both lists: GET /api/v2/get-bitformance-altcoin-index?include_fields=description&exclude_fields=description This still excludes description, since exclude_fields overrides include_fields for that field.

Available Fields for Constituents

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

The response structure is identical to the Get Bitformance Altcoin Index endpoint, containing:

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
updated Timestamp indicating the last time the index was updated.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index.
description The description of the index.
algorithm The algorithm used to construct the index (typically "top_ranked").
sector The sector classification of the index.
industry The industry classification of the index.
asset_type The type of assets included in the index (typically "dynamic").
weighting_method The method used to assign weights to the assets in the index.
rebalancing_interval The frequency at which the index is rebalanced.
custom_weights Contains custom weighting values (usually empty for algorithmic indexes).
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id The unique identifier of the asset.
quantity The quantity of the asset held in the index.
index_performance Description
marketcap The total market capitalization of the index.
initial_value The initial value of the index when it was created.
value The current value of the index.
drawdown The maximum drawdown from peak value.
change_24hour The change in the index value over the last 24 hours.
change_7d The change in the index value over the last 7 days.
changepct_24hour The percentage change in the index value over the last 24 hours.
changepct_7d The percentage change in the index value over the last 7 days.
change_1m The change in the index value over the last 1 month.
change_3m The change in the index value over the last 3 months.
change_6m The change in the index value over the last 6 months.
change_1y The change in the index value over the last 1 year.
changepct_1m The percentage change in the index value over the last 1 month.
changepct_3m The percentage change in the index value over the last 3 months.
changepct_6m The percentage change in the index value over the last 6 months.
changepct_1y The percentage change in the index value over the last 1 year.
asset_new_highs Number of index constituents whose current live price is higher than their 7-day high (weekly_high) — the highest daily closing price recorded over the trailing 7 days.
asset_new_lows Number of index constituents whose current live price is lower than their 7-day low (weekly_low) — the lowest daily closing price recorded over the trailing 7 days.
asset_performance_24h_bearish Number of index constituents whose current live price is lower than their last daily close (last_daily_close), i.e. the asset has lost value since the previous day's close.
asset_performance_24h_bullish Number of index constituents whose current live price is at or above their last daily close (last_daily_close).
asset_sma_200d_over Number of index constituents currently trading at or above their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_200d_under Number of index constituents currently trading below their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_50d_over Number of index constituents currently trading at or above their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_sma_50d_under Number of index constituents currently trading below their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_1y_high Number of index constituents whose current live price is higher than their 1-year high (one_year_high) — the highest daily closing price recorded over the trailing ~365 days.
asset_1y_low Number of index constituents whose current live price is lower than their 1-year low (one_year_low) — the lowest daily closing price recorded over the trailing ~365 days.
asset_alltime_high Number of index constituents whose current live price is higher than their all-time high (all_time_high) — the highest daily closing price ever recorded for that asset.
asset_alltime_low Number of index constituents whose current live price is lower than their all-time low (all_time_low) — the lowest daily closing price ever recorded for that asset.
index_performance (7-day variants) Description
asset_performance_7d_bearish Number of constituents whose current live price is below the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2) — a rougher, week-scale version of asset_performance_24h_bearish.
asset_performance_7d_bullish Number of constituents whose current live price is at or above the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2).
asset_sma_200d_over_7d Number of constituents whose current live price or 7-day high (weekly_high) is at or above their 200-day SMA (avg_price_200d) — true if the asset was above its 200-day average at any point in the last 7 days, not just right now.
asset_sma_200d_under_7d Number of constituents where neither the current live price nor the 7-day high crossed at or above the 200-day SMA.
asset_sma_50d_over_7d Number of constituents whose current live price or 7-day high (weekly_high) is at or above their 50-day SMA (avg_price_50d).
asset_sma_50d_under_7d Number of constituents where neither the current live price nor the 7-day high crossed at or above the 50-day SMA.
asset_1y_high_7d Number of constituents whose current live price or 7-day high (weekly_high) exceeds their 1-year high (one_year_high) — true if the asset hit a new 1-year high at any point in the last 7 days, not just right now.
asset_1y_low_7d Number of constituents whose current live price or 7-day low (weekly_low) is below their 1-year low (one_year_low).
asset_alltime_high_7d Number of constituents whose current live price or 7-day high (weekly_high) exceeds their all-time high (all_time_high).
asset_alltime_low_7d Number of constituents whose current live price or 7-day low (weekly_low) is below their all-time low (all_time_low).
constituent_info Description

Array of cryptocurrency objects representing the current constituents of the index. Field structure follows the same pattern as other coin endpoints, with description excluded by default for performance.

Get Top 200 Index

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-top200-index"
params = {
    "timeseries_interval": "daily",
    "weighting_method": "market_cap",
    "metric": "closing_price"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

top200_index = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-top200-index"
timeseries_interval="daily"
weighting_method="market_cap"
metric="closing_price"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "timeseries_interval=$timeseries_interval" \
  --data-urlencode "weighting_method=$weighting_method" \
  --data-urlencode "metric=$metric" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-top200-index';
const params = new URLSearchParams({
    timeseries_interval: 'daily',
    weighting_method: 'market_cap',
    metric: 'closing_price'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "index_info": {
      "_id": "6478bf4fc7a3444d2433fd36",
      "created": "2022-06-12 20:09:13.368000",
      "updated": "2024-08-25 22:31:06.880000",
      "initial_timestamp": 1491004800,
      "name": "Top 200",
      "description": "Top 200 cryptocurrencies - weighted by market cap, rebalanced quarterly, and an initial starting balance of $1,000. This index aims to reflect the overall performance of the top cryptocurrency market.",
      "algorithm": "top_ranked",
      "sector": "Multi-Sector",
      "industry": "Top Assets",
      "asset_type": "dynamic",
      "weighting_method": "market_cap",
      "rebalancing_interval": "QUARTERLY",
      "custom_weights": {}
    },
    "index_holdings": [
      { "ticker": "BTC", "id": 1, "quantity": 15.287725841392287 },
      { "ticker": "ETH", "id": 1027, "quantity": 145.9797025951802 },
      { "ticker": "BNB", "id": 1839, "quantity": 378.512439581647 }
    ],
    "index_performance": {
      "marketcap": 1205001505119.2155,
      "initial_value": 1000,
      "value": 25647.9592678145,
      "drawdown": -38.7335,
      "change_24hour": 419.86630934640198,
      "change_7d": 120.00662346527679,
      "changepct_24hour": 1.6615626383813359,
      "changepct_7d": 0.47349374410584241,
      "change_1m": -1583.7322879097555,
      "change_3m": -3273.669374681358,
      "change_6m": -4771.200695155574,
      "change_1y": 9813.173206304606,
      "changepct_1m": -6.2017450828718057,
      "changepct_3m": -12.007393832845576,
      "changepct_6m": -18.600149843710264,
      "changepct_1y": 62.44426200466917,
      "asset_new_highs": 15,
      "asset_new_lows": 3,
      "asset_performance_24h_bearish": 89,
      "asset_performance_24h_bullish": 111,
      "asset_sma_200d_over": 45,
      "asset_sma_200d_under": 155,
      "asset_sma_50d_over": 87,
      "asset_sma_50d_under": 113,
      "asset_1y_high": 5,
      "asset_1y_low": 2,
      "asset_alltime_high": 1,
      "asset_alltime_low": 0,
      "asset_performance_7d_bearish": 76,
      "asset_performance_7d_bullish": 124,
      "asset_sma_200d_over_7d": 51,
      "asset_sma_200d_under_7d": 149,
      "asset_sma_50d_over_7d": 93,
      "asset_sma_50d_under_7d": 107,
      "asset_1y_high_7d": 6,
      "asset_1y_low_7d": 2,
      "asset_alltime_high_7d": 1,
      "asset_alltime_low_7d": 0
    },
    "daily_timeseries_data": [
      {
        "date": "2017-04-01 00:00:00",
        "value": 1000.0
      },
      {
        "date": "2017-04-02 00:00:00",
        "value": 1014.5596183364022
      },
      {
        "date": "2017-04-03 00:00:00",
        "value": 1089.5754208146486
      },
      {
        "date": "2017-04-04 00:00:00",
        "value": 1134.4590760724552
      }
    ],
    "constituent_info": [
      {
        "coin_id": 1,
        "coin_slug": "bitcoin",
        "name": "Bitcoin",
        "symbol": "BTC",
        "description": "",
        "tier_lvl_1": "Digital Currency",
        "tier_lvl_2": "General",
        "last_updated": "2024-08-25T22:28:00.000Z",
        "price": 64510.34179357949,
        "market_cap": 1273762311113.9631,
        "volume": 17528186093.072506,
        "last_daily_close": 64176.36706695918,
        "all_time_high": 73079.3733787985,
        "all_time_low": 0.04951,
        "avg_price_200d": 63241.400978283695,
        "avg_price_50d": 61652.955475512186,
        "change_24hour": 65334.582599120564,
        "changepct_24hour": 1.27768786,
        "change_7day": 69978.65742318358,
        "changepct_7day": 8.4766496,
        "change_1m": -1234.56,
        "changepct_1m": -1.87,
        "change_3m": 2345.67,
        "changepct_3m": 3.64,
        "change_6m": 5678.90,
        "changepct_6m": 8.81,
        "change_1y": 12345.67,
        "changepct_1y": 19.15,
        "one_year_high": 73079.3733787985,
        "one_year_low": 25684.019423324316,
        "weekly_high": 64176.36706695918,
        "weekly_low": 58482.74531725411
      }
    ]
  }
}

This endpoint returns information and performance data for the Top 200 Index, which tracks the top 200 cryptocurrencies weighted by market capitalization.

HTTP Request

GET https://api.bitformance.com/api/v2/get-top200-index

Query Parameters

Parameter Type Description
timeseries_interval string Time interval for historical data. Accepted values: daily, fivemin. When daily is used, returns one data point per day at UTC-0. When fivemin is used, returns 24-hour data with data points every 5 minutes.
weighting_method string The weighting method for the index. Accepted values: market_cap, equal_weight. Defaults to market_cap if not specified or invalid.
metric string The metric to return in timeseries data. Accepted values: closing_price, market_cap. Defaults to closing_price.

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

The response structure is identical to the Get Bitformance Altcoin Index endpoint, containing:

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
updated Timestamp indicating the last time the index was updated.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index.
description The description of the index.
algorithm The algorithm used to construct the index (typically "top_ranked").
sector The sector classification of the index.
industry The industry classification of the index.
asset_type The type of assets included in the index (typically "dynamic").
weighting_method The method used to assign weights to the assets in the index.
rebalancing_interval The frequency at which the index is rebalanced.
custom_weights Contains custom weighting values (usually empty for algorithmic indexes).
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id Unique asset identifier (CMC ID).
quantity The amount of the asset currently held in the index.
index_performance Description
marketcap The total market capitalization of the index.
initial_value The initial value of the index on inception.
value Current value of the index.
drawdown The maximum percentage loss from the index's peak value.
change_24hour The change in the index's value over the last 24 hours in dollars.
changepct_24hour The percentage change in the index's value over the last 24 hours.
change_7d The change in the index's value over the last 7 days in dollars.
changepct_7d The percentage change in the index's value over the last 7 days.
change_1m The change in the index's value over the last 1 month in dollars.
changepct_1m The percentage change in the index's value over the last 1 month.
change_3m The change in the index's value over the last 3 months in dollars.
changepct_3m The percentage change in the index's value over the last 3 months.
change_6m The change in the index's value over the last 6 months in dollars.
changepct_6m The percentage change in the index's value over the last 6 months.
change_1y The change in the index's value over the last 1 year in dollars.
changepct_1y The percentage change in the index's value over the last 1 year.
asset_new_highs Number of holdings whose current live price is higher than their 7-day high (weekly_high) — the highest daily closing price recorded over the trailing 7 days.
asset_new_lows Number of holdings whose current live price is lower than their 7-day low (weekly_low) — the lowest daily closing price recorded over the trailing 7 days.
asset_performance_24h_bearish Number of holdings whose current live price is lower than their last daily close (last_daily_close), i.e. the asset has lost value since the previous day's close.
asset_performance_24h_bullish Number of holdings whose current live price is at or above their last daily close (last_daily_close).
asset_sma_200d_over Number of holdings currently trading at or above their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_200d_under Number of holdings currently trading below their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_50d_over Number of holdings currently trading at or above their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_sma_50d_under Number of holdings currently trading below their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_1y_high Number of holdings whose current live price is higher than their 1-year high (one_year_high) — the highest daily closing price recorded over the trailing ~365 days.
asset_1y_low Number of holdings whose current live price is lower than their 1-year low (one_year_low) — the lowest daily closing price recorded over the trailing ~365 days.
asset_alltime_high Number of holdings whose current live price is higher than their all-time high (all_time_high) — the highest daily closing price ever recorded for that asset.
asset_alltime_low Number of holdings whose current live price is lower than their all-time low (all_time_low) — the lowest daily closing price ever recorded for that asset.
index_performance (7-day variants) Description
asset_performance_7d_bearish Number of holdings whose current live price is below the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2) — a rougher, week-scale version of asset_performance_24h_bearish.
asset_performance_7d_bullish Number of holdings whose current live price is at or above the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2).
asset_sma_200d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 200-day SMA (avg_price_200d) — true if the asset was above its 200-day average at any point in the last 7 days, not just right now.
asset_sma_200d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 200-day SMA.
asset_sma_50d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 50-day SMA (avg_price_50d).
asset_sma_50d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 50-day SMA.
asset_1y_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their 1-year high (one_year_high) — true if the asset hit a new 1-year high at any point in the last 7 days, not just right now.
asset_1y_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their 1-year low (one_year_low).
asset_alltime_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their all-time high (all_time_high).
asset_alltime_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their all-time low (all_time_low).
daily_timeseries_data / fivemin_timeseries_data (when timeseries_interval is provided) Description
date The date and time in "YYYY-MM-DD HH:MM:SS" format.
value The corresponding value (closing price or market cap) of the index.
constituent_info Description

Complete cryptocurrency data for each asset in the index, including price, market cap, volume, performance metrics, and taxonomy classifications. See the Get All Coins endpoint documentation for detailed field descriptions.

Get Top 200 Data

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-top200-data"
params = {
    "weighting_method": "marketcap",
    "metric": "closing_price"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

top200_data = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-top200-data"
weighting_method="marketcap"
metric="closing_price"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "weighting_method=$weighting_method" \
  --data-urlencode "metric=$metric" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-top200-data';
const params = new URLSearchParams({
    weighting_method: 'marketcap',
    metric: 'closing_price'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "message": "success",
  "data": {
    "weighting_method": "marketcap",
    "daily_timeseries_data": [
      {
        "date": "2017-01-02",
        "value": 1000.0
      },
      {
        "date": "2017-01-03",
        "value": 1023.6284059973888
      },
      {
        "date": "2017-01-04",
        "value": 1051.4059303164877
      },
      {
        "date": "2017-01-05",
        "value": 1164.8305365519946
      }
    ],
    "top_200_rebalanced_constituents": [
      {
        "rebalance_date": "2020-01-01",
        "constituents": [
          {
            "symbol": "BTC",
            "cmc_id": 1
          },
          {
            "symbol": "ETH",
            "cmc_id": 1027
          },
          {
            "symbol": "XRP",
            "cmc_id": 52
          },
          {
            "symbol": "LTC",
            "cmc_id": 2
          }
        ]
      },
      {
        "rebalance_date": "2020-04-01",
        "constituents": [
          {
            "symbol": "BTC",
            "cmc_id": 1
          },
          {
            "symbol": "ETH",
            "cmc_id": 1027
          },
          {
            "symbol": "USDT",
            "cmc_id": 825
          },
          {
            "symbol": "BNB",
            "cmc_id": 1839
          }
        ]
      }
    ]
  }
}

This endpoint returns special timeseries and constituent data for a Top 200 index created by the Bitformance Team. This index is currently not available on the website and can only be accessed via the API. The index is created using coins with valid taxonomy data that meet specific volume and market cap thresholds. It is rebalanced quarterly, and users can view the constituents per rebalancing period.

HTTP Request

GET https://api.bitformance.com/api/v2/get-top200-data

Query Parameters

Parameter Type Description
weighting_method string The weighting method for the index. Accepted values: marketcap, equal_weight. Defaults to marketcap if not specified or invalid.
metric string The metric to return in timeseries data. Accepted values: closing_price, market_cap. Defaults to closing_price.

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
message Status message indicating success or any warnings about parameter validation.
data Description
weighting_method The weighting method used for the index data returned.
daily_timeseries_data Description
date The date in "YYYY-MM-DD" format representing the trading day.
value The corresponding value of the index (total_value for closing_price or total_marketcap for market_cap metric) at the specified date.
top_200_rebalanced_constituents Description
rebalance_date The date in "YYYY-MM-DD" format when the rebalancing occurred.
constituents An array of cryptocurrency objects that were included in the index during this rebalancing period.
Individual constituent objects contain: Description
symbol The ticker symbol of the cryptocurrency.
cmc_id The unique CoinMarketCap ID of the cryptocurrency.

Data Source

This endpoint retrieves data from CSV files stored in S3 that contain: - Historical performance data for the Top 200 index with different weighting methods - Quarterly rebalancing constituent data showing which cryptocurrencies were included in each rebalancing period - Data spanning multiple years of index performance and composition changes

Use Cases

Get Sector Indexes

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-sector-indexes"
params = {
    "weighting_method": "market_cap",
    "sector": "Smart Contract Platform",
    "industry": "Layer 1"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

sector_indexes = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-sector-indexes"
weighting_method="market_cap"
sector="Smart Contract Platform"
industry="Layer 1"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "weighting_method=$weighting_method" \
  --data-urlencode "sector=$sector" \
  --data-urlencode "industry=$industry" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-sector-indexes';
const params = new URLSearchParams({
    weighting_method: 'market_cap',
    sector: 'Smart Contract Platform',
    industry: 'Layer 1'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": [
    {
      "index_info": {
        "_id": "664606b78fb1b7408916ea0d",
        "created": "2024-05-16 09:14:31.416000",
        "updated": "2024-08-25 23:21:05.883000",
        "initial_timestamp": 1483315200,
        "name": "Smart Contract Platform - Layer 1",
        "description": "SECTOR: Smart Contract Platform, INDUSTRY: Layer 1",
        "algorithm": "sector_ranked",
        "sector": "Smart Contract Platform",
        "industry": "Layer 1",
        "asset_type": "dynamic",
        "weighting_method": "market_cap",
        "rebalancing_interval": "quarterly",
        "custom_weights": {}
      },
      "index_holdings": [
        { 
          "ticker": "ETH", 
          "id": 1027, 
          "quantity": 53.23441698627238 
        },
        { 
          "ticker": "ETC", 
          "id": 1321, 
          "quantity": 65.43618871475672 
        },
        { 
          "ticker": "NEO", 
          "id": 1376, 
          "quantity": 31.243727330472407 
        }
      ],
      "index_performance": {
        "marketcap": 596204330702.7146,
        "initial_value": 1000,
        "value": 263284.91562438454,
        "drawdown": -38.2951,
        "change_24hour": 1426.1018434149446,
        "change_7d": 20551.16186894165,
        "changepct_24hour": 0.5446071578892128,
        "changepct_7d": 8.466544743359915,
        "change_1m": -34404.563054258586,
        "change_3m": -62158.741309680394,
        "change_6m": 7523.415830343787,
        "change_1y": 133197.01240484312,
        "changepct_1m": -11.557198194229242,
        "changepct_3m": -19.09969359835266,
        "changepct_6m": 2.941574801681345,
        "changepct_1y": 102.3900063790364,
        "asset_new_highs": 12,
        "asset_new_lows": 1,
        "asset_performance_24h_bearish": 37,
        "asset_performance_24h_bullish": 13,
        "asset_sma_200d_over": 7,
        "asset_sma_200d_under": 43,
        "asset_sma_50d_over": 34,
        "asset_sma_50d_under": 16,
        "asset_1y_high": 1,
        "asset_1y_low": 0,
        "asset_alltime_high": 0,
        "asset_alltime_low": 0,
        "asset_performance_7d_bearish": 30,
        "asset_performance_7d_bullish": 20,
        "asset_sma_200d_over_7d": 9,
        "asset_sma_200d_under_7d": 41,
        "asset_sma_50d_over_7d": 37,
        "asset_sma_50d_under_7d": 13,
        "asset_1y_high_7d": 2,
        "asset_1y_low_7d": 0,
        "asset_alltime_high_7d": 0,
        "asset_alltime_low_7d": 0
      }
    }
  ]
}

This endpoint returns sector-specific cryptocurrency indexes, allowing you to filter by sector, industry, and weighting method.

HTTP Request

GET https://api.bitformance.com/api/v2/get-sector-indexes

Query Parameters

Parameter Type Description
weighting_method string Specifies the method of weighting. Accepted values: market_cap, equal_weight
sector string Specifies the sector to filter by (e.g., "Smart Contract Platform", "Digital Currency", "DeFi")
industry string Specifies the industry within the sector (e.g., "Layer 1", "General", "DEX")

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
updated Timestamp indicating the last time the index was updated.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index.
description The description of the index.
algorithm The algorithm used to construct the index (typically "sector_ranked" for sector indexes).
sector The sector classification of the index.
industry The industry classification within the sector.
asset_type The type of assets included in the index (typically "dynamic" for sector indexes).
weighting_method The method used to assign weights to the assets in the index.
rebalancing_interval The frequency at which the index is rebalanced (typically "quarterly").
custom_weights Contains custom weighting values (usually empty for sector indexes).
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id Unique asset identifier (CMC ID).
quantity The amount of the asset currently held in the index.
index_performance Description
marketcap The total market capitalization of the index, representing the aggregate value of all assets' market capitalization within the index, weighted by percentage of index.
initial_value The initial value of the index on inception, also known as the starting investment.
value Current value of the index.
drawdown The maximum percentage loss from the index's peak value over a specified period.
change_24hour The change in the index's value over the last 24 hours in dollars.
changepct_24hour The percentage change in the index's value over the last 24 hours.
change_7d The change in the index's value over the last 7 days in dollars.
changepct_7d The percentage change in the index's value over the last 7 days.
change_1m The change in the index's value over the last 1 month in dollars.
changepct_1m The percentage change in the index's value over the last 1 month.
change_3m The change in the index's value over the last 3 months in dollars.
changepct_3m The percentage change in the index's value over the last 3 months.
change_6m The change in the index's value over the last 6 months in dollars.
changepct_6m The percentage change in the index's value over the last 6 months.
change_1y The change in the index's value over the last 1 year in dollars.
changepct_1y The percentage change in the index's value over the last 1 year.
asset_new_highs The number of holdings in the index whose current live price is higher than their 7-day high (weekly_high) — the highest daily closing price recorded over the trailing 7 days.
asset_new_lows The number of holdings in the index whose current live price is lower than their 7-day low (weekly_low) — the lowest daily closing price recorded over the trailing 7 days.
asset_performance_24h_bearish The number of holdings in the index whose current live price is lower than their last daily close (last_daily_close), i.e. the asset has lost value since the previous day's close.
asset_performance_24h_bullish The number of holdings in the index whose current live price is at or above their last daily close (last_daily_close).
asset_sma_200d_over The number of holdings in the index currently trading at or above their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_200d_under The number of holdings in the index currently trading below their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_50d_over The number of holdings in the index currently trading at or above their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_sma_50d_under The number of holdings in the index currently trading below their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_1y_high The number of holdings in the index whose current live price is higher than their 1-year high (one_year_high) — the highest daily closing price recorded over the trailing ~365 days.
asset_1y_low The number of holdings in the index whose current live price is lower than their 1-year low (one_year_low) — the lowest daily closing price recorded over the trailing ~365 days.
asset_alltime_high The number of holdings in the index whose current live price is higher than their all-time high (all_time_high) — the highest daily closing price ever recorded for that asset.
asset_alltime_low The number of holdings in the index whose current live price is lower than their all-time low (all_time_low) — the lowest daily closing price ever recorded for that asset.
index_performance (7-day variants) Description
asset_performance_7d_bearish Number of holdings whose current live price is below the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2) — a rougher, week-scale version of asset_performance_24h_bearish.
asset_performance_7d_bullish Number of holdings whose current live price is at or above the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2).
asset_sma_200d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 200-day SMA (avg_price_200d) — true if the asset was above its 200-day average at any point in the last 7 days, not just right now.
asset_sma_200d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 200-day SMA.
asset_sma_50d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 50-day SMA (avg_price_50d).
asset_sma_50d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 50-day SMA.
asset_1y_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their 1-year high (one_year_high) — true if the asset hit a new 1-year high at any point in the last 7 days, not just right now.
asset_1y_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their 1-year low (one_year_low).
asset_alltime_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their all-time high (all_time_high).
asset_alltime_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their all-time low (all_time_low).

Get Altcoin Season Index

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL
base_url = "https://api.bitformance.com/api/v2/get-altcoin-season"

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
})

altcoin_season = response.json()
# Define the base URL
base_url="https://api.bitformance.com/api/v2/get-altcoin-season"

# Send the GET request using curl
curl -X GET "$base_url" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL
const baseUrl = 'https://api.bitformance.com/api/v2/get-altcoin-season';

// Send the GET request
fetch(baseUrl, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "daily_timeseries_data": [
      {
        "date": "2017-04-02 00:00:00",
        "value": 0.3333333333333333
      },
      {
        "date": "2017-04-03 00:00:00",
        "value": 0.3333333333333333
      },
      {
        "date": "2017-04-04 00:00:00",
        "value": 0.3333333333333333
      },
      {
        "date": "2017-04-05 00:00:00",
        "value": 0.4444444444444444
      },
      {
        "date": "2017-04-06 00:00:00",
        "value": 0.5555555555555556
      },
      {
        "date": "2017-04-07 00:00:00",
        "value": 0.6666666666666666
      },
      {
        "date": "2017-04-08 00:00:00",
        "value": 0.7777777777777778
      }
    ]
  }
}

This endpoint returns historical data for the Altcoin Season Index, which measures the relative performance of altcoins compared to Bitcoin over time.

HTTP Request

GET https://api.bitformance.com/api/v2/get-altcoin-season

Query Parameters

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data Description
daily_timeseries_data Description
date The date and time in "YYYY-MM-DD HH:MM:SS" format representing the timestamp of the index calculation.
value The corresponding value of the Altcoin Season Index at the specified date. Values typically range from 0 to 1, where higher values indicate stronger altcoin performance relative to Bitcoin.

Understanding the Altcoin Season Index

The Altcoin Season Index measures the relative performance of altcoins compared to Bitcoin:

This index helps traders and analysts identify market cycles and periods when altcoins tend to outperform or underperform relative to Bitcoin.

Use Cases

Get Taxonomies

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

response = requests.get('https://api.bitformance.com/api/v2/get-taxonomies', 
    headers={
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    },
    params={
        'exclude_fields': 'description'
    })

taxonomy_data = response.json()
curl -G "https://api.bitformance.com/api/v2/get-taxonomies" \
  --data-urlencode "exclude_fields=description" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const response = await fetch('https://api.bitformance.com/api/v2/get-taxonomies?exclude_fields=description', {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
});

const taxonomyData = await response.json();

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "Smart Contract Platform": {
      "Layer 1": [
        {
          "coin_id": 1027,
          "coin_slug": "ethereum",
          "name": "Ethereum",
          "symbol": "ETH",
          "tier_lvl_1": "Smart Contract Platform",
          "tier_lvl_2": "Layer 1",
          "last_updated": "2024-08-25T22:28:00.000Z",
          "price": 65.30661265643441,
          "market_cap": 4891647320.7893,
          "volume": 232839669.20519465,
          "last_daily_close": 66.58131223228845,
          "all_time_high": 386.45077919,
          "all_time_low": 1.1570099592,
          "avg_price_200d": 78.53544956180635,
          "avg_price_50d": 66.90979366661023,
          "change_24hour": 64.33712188532131,
          "changepct_24hour": -1.4845216,
          "change_7day": 64.30490964026299,
          "changepct_7day": -1.53384623,
          "change_1m": -123.45,
          "changepct_1m": -1.85,
          "change_3m": 234.56,
          "changepct_3m": 3.60,
          "change_6m": 345.67,
          "changepct_6m": 5.29,
          "change_1y": 1234.56,
          "changepct_1y": 18.90,
          "one_year_high": 109.2439422366925,
          "one_year_low": 55.98397579556809,
          "weekly_high": 66.58131223228845,
          "weekly_low": 63.83114086015394
        }
      ]
    },
    "Digital Currency": {
      "General": [
        {
          "coin_id": 1,
          "coin_slug": "bitcoin",
          "name": "Bitcoin",
          "symbol": "BTC",
          "tier_lvl_1": "Digital Currency",
          "tier_lvl_2": "General",
          "last_updated": "2024-08-25T23:58:00.000Z",
          "price": 64604.15587964322,
          "market_cap": 1275614678405.117,
          "volume": 17575445269.965878,
          "last_daily_close": 64176.36706695918,
          "all_time_high": 73079.3733787985,
          "all_time_low": 0.04951,
          "avg_price_200d": 63241.400978283695,
          "avg_price_50d": 61652.955475512186,
          "change_24hour": 65292.934075997626,
          "changepct_24hour": 1.06615153,
          "change_7day": 70188.21847699354,
          "changepct_7day": 8.64350369,
          "change_1m": -1234.56,
          "changepct_1m": -1.87,
          "change_3m": 2345.67,
          "changepct_3m": 3.76,
          "change_6m": 5678.90,
          "changepct_6m": 9.64,
          "change_1y": 12345.67,
          "changepct_1y": 23.68,
          "one_year_high": 73079.3733787985,
          "one_year_low": 25684.019423324316,
          "weekly_high": 64176.36706695918,
          "weekly_low": 58482.74531725411
        }
      ]
    }
  }
}

This endpoint returns comprehensive taxonomy information for all cryptocurrencies, organized by sector and industry classifications.

HTTP Request

GET https://api.bitformance.com/api/v2/get-taxonomies

Query Parameters

Parameter Type Default Description
include_fields string - Comma-separated list of fields to add to the default set of cryptocurrency object fields. Mainly useful for adding back description, which is excluded by default. Example: description
exclude_fields string - Comma-separated list of fields to remove from the default set of cryptocurrency object fields. Example: avg_price_200d,avg_price_50d

Field Selection

include_fields and exclude_fields both start from the default set of fields (every field listed below except description, which is excluded by default) and can be combined in the same request:

Include Fields

Add description back into the default response: GET /api/v2/get-taxonomies?include_fields=description

Exclude Fields

Remove specific fields from the default response: GET /api/v2/get-taxonomies?exclude_fields=avg_price_200d,avg_price_50d

Combining Both

exclude_fields takes priority when a field appears in both lists: GET /api/v2/get-taxonomies?include_fields=description&exclude_fields=description This still excludes description, since exclude_fields overrides include_fields for that field.

Available Fields

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data (nested object structure) Description

The response data is organized as a nested object structure: - First level: Sector names (tier_lvl_1) as keys - Second level: Industry names (tier_lvl_2) as keys
- Third level: Arrays of cryptocurrency objects belonging to that sector/industry combination

Individual cryptocurrency objects contain: Description
coin_id Unique coin identifier (CMC ID).
coin_slug URL-friendly version of the coin's name.
name The full name of the cryptocurrency.
symbol The ticker symbol of the cryptocurrency.
description Description of the cryptocurrency. (Excluded by default)
tier_lvl_1 The level 1 taxonomy classification of the cryptocurrency (sector).
tier_lvl_2 The level 2 taxonomy classification of the cryptocurrency (sub-sector/industry).
last_updated The timestamp of the last time the data for this cryptocurrency was updated.
price The current live price of the cryptocurrency (in USD). Refreshed roughly every 5 minutes from the market data feed.
market_cap The total market capitalization of the cryptocurrency (price × circulating supply).
volume The total trading volume of the cryptocurrency over the last 24 hours.
last_daily_close The cryptocurrency's closing price on the most recently completed UTC trading day. Recalculated once per day; does not move with the live price field between daily runs.
all_time_high The highest daily closing price ever recorded for this cryptocurrency, based on its full daily price history. Recalculated once per day, so the live price can trade above this value intraday before that day's close is folded in.
all_time_low The lowest daily closing price ever recorded for this cryptocurrency. Recalculated once per day, same caveat as all_time_high.
avg_price_200d The 200-day simple moving average (SMA) of daily closing prices — the mean of the trailing 200 daily closes. Recalculated once per day, not a live average of the price field.
avg_price_50d The 50-day simple moving average (SMA) of daily closing prices — the mean of the trailing 50 daily closes. Recalculated once per day, not a live average of the price field.
change_24hour The change in the cryptocurrency's value over the last 24 hours in dollars.
changepct_24hour The percentage change in the cryptocurrency's value over the last 24 hours.
change_7day The change in the cryptocurrency's value over the last 7 days in dollars.
changepct_7day The percentage change in the cryptocurrency's value over the last 7 days.
change_1m The change in the cryptocurrency's value over the last 1 month in dollars.
changepct_1m The percentage change in the cryptocurrency's value over the last 1 month.
change_3m The change in the cryptocurrency's value over the last 3 months in dollars.
changepct_3m The percentage change in the cryptocurrency's value over the last 3 months.
change_6m The change in the cryptocurrency's value over the last 6 months in dollars.
changepct_6m The percentage change in the cryptocurrency's value over the last 6 months.
change_1y The change in the cryptocurrency's value over the last 1 year in dollars.
changepct_1y The percentage change in the cryptocurrency's value over the last 1 year.
one_year_high The highest daily closing price recorded over the trailing ~365 days (the most recent 366 daily records). Recalculated once per day, so the live price can exceed this value intraday before that day's close updates the baseline.
one_year_low The lowest daily closing price recorded over the trailing ~365 days. Recalculated once per day, same caveat as one_year_high.
weekly_high The highest daily closing price recorded over the trailing 7 days. Recalculated once per day.
weekly_low The lowest daily closing price recorded over the trailing 7 days. Recalculated once per day.

Get User Indexes

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL
base_url = "https://api.bitformance.com/api/v2/get-user-indexes"

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
})

user_indexes = response.json()
# Define the base URL
base_url="https://api.bitformance.com/api/v2/get-user-indexes"

# Send the GET request using curl
curl -X GET "$base_url" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL
const baseUrl = 'https://api.bitformance.com/api/v2/get-user-indexes';

// Send the GET request
fetch(baseUrl, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": [
    {
      "index_info": {
        "_id": "6556299b08dca0dc36e973ee",
        "created": "2023-11-16 14:39:23.021000",
        "initial_timestamp": 1483315200,
        "name": "AI Index",
        "description": "AI Index",
        "weighting_method": "market_cap",
        "rebalancing_interval": "daily",
        "custom_weights": {}
      },
      "index_holdings": [
        {
          "ticker": "FET",
          "id": 3773,
          "quantity": 25.487362841
        },
        {
          "ticker": "RNDR",
          "id": 5690,
          "quantity": 150.234789123
        },
        {
          "ticker": "AKT",
          "id": 7431,
          "quantity": 89.567234567
        },
        {
          "ticker": "OCEAN",
          "id": 3911,
          "quantity": 345.123456789
        }
      ],
      "index_performance": {
        "initial_value": 200,
        "value": 1547.23,
        "change_24hour": 34.56,
        "changepct_24hour": 2.28,
        "change_7d": -67.89,
        "changepct_7d": -4.20,
        "change_1m": 123.45,
        "changepct_1m": 8.67,
        "change_3m": 234.56,
        "changepct_3m": 17.90,
        "change_6m": 345.67,
        "changepct_6m": 28.73,
        "change_1y": 456.78,
        "changepct_1y": 41.95
      }
    },
    {
      "index_info": {
        "_id": "6556299b08dca0dc36e973ef",
        "created": "2023-10-05 09:22:15.344000",
        "initial_timestamp": 1483315200,
        "name": "DeFi Portfolio",
        "description": "Custom DeFi token portfolio with equal weighting",
        "weighting_method": "equal_weight",
        "rebalancing_interval": "weekly",
        "custom_weights": {
          "UNI": 25,
          "AAVE": 25,
          "COMP": 25,
          "SUSHI": 25
        }
      },
      "index_holdings": [
        {
          "ticker": "UNI",
          "id": 7083,
          "quantity": 95.234567890
        },
        {
          "ticker": "AAVE",
          "id": 7278,
          "quantity": 12.345678901
        },
        {
          "ticker": "COMP",
          "id": 5692,
          "quantity": 8.567890123
        },
        {
          "ticker": "SUSHI",
          "id": 6758,
          "quantity": 234.567890123
        }
      ],
      "index_performance": {
        "initial_value": 1000,
        "value": 2847.91,
        "change_24hour": 89.12,
        "changepct_24hour": 3.23,
        "change_7d": -156.78,
        "changepct_7d": -5.22,
        "change_1m": 234.56,
        "changepct_1m": 8.98,
        "change_3m": 567.89,
        "changepct_3m": 24.89,
        "change_6m": 789.12,
        "changepct_6m": 38.34,
        "change_1y": 1123.45,
        "changepct_1y": 65.12
      }
    }
  ]
}

This endpoint returns all custom indexes created by the authenticated user, including their configuration, holdings, and performance metrics.

HTTP Request

GET https://api.bitformance.com/api/v2/get-user-indexes

Query Parameters

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data (array of index objects) Description
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index as set by the user.
description The description of the index as set by the user.
weighting_method The method used to assign weights to the assets in the index. Common values: market_cap, equal_weight, custom.
rebalancing_interval The frequency at which the index is rebalanced (e.g., daily, weekly, monthly, quarterly).
custom_weights Contains custom weighting values when the weighting_method is set to "custom". Empty object for other weighting methods.
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id Unique asset identifier (CMC ID).
quantity The amount of the asset currently held in the index (if available).
index_performance Description
initial_value The initial value of the index on inception, also known as the starting investment.
value Current value of the index (if calculated).
change_24hour The change in the index's value over the last 24 hours in dollars (if available).
changepct_24hour The percentage change in the index's value over the last 24 hours (if available).
change_7d The change in the index's value over the last 7 days in dollars (if available).
changepct_7d The percentage change in the index's value over the last 7 days (if available).
change_1m The change in the index's value over the last 1 month in dollars (if available).
changepct_1m The percentage change in the index's value over the last 1 month (if available).
change_3m The change in the index's value over the last 3 months in dollars (if available).
changepct_3m The percentage change in the index's value over the last 3 months (if available).
change_6m The change in the index's value over the last 6 months in dollars (if available).
changepct_6m The percentage change in the index's value over the last 6 months (if available).
change_1y The change in the index's value over the last 1 year in dollars (if available).
changepct_1y The percentage change in the index's value over the last 1 year (if available).

Index Types

User indexes can be configured with different weighting methods:

Market Cap Weighting - Assets are weighted based on their market capitalization - Larger market cap assets have higher weights in the index

Equal Weight - All assets in the index receive equal weighting - Useful for balanced exposure across all holdings

Custom Weighting - User-defined weights for each asset - Allows for precise control over asset allocation - Custom weights are specified as percentages in the custom_weights object

Performance Calculation

Performance metrics are calculated when available and may vary based on: - Index age and data availability - Calculation completion status - Asset data quality and history

Get Index Data

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-index-data"
params = {
    "index_id": "65569daf76cd9d2bc8ec55b5",
    "timeseries_interval": "daily",
    "metric": "closing_price"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

index_data = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-index-data"
index_id="65569daf76cd9d2bc8ec55b5"
timeseries_interval="daily"
metric="closing_price"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "index_id=$index_id" \
  --data-urlencode "timeseries_interval=$timeseries_interval" \
  --data-urlencode "metric=$metric" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-index-data';
const params = new URLSearchParams({
    index_id: '65569daf76cd9d2bc8ec55b5',
    timeseries_interval: 'daily',
    metric: 'closing_price'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this (this example shows the public-index shape; see "Index Access Control" below for how the user-index shape differs):

{
  "success": true,
  "data": {
    "index_info": {
      "_id": "65569daf76cd9d2bc8ec55b5",
      "created": "2023-11-16 22:54:38.948000",
      "updated": "2024-09-10 15:56:21.374000",
      "initial_timestamp": 1483315200,
      "name": "50/50 Bitcoin + Ethereum",
      "description": "50/50 Bitcoin + Ethereum with a monthly rebalance and an initial starting balance of $1,000.",
      "algorithm": "standard",
      "sector": "",
      "industry": "",
      "asset_type": "fixed",
      "weighting_method": "equal_weight",
      "rebalancing_interval": "monthly",
      "custom_weights": {}
    },
    "index_holdings": [
      {
        "ticker": "BTC",
        "id": 1,
        "quantity": 2.1383870222874193
      },
      {
        "ticker": "ETH",
        "id": 1027,
        "quantity": 50.1803901851935
      }
    ],
    "index_performance": {
      "marketcap": 1400425365144.1763,
      "initial_value": "1000",
      "value": 238173.42538224178,
      "drawdown": -35.5936,
      "change_24hour": 4544.369432365114,
      "change_7d": -15594.211603870266,
      "changepct_24hour": 1.9451216861228402,
      "changepct_7d": -6.1450749942254035,
      "change_1m": -22496.40538317163,
      "change_3m": -91255.94576247892,
      "change_6m": -98844.70487499418,
      "change_1y": 105391.0504697602,
      "changepct_1m": -8.630229788048235,
      "changepct_3m": -27.701217242827305,
      "changepct_6m": -29.32919507907451,
      "changepct_1y": 79.37126485290287,
      "asset_new_highs": 0,
      "asset_new_lows": 0,
      "asset_performance_24h_bearish": 2,
      "asset_performance_24h_bullish": 0,
      "asset_sma_200d_over": 0,
      "asset_sma_200d_under": 2,
      "asset_sma_50d_over": 0,
      "asset_sma_50d_under": 2,
      "asset_1y_high": 0,
      "asset_1y_low": 0,
      "asset_alltime_high": 0,
      "asset_alltime_low": 0,
      "asset_performance_7d_bearish": 1,
      "asset_performance_7d_bullish": 1,
      "asset_sma_200d_over_7d": 1,
      "asset_sma_200d_under_7d": 1,
      "asset_sma_50d_over_7d": 1,
      "asset_sma_50d_under_7d": 1,
      "asset_1y_high_7d": 0,
      "asset_1y_low_7d": 0,
      "asset_alltime_high_7d": 0,
      "asset_alltime_low_7d": 0
    },
    "daily_timeseries_data": [
      {
        "date": "2017-01-02 00:00:00",
        "value": 1000.0
      },
      {
        "date": "2017-01-03 00:00:00",
        "value": 1024.3316236471035
      },
      {
        "date": "2017-01-04 00:00:00",
        "value": 1117.7890317260942
      },
      {
        "date": "2017-01-05 00:00:00",
        "value": 1266.7095610690671
      },
      {
        "date": "2017-01-06 00:00:00",
        "value": 1134.9070354154176
      },
      {
        "date": "2017-01-07 00:00:00",
        "value": 1079.2425800449123
      }
    ]
  }
}

This endpoint returns detailed information for a specific index, including historical performance data. It works with both public indexes and user-created indexes.

HTTP Request

GET https://api.bitformance.com/api/v2/get-index-data

Query Parameters

Parameter Type Required Description
index_id string Yes The hexadecimal ID of the index to query. Index IDs can be retrieved from the "get-browsable-indexes" or "get-user-indexes" endpoints.
timeseries_interval string No Time interval for historical data. Accepted values: daily, fivemin. When daily is used, returns one data point per day at UTC-0. When fivemin is used, returns 24-hour data with data points every 5 minutes.
metric string No The metric to return in timeseries data. Accepted values: closing_price, market_cap. Defaults to closing_price.

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Index Access Control

This endpoint supports both public and private indexes:

Public Indexes - Browsable indexes accessible to all users - Sector indexes and Bitformance-created indexes - No ownership validation required

User Indexes - Custom indexes created by users - Only accessible by the index owner - Ownership is validated against the authenticated user

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
index_info Description
_id Unique index identifier.
created Timestamp indicating when the index was created.
updated (public indexes only) Timestamp indicating the last time the index was updated.
initial_timestamp Timestamp representing the starting point for the index's data and performance tracking.
name The name of the index.
description The description of the index.
algorithm (public indexes only) The algorithm used to construct the index.
sector (public indexes only) The sector classification of the index, if it's a sector index.
industry (public indexes only) The industry classification within the sector, if applicable.
asset_type (public indexes only) The type of assets included in the index.
weighting_method The method used to assign weights to the assets in the index.
rebalancing_interval The frequency at which the index is rebalanced.
custom_weights Contains custom weighting values if applicable.
index_holdings Description
ticker The ticker symbol of the asset held in the index.
id Unique asset identifier (CMC ID).
quantity The amount of the asset currently held in the index (if available).
index_performance Description
marketcap (public indexes only) The total market capitalization of the index.
initial_value The initial value of the index on inception.
value Current value of the index.
drawdown (public indexes only) The maximum percentage loss from the index's peak value over a specified period.
change_24hour The change in the index's value over the last 24 hours in dollars.
changepct_24hour The percentage change in the index's value over the last 24 hours.
change_7d The change in the index's value over the last 7 days in dollars.
changepct_7d The percentage change in the index's value over the last 7 days.
change_1m The change in the index's value over the last 1 month in dollars.
changepct_1m The percentage change in the index's value over the last 1 month.
change_3m The change in the index's value over the last 3 months in dollars.
changepct_3m The percentage change in the index's value over the last 3 months.
change_6m The change in the index's value over the last 6 months in dollars.
changepct_6m The percentage change in the index's value over the last 6 months.
change_1y The change in the index's value over the last 1 year in dollars.
changepct_1y The percentage change in the index's value over the last 1 year.
asset_new_highs (public indexes only) The number of holdings in the index whose current live price is higher than their 7-day high (weekly_high) — the highest daily closing price recorded over the trailing 7 days.
asset_new_lows (public indexes only) The number of holdings in the index whose current live price is lower than their 7-day low (weekly_low) — the lowest daily closing price recorded over the trailing 7 days.
asset_performance_24h_bearish (public indexes only) The number of holdings in the index whose current live price is lower than their last daily close (last_daily_close), i.e. the asset has lost value since the previous day's close.
asset_performance_24h_bullish (public indexes only) The number of holdings in the index whose current live price is at or above their last daily close (last_daily_close).
asset_sma_200d_over (public indexes only) The number of holdings in the index currently trading at or above their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_200d_under (public indexes only) The number of holdings in the index currently trading below their 200-day simple moving average of daily closing prices (avg_price_200d).
asset_sma_50d_over (public indexes only) The number of holdings in the index currently trading at or above their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_sma_50d_under (public indexes only) The number of holdings in the index currently trading below their 50-day simple moving average of daily closing prices (avg_price_50d).
asset_1y_high (public indexes only) The number of holdings in the index whose current live price is higher than their 1-year high (one_year_high) — the highest daily closing price recorded over the trailing ~365 days.
asset_1y_low (public indexes only) The number of holdings in the index whose current live price is lower than their 1-year low (one_year_low) — the lowest daily closing price recorded over the trailing ~365 days.
asset_alltime_high (public indexes only) The number of holdings in the index whose current live price is higher than their all-time high (all_time_high) — the highest daily closing price ever recorded for that asset.
asset_alltime_low (public indexes only) The number of holdings in the index whose current live price is lower than their all-time low (all_time_low) — the lowest daily closing price ever recorded for that asset.
index_performance (7-day variants, public indexes only) Description
asset_performance_7d_bearish Number of holdings whose current live price is below the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2) — a rougher, week-scale version of asset_performance_24h_bearish.
asset_performance_7d_bullish Number of holdings whose current live price is at or above the midpoint of their 7-day high/low range ((weekly_high + weekly_low) / 2).
asset_sma_200d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 200-day SMA (avg_price_200d) — true if the asset was above its 200-day average at any point in the last 7 days, not just right now.
asset_sma_200d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 200-day SMA.
asset_sma_50d_over_7d Number of holdings whose current live price or 7-day high (weekly_high) is at or above their 50-day SMA (avg_price_50d).
asset_sma_50d_under_7d Number of holdings where neither the current live price nor the 7-day high crossed at or above the 50-day SMA.
asset_1y_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their 1-year high (one_year_high) — true if the asset hit a new 1-year high at any point in the last 7 days, not just right now.
asset_1y_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their 1-year low (one_year_low).
asset_alltime_high_7d Number of holdings whose current live price or 7-day high (weekly_high) exceeds their all-time high (all_time_high).
asset_alltime_low_7d Number of holdings whose current live price or 7-day low (weekly_low) is below their all-time low (all_time_low).
daily_timeseries_data / fivemin_timeseries_data (when timeseries_interval is provided) Description
date The date and time in "YYYY-MM-DD HH:MM:SS" format representing the timestamp of the data point.
value The corresponding value (closing price or market cap) of the index at the specified date and time.

Error Handling

If the requested index cannot be found or accessed, the endpoint will return an error message indicating the issue. Common error scenarios include:

Get Rebalancing History

Access Tier: STARTER

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free Not Available
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL and query parameters
base_url = "https://api.bitformance.com/api/v2/get-rebalancing-history"
params = {
    "index_id": "67a4eef73960076e78e166ca"
}

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
}, params=params)

rebalancing_data = response.json()
# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-rebalancing-history"
index_id="67a4eef73960076e78e166ca"

# Send the GET request using curl
curl -G "$base_url" \
  --data-urlencode "index_id=$index_id" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL and query parameters
const baseUrl = 'https://api.bitformance.com/api/v2/get-rebalancing-history';
const params = new URLSearchParams({
    index_id: '67a4eef73960076e78e166ca'
});

// Send the GET request
fetch(`${baseUrl}?${params.toString()}`, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "index_id": "67a4eef73960076e78e166ca",
  "coin_map": {
    "1": {
      "symbol": "BTC",
      "name": "Bitcoin"
    },
    "1027": {
      "symbol": "ETH",
      "name": "Ethereum"
    },
    "825": {
      "symbol": "USDT",
      "name": "Tether USDt"
    },
    "1839": {
      "symbol": "BNB",
      "name": "BNB"
    },
    "5426": {
      "symbol": "SOL",
      "name": "Solana"
    }
  },
  "rebalances": [
    {
      "date": "2024-01-01T00:00:00",
      "timestamp": 1704067200,
      "holdings": {
        "1_holdings": 0.6731870276692127,
        "1027_holdings": 3.7408942429832663,
        "825_holdings": 1549.1099375665074,
        "1839_holdings": 0.2982448128211017,
        "5426_holdings": 0.5889244655559327
      }
    },
    {
      "date": "2024-02-01T00:00:00",
      "timestamp": 1706745600,
      "holdings": {
        "1_holdings": 0.7124556892341255,
        "1027_holdings": 4.1203845672931847,
        "825_holdings": 1623.8956234178953,
        "1839_holdings": 0.3156789234567891,
        "5426_holdings": 0.6234567890123456
      }
    },
    {
      "date": "2024-03-01T00:00:00",
      "timestamp": 1709251200,
      "holdings": {
        "1_holdings": 0.6892345678901234,
        "1027_holdings": 3.9876543210987654,
        "825_holdings": 1587.3456789012345,
        "1839_holdings": 0.3098765432109876,
        "5426_holdings": 0.6012345678901234
      }
    }
  ]
}

This endpoint returns the complete rebalancing history for a specific index, showing how asset allocations have changed over time during each rebalancing period.

HTTP Request

GET https://api.bitformance.com/api/v2/get-rebalancing-history

Query Parameters

Parameter Type Required Description
index_id string Yes The hexadecimal ID of the index to query. Index IDs can be retrieved from the "get-browsable-indexes" endpoint. Must be a sector index or market cap tiered index.

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
index_id The unique identifier for the requested index.
coin_map An object mapping coin IDs to their symbol and name information. Keys are coin IDs (as strings), and values contain the coin's symbol and full name.
rebalances An array of rebalancing events, ordered chronologically. Each event contains the date, timestamp, and holdings for that rebalancing period.

Rebalance Object Structure

Each object in the rebalances array contains:

Field Description
date The date and time of the rebalancing event in ISO 8601 format (YYYY-MM-DDTHH:MM:SS).
timestamp The Unix timestamp (in seconds) of the rebalancing event. Can be null if the underlying data has no timestamp for that row.
holdings An object mapping coin holdings keys to actual quantities held. Keys are in the format {coin_id}_holdings, where coin_id corresponds to a key in the coin_map. Values represent the actual number of coins/tokens held in the index at that rebalancing (e.g., 0.673 BTC, 3.74 ETH, etc...).

Understanding the Response

The rebalancing history shows how the index composition has changed over time:

coin_map - Provides a lookup table for all coins that have ever been included in the index - Keys are unique coin IDs (converted to strings) - Each entry contains the coin's trading symbol and full name

rebalances - An array of historical rebalancing events - Each event is timestamped and contains the complete holdings allocation at that point in time - Events are ordered chronologically from earliest to most recent - The holdings object uses keys in the format {coin_id}_holdings to map to actual quantities held (not percentages)

holdings - Keys follow the pattern {coin_id}_holdings (e.g., 1_holdings for Bitcoin) - Values represent the actual quantity of that coin held in the index (not percentages) - For example, "1_holdings": 0.6731870276692127 means the index holds 0.673 Bitcoin - If a coin wasn't included at a particular rebalancing, it will be absent from the holdings object - The coin_id in each holdings key corresponds to a coin_id in the coin_map

Use Cases

This endpoint is valuable for: - Analyzing how index composition changes over time - Understanding asset allocation shifts in response to market conditions - Tracking when new assets enter or exit the index - Evaluating index diversification trends - Building visualizations of index evolution - Backtesting index performance with historical allocations

Error Handling

Common error scenarios:

Status Response Cause
400 {"error": "index_id parameter is required"} The index_id query parameter was omitted.
404 {"error": "Rebalancing history not stored for index {index_id}"} No rebalancing history file exists for that index — either the ID is invalid, or it's a valid index that doesn't have rebalancing history available (e.g. a custom user-created index).
500 {"error": "An error occurred while retrieving rebalancing history"} An unexpected server-side error occurred while loading or processing the data.

Get User API Summary

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL
base_url = "https://api.bitformance.com/api/v2/get-user-api-summary"

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
})

api_summary = response.json()
# Define the base URL
base_url="https://api.bitformance.com/api/v2/get-user-api-summary"

# Send the GET request using curl
curl -X GET "$base_url" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL
const baseUrl = 'https://api.bitformance.com/api/v2/get-user-api-summary';

// Send the GET request
fetch(baseUrl, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "api-key": "66da2b63c98b629570796964",
    "tier": "starter",
    "credits": 247832,
    "expiration": "2024-10-04T11:06:44.991000",
    "active": true
  }
}

This endpoint returns API usage information and account details for the authenticated user.

HTTP Request

GET https://api.bitformance.com/api/v2/get-user-api-summary

Query Parameters

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data Description
api-key The user's API key identifier.
tier The current subscription tier of the user. Possible values: free, starter, analyst, professional, enterprise.
credits The number of API credits remaining for the current billing period.
expiration The expiration date and time of the current subscription in ISO 8601 format.
active Boolean indicating whether the API key is currently active and functional.

Subscription Tiers

The API supports five subscription tiers with different features and limits:

Free Tier - 5,000 credits per month - 10 requests per minute - 3 months of historical data - Access to basic endpoints

Starter Tier - 250,000 credits per month - 20 requests per minute - 6 months of historical data - Access to advanced endpoints

Analyst Tier - 250,000 credits per month - 20 requests per minute - 3 years of historical data - Full endpoint access

Professional Tier - 250,000 credits per month - 30 requests per minute - All time historical data - Commercial use available - Priority support

Enterprise Tier - 2,000,000 credits per month - Custom rate limits - All time historical data - Commercial use available - Beta features available - Dedicated support

Credit Management

Use Cases

Error Scenarios

If no API keys are found for the user, the endpoint will return a message indicating that no API keys exist for the account. This typically occurs when:

Get User API Transactions

Access Tier: FREE

Credits Cost: 1 credit per request

Rate Limits

Tier Limit
Free 10 requests per minute
Starter 20 requests per minute
Analyst 20 requests per minute
Professional 30 requests per minute
Enterprise Custom
import requests

# Define the base URL
base_url = "https://api.bitformance.com/api/v2/get-user-api-transactions"

# Send the GET request
response = requests.get(base_url, headers={
    "API-KEY": "your_api_key",
    "API-SECRET-KEY": "your_secret_key"
})

api_transactions = response.json()
# Define the base URL
base_url="https://api.bitformance.com/api/v2/get-user-api-transactions"

# Send the GET request using curl
curl -X GET "$base_url" \
  -H "API-KEY: your_api_key" \
  -H "API-SECRET-KEY: your_secret_key"
const fetch = require('node-fetch');

// Define the base URL
const baseUrl = 'https://api.bitformance.com/api/v2/get-user-api-transactions';

// Send the GET request
fetch(baseUrl, {
    method: 'GET',
    headers: {
        'API-KEY': 'your_api_key',
        'API-SECRET-KEY': 'your_secret_key'
    }
})
.then(response => response.json())
.then(data => console.log(data));

The above command returns JSON structured like this:

{
  "success": true,
  "data": {
    "user_id": "66da2b63c98b629570796964",
    "api_calls": [
      {
        "id": 1,
        "endpoint": "api.get_browsable_indexes",
        "timestamp": 1693478400,
        "status_code": 200,
        "size_kb": 45,
        "latency": 0.234
      },
      {
        "id": 2,
        "endpoint": "api.get_coin_data",
        "timestamp": 1693478460,
        "status_code": 200,
        "size_kb": 12,
        "latency": 0.156
      },
      {
        "id": 3,
        "endpoint": "api.get_user_indexes",
        "timestamp": 1693478520,
        "status_code": 403,
        "size_kb": 1,
        "latency": 0.089
      },
      {
        "id": 4,
        "endpoint": "api.get_altcoin_season",
        "timestamp": 1693478580,
        "status_code": 200,
        "size_kb": 8,
        "latency": 0.123
      }
    ]
  }
}

This endpoint returns a detailed history of all API calls made by the authenticated user, including performance metrics and response information.

HTTP Request

GET https://api.bitformance.com/api/v2/get-user-api-transactions

Query Parameters

Headers

Header Description
API-KEY Your unique API key.
API-SECRET-KEY Your API secret key.

Response

field Description
success A boolean value indicating whether the API request was successful (true) or not (false).
data Description
user_id The unique identifier of the user making the API calls.
api_calls (array of transaction objects) Description
id Unique identifier for the API transaction.
endpoint The specific API endpoint that was called (e.g., "api.get_browsable_indexes").
timestamp Unix timestamp indicating when the API call was made.
status_code HTTP status code returned by the API call (e.g., 200 for success, 403 for forbidden, 500 for server error).
size_kb Size of the API response in kilobytes.
latency Response time for the API call in seconds.

Transaction Analysis

The transaction history provides valuable insights for:

Performance Monitoring - Track response times across different endpoints - Identify slow-performing API calls - Monitor data transfer volumes

Usage Patterns - Analyze which endpoints are used most frequently - Review API call timing and frequency - Understand application behavior patterns

Error Analysis - Identify failed requests and error patterns - Debug authentication or permission issues - Track retry behavior and success rates

Cost Management - Monitor credit consumption patterns - Identify high-volume usage periods - Plan for credit needs based on historical usage

Status Codes

Common HTTP status codes in transaction history:

Status Code Description
200 Success - Request completed successfully
400 Bad Request - Invalid parameters or request format
401 Unauthorized - Invalid or missing API credentials
403 Forbidden - Insufficient permissions or credits
404 Not Found - Endpoint or resource not found
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server-side error occurred

Data Retention

Transaction history is maintained to provide comprehensive usage analytics. The data includes:

Use Cases

Errors

The Bitformance API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
403 Forbidden -- The API keys in the request were invalid.
404 Not Found -- The specified endpoint could not be found.
429 Too Many Requests -- You have exceeded your API Key's rate limit according to its tier.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.