example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 16 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": 361,
      "userId": 184,
      "cryptoId": 18,
      "quantity": 43.0988011,
      "costBasis": 5.31736335,
      "purchasedAt": "2025-07-10T06:25:00.230Z"
    },
    {
      "id": 362,
      "userId": 185,
      "cryptoId": 42,
      "quantity": 5.00413685,
      "costBasis": 132.28203336,
      "purchasedAt": "2025-12-20T14:27:40.619Z"
    },
    {
      "id": 363,
      "userId": 185,
      "cryptoId": 15,
      "quantity": 34.09941688,
      "costBasis": 0.16234093,
      "purchasedAt": "2024-06-05T02:21:33.428Z"
    }
  ],
  "meta": {
    "page": 16,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=16&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=17&limit=24",
    "prev": "/api/v1/crypto-holdings?page=15&limit=24"
  }
}