example-data.com
Menu
Browse docs and collections

crypto-holdings

crypto-holdings

Page 10 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": 217,
      "userId": 103,
      "cryptoId": 33,
      "quantity": 46.25285846,
      "costBasis": 62.37999415,
      "purchasedAt": "2024-07-25T19:28:02.782Z"
    },
    {
      "id": 218,
      "userId": 103,
      "cryptoId": 18,
      "quantity": 82.90451187,
      "costBasis": 8.8100667,
      "purchasedAt": "2025-02-21T13:24:02.693Z"
    },
    {
      "id": 219,
      "userId": 103,
      "cryptoId": 40,
      "quantity": 48.27222339,
      "costBasis": 43.73045623,
      "purchasedAt": "2025-05-01T22:18:52.907Z"
    }
  ],
  "meta": {
    "page": 10,
    "limit": 24,
    "total": 498,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/crypto-holdings?page=10&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=11&limit=24",
    "prev": "/api/v1/crypto-holdings?page=9&limit=24"
  }
}