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.
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.
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":"standard","asset_type":"fixed","weighting_method":"equal_weight","rebalancing_interval":"monthly","custom_weights":{}},"index_holdings":[{"ticker":"BTC","id":1,"quantity":2.3096153033332625},{"ticker":"ETH","id":1027,"quantity":46.162267242963296}],"index_performance":{"marketcap":1595252377661.0916,"initial_value":"1000","value":275182.10313638713,"drawdown":-33.3143,"change_24hour":12337.86948527029,"change_7d":19450.525573806197,"changepct_24hour":4.693985222307298,"changepct_7d":7.605836463057204,"change_1m":-37412.106191677856,"change_3m":-55245.7049836932,"change_6m":24564.655092169764,"change_1y":138708.6350380197,"changepct_1m":-11.968265910010562,"changepct_3m":-16.719447826744783,"changepct_6m":9.801653988526661,"changepct_1y":101.63780328205716,"asset_new_highs":0,"asset_new_lows":0,"asset_performance_24h_bearish":2,"asset_performance_24h_bullish":0,"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}}]}
This endpoint retrieves all available browsable indexes.
HTTP Request
GET https://api.bitformance.com/api/v2/get-browsable-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).
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 indexs data and performance tracking.
name
The name of the index.
description
The description of the index.
weighting_method
The method used to assign weights to the assets in the index.
rebalancing_interval
The frequency in which the index is rebalanced.
custom_weights
Contains custom weighting values if the “weighting_method” is
index_holdings
Description
ticker
The ticker symbol of the asset held in the index.
id
Unique asset identifier.
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 % 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 indexs peak value over a specified period.
change_24hour
The change in the indexs value over the last 24 hours in dollars.
changepct_24hour
The percentage change in the indexs value over the last 24 hours.
change_7d
The change in the indexs value over the last 7 days in dollars.
changepct_7d
The percentage change in the indexs value over the last 7 days.
change_1m
The change in the indexs value over the last 1 month in dollars.
changepct_1m
The percentage change in the indexs value over the last 1 month.
change_3m
The change in the indexs value over the last 3 months in dollars
changepct_3m
The percentage change in the indexs value over the last 3 months.
change_6m
The change in the indexs value over the last 6 months in dollars.
changepct_6m
The percentage change in the indexs value over the last 6 months.
change_1y
The change in the indexs value over the last 1 year in dollars.
changepct_1y
The percentage change in the indexs value over the last 1 year.
asset_new_highs
The number of holdings in the index that have reached new highs.
asset_new_lows
The number of holdings in the index that have reached new lows.
asset_performance_24h_bearish
The number of holdings in the index that have a bearish performance (negative returns) over the last 24 hours.
asset_performance_24h_bullish
The number of holdings in the index that have a bullish performance (positive returns) over the last 24 hours.
asset_sma_200d_over
The number of holdings in the index that are currently trading above their 200-day simple moving average (SMA).
asset_sma_200d_under
The number of holdings in the index that are currently trading under their 200-day simple moving average (SMA).
asset_sma_50d_over
The number of holdings in the index that are currently trading above their 50-day simple moving average (SMA).
asset_sma_50d_under
The number of holdings in the index that are currently trading under their 50-day simple moving average (SMA).
asset_1y_high
The number of holdings in the index that have reached their highest price in the last year.
asset_1y_low
The number of holdings in the index that have reached their lowest price in the last year.
asset_alltime_high
The number of holdings in the index that have reached their highest price ever.
asset_alltime_low
The number of holdings in the index that have reached their lowest price ever.
Get All Coins
Access Tier: FREE
importrequestsurl="https://api.bitformance.com/api/v2/get-all-coins"headers={"API-KEY":"your_api_key","API-SECRET-KEY":"your_secret_key"}params={"page":1# Example page parameter
}response=requests.get(url,headers=headers,params=params)coins=response.json()
This endpoint retrieves data for a list of coins. This endpoint is paginated, returning 100 coins at a time.
HTTP Request
GET https://api.bitformance.com/api/v2/get-all-coins
Query Parameters
Parameter
Type
Description
page
integer
Specifies the page number to retrieve (e.g., 1, 2, 3, etc.).
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
coin_id
Unique coin identifier.
coin_slug
url-friendly version of the coins name.
name
The full name of the cryptocurrency.
symbol
The ticker symbol of the cryptocurrency.
description
Description of the cryptocurrency.
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).
last_updated
The timestamp of the last time the data for this cryptocurrency.
price
The current price of the cryptocurrency (in USD).
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 closing price of the cryptocurrency at the end of the last trading day.
all_time_high
The highest price ever reached by the cryptocurrency.
all_time_low
The lowest price ever reached by the cryptocurrency.
avg_price_200d
The average price of the cryptocurrency over the last 200 days.
avg_price_50d
The average price of the cryptocurrency over the last 50 days.
change_24hour
The change in the cryptocurrencys value over the last 24 hours in dollars.
changepct_24hour
The percentage change in the cryptocurrencys value over the last 24 hours.
change_7d
The change in the cryptocurrencys value over the last 7 days in dollars.
changepct_7d
The percentage change in the cryptocurrencys value over the last 7 days.
one_year_high
The highest price reached by the cryptocurrency in the last year.
one_year_low
The lowest price reached by the cryptocurrency in the last year.
weekly_high
The highest price reached by the cryptocurrency in the last 7 days.
weekly_low
The lowest price reached by the cryptocurrency in the last 7 days.
Get Coin Data
Access Tier: FREE
importrequests# 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"}# 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 parametersbase_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"\-H"API-KEY: your_api_key"\-H"API-SECRET-KEY: your_secret_key"
constfetch=require('node-fetch');// Define the base URL and query parametersconstbaseUrl='https://api.bitformance.com/api/v2/get-coin-data';constparams=newURLSearchParams({symbols:'BTC,ETH',timeseries_interval:'daily',start:'1639612800',metric:'closing_price'});// Send the GET requestfetch(`${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 endpoint retrieves information and graph data for a specific coin.
HTTP Request
GET https://api.bitformance.com/api/v2/get-coin-data
Query Parameters
Parameter
Type
Description
symbols
comma separated string
The symbols of the coins to retrieve (e.g., "BTC,ETH,DOGE").
timeseries_interval
string
This accepts "daily" or "fivemin". The "daily" parameter returns timeseries data based on the day (e.g. one datapoint per day at UTC-0) whereas the "fivemin" parameter return 24 hour timeseries data where every datapoint is every five minutes (e.g. 10:45, 10:50, 10:55, etc...)
start
int
The UNIX (Epoch) timestamp from where the timeseries data will begin. Please note, if the timestamp is older than what the user has access to, the earliest available timestamp for the user will be used. If the timestamp falls within user access but will return more than 3000 datapoints, an earlier timestamp will be used to return timeseries data so that the amount of datapoints fall within acceptable bounds.
metric
string
This accepts "closing_price" or "market_cap" and defaults to closing price. When used with timeseries interval, this will return the index's closing price or marketcap timeseries data.
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
cmc_id
Unique coin identifier.
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.
description
Description of the cryptocurrency.
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).
initial_value
Oldest closing price tracked by our database.
Daily/Fivemin Timeseries Data
Description
date
The date in "YEAR-MONTH-DAY HOUR-MINUTE-SECONDS" format representing the dates of the coin's performance history
value
The corresponding value of the coin at the date listed
Get Bitformance Altcoin Index
Access Tier: FREE
importrequests# Define the base URL and query parameters
base_url="https://api.bitformance.com/api/v2/get-bitformance-altcoin-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)sector_indexes=response.json()
# Define the base URL and query parametersbase_url="https://api.bitformance.com/api/v2/get-bitformance-altcoin-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"
constfetch=require('node-fetch');// Define the base URL and query parametersconstbaseUrl='https://api.bitformance.com/api/v2/get-bitformance-altcoin-index';constparams=newURLSearchParams({timeseries_interval:'daily',weighting_method:'market_cap',metric:'closing_price'});// Send the GET requestfetch(`${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":"Bitformance Altcoin","description":"Top 200 Altcoins - weighted by market cap, rebalanced quarterly, and an initial starting balance of $1,000. This index aims to reflect the overall performance/trends of altcoins.","algorithm":"top_ranked","asset_type":"dynamic","weighting_method":"market_cap","rebalancing_interval":"QUARTERLY","custom_weights":{}},"index_holdings":[{"ticker":"LTC","id":2,"quantity":3.287725841392287},{"ticker":"XRP","id":52,"quantity":2450.9797025951802},{"ticker":"DOGE","id":74,"quantity":6378.512439581647}],"index_performance":{"marketcap":405001505119.2155,"initial_value":1000,"value":17647.9592678145,"drawdown":-44.7335,"change_24hour":219.86630934640198,"change_7d":20.00662346527679,"changepct_24hour":1.2615626383813359,"changepct_7d":0.11349374410584241,"change_1m":-583.7322879097555,"change_3m":-5273.669374681358,"change_6m":-8771.200695155574,"change_1y":7813.173206304606,"changepct_1m":-3.2017450828718057,"changepct_3m":-23.007393832845576,"changepct_6m":-33.200149843710264,"changepct_1y":79.44426200466917,"asset_new_highs":105,"asset_new_lows":1,"asset_performance_24h_bearish":71,"asset_performance_24h_bullish":129,"asset_sma_200d_over":10,"asset_sma_200d_under":190,"asset_sma_50d_over":42,"asset_sma_50d_under":158,"asset_1y_high":1,"asset_1y_low":0,"asset_alltime_high":0,"asset_alltime_low":0},"daily_timeseries_data":[{"date":"2017-04-01 00:00:00","value":1000.0},{"date":"2017-04-02 00:00:00","value":1004.5596183364022},{"date":"2017-04-03 00:00:00","value":1639.5754208146486},{"date":"2017-04-04 00:00:00","value":1184.4590760724552}],"constituent_info":[{"coin_id":2,"coin_slug":"litecoin","name":"Litecoin","symbol":"LTC","description":"","tier_lvl_1":"Digital Currency","tier_lvl_2":"General","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,"one_year_high":109.2439422366925,"one_year_low":55.98397579556809,"weekly_high":66.58131223228845,"weekly_low":63.83114086015394},{"coin_id":52,"coin_slug":"xrp","name":"XRP","symbol":"XRP","description":"","tier_lvl_1":"Digital Currency","tier_lvl_2":"General","last_updated":"2024-08-25T22:28:00.000Z","price":0.602992014999058,"market_cap":33876148537.34648,"volume":868473452.3078357,"last_daily_close":0.6131096346343136,"all_time_high":3.3778100014,"all_time_low":0.00281020998955,"avg_price_200d":0.5491737517745484,"avg_price_50d":0.5612696043649822,"change_24hour":0.5969002438476169,"changepct_24hour":-1.01025735,"change_7day":0.6345072478846009,"changepct_7day":5.22647599,"one_year_high":0.7180356979709985,"one_year_low":0.4198230598452304,"weekly_high":0.6131096346343136,"weekly_low":0.563904427330128},{"coin_id":74,"coin_slug":"dogecoin","name":"Dogecoin","symbol":"DOGE","description":"","tier_lvl_1":"Digital Currency","tier_lvl_2":"General","last_updated":"2024-08-25T22:28:00.000Z","price":0.064202,"market_cap":8453459345.12345,"volume":345123456.12345,"last_daily_close":0.065432,"all_time_high":0.731578,"all_time_low":0.0000869,"avg_price_200d":0.062345,"avg_price_50d":0.064123,"change_24hour":0.063876,"changepct_24hour":-0.8734,"change_7day":0.063789,"changepct_7day":-0.7564,"one_year_high":0.089456,"one_year_low":0.055432,"weekly_high":0.065432,"weekly_low":0.063432}]}}
Returns index information for the Bitformance Altcoin Index as seen on the homepage
HTTP Request
GET https://api.bitformance.com/api/v2/get-bitformance-altcoin-index
Query Parameters
Parameter
Type
Description
timeseries_interval
string
This accepts "daily" or "fivemin". The "daily" parameter returns timeseries data based on the day (e.g. one datapoint per day at UTC-0) whereas the "fivemin" parameter return 24 hour timeseries data where every datapoint is every five minutes (e.g. 10:45, 10:50, 10:55, etc...)
weighting_method
string
This accepts "market_cap" or "equal_weight" which will return the Bitformance Altcoin Index (market_cap) or the EQW Bitformance Altcoin Index (equal_weight). Defaults to "market_cap".
metric
string
This accepts "closing_price" or "market_cap" and defaults to closing price. When used with timeseries interval, this will return the index's closing price or marketcap timeseries data.
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.
weighting_method
The method used to assign weights to the assets in the index.
rebalancing_interval
The frequency in which the index is rebalanced.
custom_weights
Contains custom weighting values if the “weighting_method” is
index_holdings
Description
ticker
The ticker symbol of the asset held in the index.
id
Unique asset identifier.
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 % 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 that have reached new highs.
asset_new_lows
The number of holdings in the index that have reached new lows.
asset_performance_24h_bearish
The number of holdings in the index that have a bearish performance (negative returns) over the last 24 hours.
asset_performance_24h_bullish
The number of holdings in the index that have a bullish performance (positive returns) over the last 24 hours.
asset_sma_200d_over
The number of holdings in the index that are currently trading above their 200-day simple moving average (SMA).
asset_sma_200d_under
The number of holdings in the index that are currently trading under their 200-day simple moving average (SMA).
asset_sma_50d_over
The number of holdings in the index that are currently trading above their 50-day simple moving average (SMA).
asset_sma_50d_under
The number of holdings in the index that are currently trading under their 50-day simple moving average (SMA).
asset_1y_high
The number of holdings in the index that have reached their highest price in the last year.
asset_1y_low
The number of holdings in the index that have reached their lowest price in the last year.
asset_alltime_high
The number of holdings in the index that have reached their highest price ever.
asset_alltime_low
The number of holdings in the index that have reached their lowest price ever.
Daily/Fivemin Timeseries Data
Description
date
The date in "YEAR-MONTH-DAY HOUR-MINUTE-SECONDS" format representing the dates of the coin's performance history
value
The corresponding value of the index at the date listed
constituent_info
Description
coin_id
Unique coin identifier.
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.
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).
last_updated
The timestamp of the last time the data for this cryptocurrency.
price
The current price of the cryptocurrency (in USD).
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 closing price of the cryptocurrency at the end of the last trading day.
all_time_high
The highest price ever reached by the cryptocurrency.
all_time_low
The lowest price ever reached by the cryptocurrency.
avg_price_200d
The average price of the cryptocurrency over the last 200 days.
avg_price_50d
The average price of the cryptocurrency over the last 50 days.
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_7d
The change in the cryptocurrency's value over the last 7 days in dollars.
changepct_7d
The percentage change in the cryptocurrency's value over the last 7 days.
one_year_high
The highest price reached by the cryptocurrency in the last year.
one_year_low
The lowest price reached by the cryptocurrency in the last year.
weekly_high
The highest price reached by the cryptocurrency in the last 7 days.
weekly_low
The lowest price reached by the cryptocurrency in the last 7 days.
Get Sector Indexes
Access Tier: FREE
importrequests# 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 parametersbase_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"
constfetch=require('node-fetch');// Define the base URL and query parametersconstbaseUrl='https://api.bitformance.com/api/v2/get-sector-indexes';constparams=newURLSearchParams({weighting_method:'market_cap',sector:'Smart Contract Platform',industry:'Layer 1'});// Send the GET requestfetch(`${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:
GET https://api.bitformance.com/api/v2/get-sector-indexes
Query Parameters
Parameter
Type
Description
weighting_method
string
Specifies the method of weighting (options are "market_cap" or "equal_weight").
sector
string
Specifies the sector to filter by (e.g., "Smart Contract Platform").
industry
string
Specifies the industry within the sector (e.g., "Layer 1").
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.
weighting_method
The method used to assign weights to the assets in the index.
rebalancing_interval
The frequency in which the index is rebalanced.
custom_weights
Contains custom weighting values if the “weighting_method” is
index_holdings
Description
ticker
The ticker symbol of the asset held in the index.
id
Unique asset identifier.
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 % 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 that have reached new highs.
asset_new_lows
The number of holdings in the index that have reached new lows.
asset_performance_24h_bearish
The number of holdings in the index that have a bearish performance (negative returns) over the last 24 hours.
asset_performance_24h_bullish
The number of holdings in the index that have a bullish performance (positive returns) over the last 24 hours.
asset_sma_200d_over
The number of holdings in the index that are currently trading above their 200-day simple moving average (SMA).
asset_sma_200d_under
The number of holdings in the index that are currently trading under their 200-day simple moving average (SMA).
asset_sma_50d_over
The number of holdings in the index that are currently trading above their 50-day simple moving average (SMA).
asset_sma_50d_under
The number of holdings in the index that are currently trading under their 50-day simple moving average (SMA).
asset_1y_high
The number of holdings in the index that have reached their highest price in the last year.
asset_1y_low
The number of holdings in the index that have reached their lowest price in the last year.
asset_alltime_high
The number of holdings in the index that have reached their highest price ever.
asset_alltime_low
The number of holdings in the index that have reached their lowest price ever.
Get Altcoin Season Indicator
Access Tier: FREE
importrequests# 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 URLbase_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"
constfetch=require('node-fetch');// Define the base URLconstbaseUrl='https://api.bitformance.com/api/v2/get-altcoin-season';// Send the GET requestfetch(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:
Returns date/price data of the altcoin season indicator
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).
Daily Timeseries Data
Description
date
The date in "YEAR-MONTH-DAY HOUR-MINUTE-SECONDS" format representing the dates of the coin's performance history
value
The corresponding value of the indicator at the date listed
Get Taxonomies
Access Tier: FREE
importrequests# Define the base URL
base_url="https://api.bitformance.com/api/v2/get-taxonomies"# Send the GET request
response=requests.get(base_url,headers={"API-KEY":"your_api_key","API-SECRET-KEY":"your_secret_key"})taxonomies=response.json()
# Define the base URLbase_url="https://api.bitformance.com/api/v2/get-taxonomies"# Send the GET request using curl
curl -X GET "$base_url"\-H"API-KEY: your_api_key"\-H"API-SECRET-KEY: your_secret_key"
constfetch=require('node-fetch');// Define the base URLconstbaseUrl='https://api.bitformance.com/api/v2/get-taxonomies';// Send the GET requestfetch(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:
Returns taxonomy information for all relevant cryptocurrencies.
HTTP Request
GET https://api.bitformance.com/api/v2/get-taxonomies
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
coin_id
Unique coin identifier.
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.
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).
last_updated
The timestamp of the last time the data for this cryptocurrency.
price
The current price of the cryptocurrency (in USD).
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 closing price of the cryptocurrency at the end of the last trading day.
all_time_high
The highest price ever reached by the cryptocurrency.
all_time_low
The lowest price ever reached by the cryptocurrency.
avg_price_200d
The average price of the cryptocurrency over the last 200 days.
avg_price_50d
The average price of the cryptocurrency over the last 50 days.
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_7d
The change in the cryptocurrency's value over the last 7 days in dollars.
changepct_7d
The percentage change in the cryptocurrency's value over the last 7 days.
one_year_high
The highest price reached by the cryptocurrency in the last year.
one_year_low
The lowest price reached by the cryptocurrency in the last year.
weekly_high
The highest price reached by the cryptocurrency in the last 7 days.
weekly_low
The lowest price reached by the cryptocurrency in the last 7 days.
Get User Indexes
Access Tier: FREE
importrequests# 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"})taxonomies=response.json()
# Define the base URLbase_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"
constfetch=require('node-fetch');// Define the base URLconstbaseUrl='https://api.bitformance.com/api/v2/get-user-indexes';// Send the GET requestfetch(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:
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).
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.
description
The description of the index.
weighting_method
The method used to assign weights to the assets in the index.
rebalancing_interval
The frequency in which the index is rebalanced.
custom_weights
Contains custom weighting values if the “weighting_method” is
index_holdings
Description
ticker
The ticker symbol of the asset held in the index.
id
Unique asset identifier.
quantity
The amount of the asset currently held in the index.
index_performance
Description
initial_value
The initial value of the index on inception, also known as the starting investment.
Get Index Data
Access Tier: FREE
importrequests# 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)sector_indexes=response.json()
# Define the base URL and query parametersbase_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"
constfetch=require('node-fetch');// Define the base URL and query parametersconstbaseUrl='https://api.bitformance.com/api/v2/get-index-data';constparams=newURLSearchParams({index_id:'65569daf76cd9d2bc8ec55b5',timeseries_interval:'daily',metric:'closing_price'});// Send the GET requestfetch(`${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":"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","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},"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}]}}
Returns detailed information regarding an individual index. It takes the index id as a parameter (these ids can be found by getting index information from get-browsable-indexes or get-user-indexes).
This endpoint also takes a timeseries interval as a parameter. It can be either "daily" or "fivemin" where the "fivemin" interval returns 24 hour timeseries data in intervals of 5 minutes.
HTTP Request
GET https://api.bitformance.com/api/v2/get-index-data
Query Parameters
Parameter
Type
Description
index_id
string
The hexadecimal id of the index to query. To retrieve all available indexes and their ids, please see the "get-browsable-indexes" or "get-user-indexes" endpoints.
timeseries_interval
string
This accepts "daily" or "fivemin". The "daily" parameter returns timeseries data based on the day (e.g. one datapoint per day at UTC-0) whereas the "fivemin" parameter return 24 hour timeseries data where every datapoint is every five minutes (e.g. 10:45, 10:50, 10:55, etc...)
metric
string
This accepts "closing_price" or "market_cap" and defaults to closing price. When used with timeseries interval, this will return the index's closing price or marketcap timeseries data.
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.
weighting_method
The method used to assign weights to the assets in the index.
rebalancing_interval
The frequency in which the index is rebalanced.
custom_weights
Contains custom weighting values if the “weighting_method” is
index_holdings
Description
ticker
The ticker symbol of the asset held in the index.
id
Unique asset identifier.
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 % 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 that have reached new highs.
asset_new_lows
The number of holdings in the index that have reached new lows.
asset_performance_24h_bearish
The number of holdings in the index that have a bearish performance (negative returns) over the last 24 hours.
asset_performance_24h_bullish
The number of holdings in the index that have a bullish performance (positive returns) over the last 24 hours.
asset_sma_200d_over
The number of holdings in the index that are currently trading above their 200-day simple moving average (SMA).
asset_sma_200d_under
The number of holdings in the index that are currently trading under their 200-day simple moving average (SMA).
asset_sma_50d_over
The number of holdings in the index that are currently trading above their 50-day simple moving average (SMA).
asset_sma_50d_under
The number of holdings in the index that are currently trading under their 50-day simple moving average (SMA).
asset_1y_high
The number of holdings in the index that have reached their highest price in the last year.
asset_1y_low
The number of holdings in the index that have reached their lowest price in the last year.
asset_alltime_high
The number of holdings in the index that have reached their highest price ever.
asset_alltime_low
The number of holdings in the index that have reached their lowest price ever.
Daily/Fivemin Timeseries Data
Description
date
The date in YEAR-MONTH-DAY HOUR-MINUTE-SECONDS format
value
The value of the index at the specific date
Get Top 200 Data
Access Tier: FREE
importrequests# 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)sector_indexes=response.json()
# Define the base URL and query parametersbase_url="https://api.bitformance.com/api/v2/get-index-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"
constfetch=require('node-fetch');// Define the base URL and query parametersconstbaseUrl='https://api.bitformance.com/api/v2/get-index-data';constparams=newURLSearchParams({weighting_method:'marketcap',metric:'closing_price'});// Send the GET requestfetch(`${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:
Returns special timeseries and constituent data regarding a Top 200 index created by the Bitformance Team. This index is current not available on the website and can only be access via the API. The index is created using coins with valid taxonomy data, as well as meeting specific volume and marketcap thresholds. It is rebalanced quarterly, and users can view the constituents per rebalancing period with this API request.
HTTP Request
GET https://api.bitformance.com/api/v2/get-top200-data
Query Parameters
Parameter
Type
Description
index_id
string
The hexadecimal id of the index to query. To retrieve all available indexes and their ids, please see the "get-browsable-indexes" or "get-user-indexes" endpoints.
timeseries_interval
string
This accepts "daily" or "fivemin". The "daily" parameter returns timeseries data based on the day (e.g. one datapoint per day at UTC-0) whereas the "fivemin" parameter return 24 hour timeseries data where every datapoint is every five minutes (e.g. 10:45, 10:50, 10:55, etc...)
metric
string
This accepts "closing_price" or "market_cap" and defaults to closing price. When used with timeseries interval, this will return the index's closing price or marketcap timeseries data.
Headers
Header
Description
API-KEY
Your unique API key.
API-SECRET-KEY
Your API secret key.
Response
field
Description
weighting_method
The method used to assign weights to the assets in the index.
Daily Timeseries Data
Description
date
The date in YEAR-MONTH-DAY HOUR-MINUTE-SECONDS format
value
The value of the index at the specific date
Top 200 Rebalanced Constituents
Description
rebalance_date
The date in YEAR-MONTH-DAY HOUR-MINUTE-SECONDS format of the rebalance
constituents
A list of cryptocurrencies that were included in the rebalancing date.
Get User API Summary
Access Tier: FREE
importrequests# 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"})taxonomies=response.json()
# Define the base URLbase_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"
constfetch=require('node-fetch');// Define the base URLconstbaseUrl='https://api.bitformance.com/api/v2/get-user-api-summary';// Send the GET requestfetch(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: