example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 15 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": 337,
      "userId": 173,
      "cryptoId": 42,
      "quantity": 68.15626446,
      "costBasis": 170.47586458,
      "purchasedAt": "2024-09-04T01:51:27.212Z"
    },
    {
      "id": 338,
      "userId": 174,
      "cryptoId": 23,
      "quantity": 19.75506697,
      "costBasis": 68.20759174,
      "purchasedAt": "2025-07-18T14:37:09.509Z"
    },
    {
      "id": 339,
      "userId": 175,
      "cryptoId": 16,
      "quantity": 96.55675267,
      "costBasis": 15.640812,
      "purchasedAt": "2025-08-12T00:04:00.320Z"
    }
  ],
  "meta": {
    "page": 15,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=15&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=16&limit=24",
    "prev": "/api/v1/crypto-holdings?page=14&limit=24"
  }
}