example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 20 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": 457,
      "userId": 231,
      "cryptoId": 7,
      "quantity": 6.47095463,
      "costBasis": 0.06041634,
      "purchasedAt": "2025-01-21T19:43:24.651Z"
    },
    {
      "id": 458,
      "userId": 231,
      "cryptoId": 28,
      "quantity": 56.91802822,
      "costBasis": 17.004356,
      "purchasedAt": "2026-04-03T06:09:54.213Z"
    },
    {
      "id": 459,
      "userId": 232,
      "cryptoId": 25,
      "quantity": 11.92101575,
      "costBasis": 44.59476812,
      "purchasedAt": "2026-03-03T17:46:59.917Z"
    }
  ],
  "meta": {
    "page": 20,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=20&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=21&limit=24",
    "prev": "/api/v1/crypto-holdings?page=19&limit=24"
  }
}