stock-holdings #185
- userId
-
Ruben Terry @ruben.terry
- stockId
- stocks/49
- quantity
- 2.4524
- costBasis
- 882.33
- purchasedAt
Overview
stock-holdings / #185
#185
#185
Request
curl example
curl -sS \ "https://example-data.com/api/v1/stock-holdings/185" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/stock-holdings/185" ); 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/185"
);
const stockHolding = (await res.json()) as StockHolding; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/stock-holdings/185"
)
stock_holding = res.json() Response
{
"id": 185,
"userId": 91,
"stockId": 49,
"quantity": 2.4524,
"costBasis": 882.33,
"purchasedAt": "2024-06-09T02:16:39.879Z"
}