stock-holdings #293
- userId
-
Clyde Bernier-Gleason @clyde_bernier-gleason6
- stockId
- stocks/51
- quantity
- 989.2298
- costBasis
- 3477.61
- purchasedAt
Overview
stock-holdings / #293
#293
#293
Request
curl example
curl -sS \ "https://example-data.com/api/v1/stock-holdings/293" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/stock-holdings/293" ); 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/293"
);
const stockHolding = (await res.json()) as StockHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/stock-holdings/293"
)
stock_holding = res.json() Response
{
"id": 293,
"userId": 143,
"stockId": 51,
"quantity": 989.2298,
"costBasis": 3477.61,
"purchasedAt": "2024-12-07T07:09:30.276Z"
}