> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# tRPC Assets API

> Public asset discovery and asset-page procedures, including taxonomy-backed browse rails and Ondo-aware details.

The assets namespace is available on the public tRPC base endpoint:

* Base endpoint: `POST /v1/trpc`
* Namespace: `assets.*`
* Auth: public

## Highlighted Procedures

* `assets.browseAssets`
  * Purpose: browse presentation-ready asset cards from the asset taxonomy
  * Primary use cases:
    * all tokens from a given issuer via `issuerSlug`
    * all onchain stocks via `exposureCategory: "equity"`
  * Required filter rule: provide at least one of `issuerSlug`, `exposureCategory`, or `exposureSlug`
  * Pagination: `limit` and numeric `cursor`
  * Response items include `assetId`, `marketData`, `metadata`, and `taxonomy`
  * Discovery behavior: browse results may include geo-restricted tokenized equities; interactive clients should enforce restriction checks before selection or execution

* `assets.getStockBrowseSnapshot`
  * Purpose: return the full server-ranked stock universe as one cached snapshot
  * Primary use cases:
    * legacy stock-only UI that still needs an instant full list instead of paged browse assembly
  * Required filter rule: provide at least one of `issuerSlug`, `exposureCategory`, or `exposureSlug`
  * Response items include `assetId`, `marketData`, `metadata`, and `taxonomy`
  * Current implementation is optimized for the Ondo onchain equity universe and is backed by the shared stock snapshot cache
  * Discovery behavior: responses may include geo-restricted tokenized equities; clients should apply restriction checks at interactive steps

* `assets.browseStocks`
  * Purpose: browse paginated stock results for `/stocks`
  * Primary use cases:
    * `/stocks` main table
    * `/stocks` filter chips and matching-card previews
  * Required filter rule: provide at least one of `issuerSlug`, `exposureCategory`, or `exposureSlug`
  * Pagination: `limit` and numeric `cursor`
  * Filter input: stock-tag arrays keyed by `type`, `sector`, `style`, `cap`, and `region`
  * Response includes:
    * `items` for the requested page
    * `nextCursor`
    * `totalCount`
    * `previewItems` for filtered card previews
    * `availableTags` with cross-filter-aware counts for the filter UI
  * Sparkline behavior: paged rows and preview rows already include merged 24H sparkline fallback data when native sparkline data is insufficient

* `assets.browseStocksForSelection`
  * Purpose: browse paginated stock results for the asset-select modal
  * Primary use cases:
    * stock asset selector infinite scroll
    * server-side stock search in the modal
    * server-side stock chain filtering in the modal
  * Required filter rule: provide at least one of `issuerSlug`, `exposureCategory`, or `exposureSlug`
  * Pagination: `limit` and numeric `cursor`
  * Filter input:
    * optional `search`
    * optional `chainId`
  * Response includes:
    * `items` for the requested page
    * `nextCursor`
    * `totalCount`
    * `availableChainIds` for chain-pill availability
  * Search behavior: cache-first substring matching over stock ticker, display name, and onchain symbol
  * Sparkline behavior: returned rows already include merged 24H sparkline fallback data when native sparkline data is insufficient

* `assets.searchForCommandPalette`
  * Purpose: return command-menu-ready asset results for the global "Search portfolios, strategies, assets..." input
  * Primary use cases:
    * legacy webapp command menu
    * command-menu discovery that needs both generic tokens and Ondo onchain stocks
  * Input:
    * required `q`
    * optional `chainFilter`
    * optional `limit`
    * optional `manualCountryCode`
  * Response behavior:
    * preserves generic token-search ordering
    * appends stock-only Ondo matches when space remains
    * dedupes by normalized `assetId` and prefers richer Ondo-backed rows when both sources return the same asset
    * includes the same additive `restrictedAssetsMap` and `restrictionContext` envelope used by `assets.searchForTokens`

* `assets.searchForTokens`
  * Purpose: generic token search
  * Current behavior:
    * remains unchanged and does not merge in command-surface-specific stock results
    * continues to be the right fit for consumers that need raw token search semantics rather than presentation-aware command results

* `assets.getStockHighlights`
  * Purpose: return pre-sized stock highlight sets for discovery surfaces
  * Primary use cases:
    * `/stocks` trending cards
    * stock ticker bars and marquee surfaces
  * Current behavior:
    * `featuredItems` returns up to 24 ranked stocks
    * `tickerItems` returns up to 15 ranked stocks
  * Discovery behavior: responses may include geo-restricted tokenized equities; clients should apply restriction checks at interactive steps

* `assets.getAssetDetails`
  * Purpose: hydrate the asset page for a single asset
  * Response includes:
    * live `marketData`
    * static `metadata`
    * `taxonomy` summary with issuer and exposure classification
    * additive `equityDetails` for taxonomy-classified tokenized equities
    * `isVerifiedByGlider`
  * Ondo-matched assets automatically include live trading extensions inside `marketData.ondo`
  * When present, `equityDetails` is the preferred UI surface for stock-specific rendering

