example-data.com

stock-holdings

stock-holdings

Browse 512 stock-holdings records. Free mock data API by Draftbit — fetch over REST or browse paginated HTML.

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": 1,
      "userId": 2,
      "stockId": 5,
      "quantity": 117.999,
      "costBasis": 1627.48,
      "purchasedAt": "2024-09-27T02:42:34.677Z"
    },
    {
      "id": 2,
      "userId": 3,
      "stockId": 77,
      "quantity": 833.1922,
      "costBasis": 4312.93,
      "purchasedAt": "2025-05-13T15:48:30.236Z"
    },
    {
      "id": 3,
      "userId": 3,
      "stockId": 1,
      "quantity": 934.1565,
      "costBasis": 3718.24,
      "purchasedAt": "2025-01-15T00:16:21.211Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 512,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/stock-holdings?page=1",
    "first": "/api/v1/stock-holdings?page=1",
    "last": "/api/v1/stock-holdings?page=21",
    "next": "/api/v1/stock-holdings?page=2",
    "prev": null
  }
}

View full response →

Draftbit