example-data.com

stock-holdings

stock-holdings

Page 5 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": 97,
      "userId": 51,
      "stockId": 79,
      "quantity": 901.1844,
      "costBasis": 89.74,
      "purchasedAt": "2024-09-03T09:41:00.580Z"
    },
    {
      "id": 98,
      "userId": 52,
      "stockId": 15,
      "quantity": 795.8381,
      "costBasis": 2349.87,
      "purchasedAt": "2024-07-26T21:05:24.310Z"
    },
    {
      "id": 99,
      "userId": 52,
      "stockId": 24,
      "quantity": 574.7115,
      "costBasis": 2852.48,
      "purchasedAt": "2024-10-25T16:45:57.933Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 512,
    "totalPages": 22
  },
  "links": {
    "self": "/api/v1/stock-holdings?page=5",
    "next": "/api/v1/stock-holdings?page=6",
    "prev": "/api/v1/stock-holdings?page=4"
  }
}
Draftbit