crypto-holdings #211
- userId
-
Tabitha McKenzie @tabitha_mckenzie
- cryptoId
- crypto/10
- quantity
- 78.70564734
- costBasis
- 10.4048136
- purchasedAt
Overview
crypto-holdings / #211
#211
#211
Request
curl example
curl -sS \ "https://example-data.com/api/v1/crypto-holdings/211" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/crypto-holdings/211" ); const cryptoHolding = 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 } from "./types/crypto-holdings";
const res = await fetch(
"https://example-data.com/api/v1/crypto-holdings/211"
);
const cryptoHolding = (await res.json()) as CryptoHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/crypto-holdings/211"
)
crypto_holding = res.json() Response
{
"id": 211,
"userId": 98,
"cryptoId": 10,
"quantity": 78.70564734,
"costBasis": 10.4048136,
"purchasedAt": "2025-01-28T00:49:40.073Z"
}