example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 7 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": 145,
      "userId": 65,
      "cryptoId": 8,
      "quantity": 57.40383126,
      "costBasis": 28.913486,
      "purchasedAt": "2024-08-15T06:17:37.107Z"
    },
    {
      "id": 146,
      "userId": 65,
      "cryptoId": 43,
      "quantity": 39.93269116,
      "costBasis": 39.05068617,
      "purchasedAt": "2026-03-31T23:03:18.952Z"
    },
    {
      "id": 147,
      "userId": 66,
      "cryptoId": 50,
      "quantity": 13.73018556,
      "costBasis": 57.50962892,
      "purchasedAt": "2025-09-14T14:02:38.179Z"
    }
  ],
  "meta": {
    "page": 7,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=7&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=8&limit=24",
    "prev": "/api/v1/crypto-holdings?page=6&limit=24"
  }
}