crypto-holdings #473
- userId
-
Jabari Farrell @jabari_farrell75
- cryptoId
- crypto/23
- quantity
- 90.36768783
- costBasis
- 126.23409222
- purchasedAt
Overview
crypto-holdings / #473
#473
#473
Request
curl example
curl -sS \ "https://example-data.com/api/v1/crypto-holdings/473" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/crypto-holdings/473" ); 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/473"
);
const cryptoHolding = (await res.json()) as CryptoHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/crypto-holdings/473"
)
crypto_holding = res.json() Response
{
"id": 473,
"userId": 240,
"cryptoId": 23,
"quantity": 90.36768783,
"costBasis": 126.23409222,
"purchasedAt": "2024-11-04T11:54:12.221Z"
}