example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 5 of 21.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/crypto-holdings?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/crypto-holdings?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/crypto-holdings.d.ts https://example-data.com/types/crypto-holdings.d.ts
import type { CryptoHolding, ListEnvelope } from "./types/crypto-holdings";

const res = await fetch(
  "https://example-data.com/api/v1/crypto-holdings?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<CryptoHolding>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/crypto-holdings",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 97,
      "userId": 42,
      "cryptoId": 41,
      "quantity": 54.37159454,
      "costBasis": 92.23138302,
      "purchasedAt": "2026-01-01T15:12:37.102Z"
    },
    {
      "id": 98,
      "userId": 42,
      "cryptoId": 44,
      "quantity": 45.7775191,
      "costBasis": 24.2091182,
      "purchasedAt": "2025-07-11T05:53:43.432Z"
    },
    {
      "id": 99,
      "userId": 43,
      "cryptoId": 24,
      "quantity": 17.38013953,
      "costBasis": 162.42366209,
      "purchasedAt": "2024-05-27T07:21:02.603Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=5&limit=24",
    "first": "/api/v1/crypto-holdings?page=1&limit=24",
    "last": "/api/v1/crypto-holdings?page=21&limit=24",
    "next": "/api/v1/crypto-holdings?page=6&limit=24",
    "prev": "/api/v1/crypto-holdings?page=4&limit=24"
  }
}