stock-holdings #481
- userId
-
Malvina Ortiz @malvina_ortiz
- stockId
- stocks/20
- quantity
- 700.6062
- costBasis
- 1925.87
- purchasedAt
Overview
stock-holdings / #481
#481
#481
Request
curl example
curl -sS \ "https://example-data.com/api/v1/stock-holdings/481" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/stock-holdings/481" ); 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/481"
);
const stockHolding = (await res.json()) as StockHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/stock-holdings/481"
)
stock_holding = res.json() Response
{
"id": 481,
"userId": 234,
"stockId": 20,
"quantity": 700.6062,
"costBasis": 1925.87,
"purchasedAt": "2026-01-28T04:44:22.299Z"
}