💰

crypto

Cryptocurrency market data including price, trading volume, market capitalization, supply metrics, price history, and market ranking. Used for crypto exchanges, portfolio trackers, and financial applications.

🎯 Request Builder

https://api.mockly.codes/cryptos?page=1&limit=10&count=10
📡

Configure your request and click Send Request to see the response here.

Endpoints

GET/cryptos

Get a collection of crypto

Alternative: /finance/cryptos
GET/cryptos/:id

Get a single crypto by ID

Alternative: /finance/cryptos/:id
GET/cryptos/meta

Get resource metadata and schema

Alternative: /finance/cryptos/meta
🔍

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/cryptos?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/cryptos?q=laptop&search_fields=name,description

💡 Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

JavaScript

Fetch Collection
// Get 10 crypto
fetch('https://api.mockly.codes/cryptos?count=10')
  .then(res => res.json())
  .then(data => console.log(data));

Python

Fetch with Requests
import requests

response = requests.get(
    'https://api.mockly.codes/cryptos?count=10'
)
data = response.json()

cURL

Command Line
curl "https://api.mockly.codes/cryptos?count=10"

Bypass Cache

Get Fresh Data
fetch('https://api.mockly.codes/cryptos?nocache=true')

Schema Properties

idinteger

Unique identifier for the cryptocurrency record

Gen:random_int
symbolstring

Cryptocurrency ticker symbol (e.g., BTC, ETH, ADA)

Gen:crypto_symbol
namestring

Full name of the cryptocurrency (e.g., Bitcoin, Ethereum, Cardano)

Gen:crypto_name
pricenumber

Current market price per unit in USD

Gen:crypto_price
change_24hnumber

Price change percentage over the last 24 hours

Gen:stock_change_percent
volume_24hnumber

Trading volume in the last 24 hours

Gen:stock_volume
market_capnumber

Total market capitalization (price × circulating supply)

Gen:market_cap
circulating_supplynumber

Number of coins currently in circulation

Gen:crypto_supply
total_supplynumber

Total number of coins that will ever exist (if capped) or current total supply

Gen:crypto_supply
high_24hnumber

Highest price reached in the last 24 hours

Gen:crypto_price
low_24hnumber

Lowest price reached in the last 24 hours

Gen:crypto_price
athnumber

All-time high price ever reached

Gen:crypto_price
ath_datestring

Date when the all-time high price was reached

Gen:past_datedate
rankinteger

Market capitalization ranking among all cryptocurrencies

Gen:random_int
timestampstring

Timestamp when this market data was recorded

Gen:date_timedate-time

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request