crypto-holdings #136
- userId
-
Jarrell Flatley @jarrell_flatley39
- cryptoId
- crypto/49
- quantity
- 27.46138481
- costBasis
- 35.03270289
- purchasedAt
Overview
crypto-holdings / #136
#136
#136
Request
curl example
curl -sS \ "https://example-data.com/api/v1/crypto-holdings/136" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/crypto-holdings/136" ); 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/136"
);
const cryptoHolding = (await res.json()) as CryptoHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/crypto-holdings/136"
)
crypto_holding = res.json() Response
{
"id": 136,
"userId": 61,
"cryptoId": 49,
"quantity": 27.46138481,
"costBasis": 35.03270289,
"purchasedAt": "2024-10-21T04:40:49.276Z"
}