* `assets.getAssetOverlaysBatch`
  * Purpose: hydrate additive asset overlays for many asset ids at once
  * Response includes per-asset:
    * `taxonomy`
    * `equityDetails`
    * `providerExtensions`
  * Intended for normalized in-app joins such as `asset + price + taxonomy + provider state`
  * Empty overlay rows are returned for non-equity or unresolved asset ids instead of failing the whole batch

* `assets.getTimeSeries`
  * Purpose: return chart candles for the asset page
  * Ondo-matched assets automatically use Ondo-aware history when available through the market-data overlay

## Taxonomy Summary

`assets.getAssetDetails` and `assets.browseAssets` both return a compact taxonomy summary:

* `issuer`
  * canonical issuer identity such as `ondo`
* `exposures`
  * exposure rows attached to the asset, such as an equity reference
* `primaryExposure`
  * deterministic primary exposure summary derived from taxonomy ordering rules
* `exposureCategories`
  * normalized category list such as `["equity"]`
* `isTokenizedEquity`
  * derived convenience flag for UI behavior

This taxonomy layer is the source of truth for collection membership. Vendor-specific tags are not used to decide whether an asset belongs in a rail like "All Onchain Stocks".

## Equity Details

`assets.getAssetDetails.equityDetails` is optional and additive:

* `null` for non-equity assets
* populated for taxonomy-backed tokenized equities

The shape is split into a generic equity shell plus issuer-specific enrichments:

* `identity`
  * issuer, ticker/reference, display name, underlying name, onchain symbol
* `taxonomy`
  * primary exposure, additional exposures, exposure categories
* `tagGroups`
  * normalized classification chips when issuer-specific tags are available
* `market`
  * primary/underlying market snapshots, holder count, shares multiplier, minimum amount
* `income`
  * dividend yield, last cash amount, last payment date, payout frequency
* `access`
  * supported networks, payment methods, and raw trading/session details
* `documents`
  * normalized legal document links

`equityDetails` is additive by design so future issuers can populate only the sections they support. Clients should hide empty subsections rather than assuming every field is present.

## Example Calls

Browse all Ondo-issued assets:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.browseAssets' \
  --header 'content-type: application/json' \
  --data '{"json":{"issuerSlug":"ondo","limit":4,"cursor":0}}'
```

Browse all onchain stocks except the current asset:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.browseAssets' \
  --header 'content-type: application/json' \
  --data '{"json":{"exposureCategory":"equity","excludeAssetIds":["0x1111111111111111111111111111111111111111:8453"],"limit":4,"cursor":0}}'
```

Fetch the full cached stock snapshot for legacy stock-first surfaces:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.getStockBrowseSnapshot' \
  --header 'content-type: application/json' \
  --data '{"json":{"issuerSlug":"ondo","exposureCategory":"equity"}}'
```

Fetch the first paginated stocks page with a region filter:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.browseStocks' \
  --header 'content-type: application/json' \
  --data '{"json":{"issuerSlug":"ondo","exposureCategory":"equity","cursor":0,"limit":24,"filters":{"type":[],"sector":[],"style":[],"cap":[],"region":["us"]}}}'
```

Fetch the first stock-selection page for the asset modal:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.browseStocksForSelection' \
  --header 'content-type: application/json' \
  --data '{"json":{"issuerSlug":"ondo","exposureCategory":"equity","cursor":0,"limit":24,"search":"apple","chainId":"8453"}}'
```

Fetch asset details for the asset page:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.getAssetDetails' \
  --header 'content-type: application/json' \
  --data '{"json":{"assetId":"0x1111111111111111111111111111111111111111:8453"}}'
```

Batch-fetch additive overlays for normalized asset joins:

```bash theme={null}
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/assets.getAssetOverlaysBatch' \
  --header 'content-type: application/json' \
  --data '{"json":{"assetIds":["0x1111111111111111111111111111111111111111:8453","0x2222222222222222222222222222222222222222:8453"]}}'
```

## Response Shape Notes

* `browseAssets.items[].marketData` is already hydrated and ready for asset rails
* `getStockBrowseSnapshot.items[]` is the full-list response for legacy stock-only surfaces that still need a snapshot payload
* `browseStocks.items[]` is the preferred `/stocks` table response when the UI needs paging, preview cards, and stock-tag facets in one call
* `browseStocksForSelection.items[]` is the preferred stock modal response when the UI needs infinite scroll, chain availability, and server-side search without a full snapshot payload
* `browseAssets.items[].taxonomy.isTokenizedEquity` can drive generic equity UI
* `getAssetDetails.equityDetails` should drive stock-specific asset-page modules when present
* `getAssetOverlaysBatch.items[]` is the preferred additive payload for normalized client-side asset joins and TanStack DB overlay hydration
* `getAssetDetails.marketData.ondo` remains a live trading overlay and should not be treated as the full issuer profile
* future non-Ondo issuers can appear in equity rails without any Ondo-specific fields
