example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 6 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": 121,
      "userId": 53,
      "cryptoId": 48,
      "quantity": 90.54761521,
      "costBasis": 128.22062236,
      "purchasedAt": "2025-04-21T10:44:05.266Z"
    },
    {
      "id": 122,
      "userId": 53,
      "cryptoId": 7,
      "quantity": 58.81436972,
      "costBasis": 0.073536,
      "purchasedAt": "2026-04-14T19:02:07.122Z"
    },
    {
      "id": 123,
      "userId": 53,
      "cryptoId": 44,
      "quantity": 94.88262948,
      "costBasis": 78.34890849,
      "purchasedAt": "2025-05-05T04:11:03.444Z"
    }
  ],
  "meta": {
    "page": 6,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=6&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=7&limit=24",
    "prev": "/api/v1/crypto-holdings?page=5&limit=24"
  }
}