example-data.com

stock-holdings

stock-holdings

Page 10 of 10.

curl -sS \
  "https://example-data.com/api/v1/stock-holdings?limit=25"
const res = await fetch(
  "https://example-data.com/api/v1/stock-holdings?limit=25"
);
const { data, meta } = await res.json();
import type { StockHolding, ListEnvelope } from "https://example-data.com/types/stock-holdings.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/stock-holdings?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<StockHolding>;
import requests

res = requests.get(
    "https://example-data.com/api/v1/stock-holdings",
    params={"limit": 25},
)
data = res.json()
{
  "data": [
    {
      "id": 217,
      "userId": 108,
      "stockId": 13,
      "quantity": 951.3749,
      "costBasis": 2808.21,
      "purchasedAt": "2024-12-09T22:30:35.462Z"
    },
    {
      "id": 218,
      "userId": 111,
      "stockId": 72,
      "quantity": 912.7272,
      "costBasis": 2798.51,
      "purchasedAt": "2024-10-01T08:48:27.492Z"
    },
    {
      "id": 219,
      "userId": 111,
      "stockId": 11,
      "quantity": 515.9443,
      "costBasis": 3635.3,
      "purchasedAt": "2024-09-06T21:32:52.458Z"
    }
  ],
  "meta": {
    "page": 10,
    "limit": 24,
    "total": 512,
    "totalPages": 22
  },
  "links": {
    "self": "/api/v1/stock-holdings?page=10",
    "next": "/api/v1/stock-holdings?page=11",
    "prev": "/api/v1/stock-holdings?page=9"
  }
}
Draftbit