stock-holdings #48
- userId
-
Jensen Bashirian @jensen_bashirian
- stockId
- stocks/6
- quantity
- 962.8141
- costBasis
- 6895.03
- purchasedAt
Overview
stock-holdings / #48
#48
#48
Request
curl example
curl -sS \ "https://example-data.com/api/v1/stock-holdings/48" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/stock-holdings/48" ); const stockHolding = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/stock-holdings.d.ts https://example-data.com/types/stock-holdings.d.ts
import type { StockHolding } from "./types/stock-holdings";
const res = await fetch(
"https://example-data.com/api/v1/stock-holdings/48"
);
const stockHolding = (await res.json()) as StockHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/stock-holdings/48"
)
stock_holding = res.json() Response
{
"id": 48,
"userId": 29,
"stockId": 6,
"quantity": 962.8141,
"costBasis": 6895.03,
"purchasedAt": "2025-11-25T01:22:47.507Z"
}