example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 14 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": 313,
      "userId": 160,
      "cryptoId": 1,
      "quantity": 75.69736886,
      "costBasis": 42167.208,
      "purchasedAt": "2024-10-08T03:06:46.944Z"
    },
    {
      "id": 314,
      "userId": 160,
      "cryptoId": 43,
      "quantity": 1.78155078,
      "costBasis": 180.44642298,
      "purchasedAt": "2024-07-14T00:39:29.422Z"
    },
    {
      "id": 315,
      "userId": 162,
      "cryptoId": 42,
      "quantity": 58.28757086,
      "costBasis": 108.93698822,
      "purchasedAt": "2025-06-05T00:31:39.120Z"
    }
  ],
  "meta": {
    "page": 14,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=14&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=15&limit=24",
    "prev": "/api/v1/crypto-holdings?page=13&limit=24"
  }
}