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

# Find Equities

> How to list the supported equities and look one up by ticker or mint

[`GET /equities`](https://pond.dflow.net/resources/trading-api/equities/equities) returns a JSON array of `{ ticker, mint, provider }` objects, one per ticker, sorted by ticker. The list holds the supported equities. A listed equity is not necessarily tradable at a given moment.

## List Supported Equities

The endpoint returns `404` when the API client lacks access and `503` while the list is unavailable. The app retries a `503` and stops on any other error.

```typescript theme={null}
import "dotenv/config";

const DFLOW_TRADE_API_URL = process.env.DFLOW_TRADE_API_URL ?? "https://dev-quote-api.dflow.net";
const DFLOW_API_KEY = process.env.DFLOW_API_KEY; // the key must be enabled for equities

const headers: HeadersInit = {};
if (DFLOW_API_KEY) headers["x-api-key"] = DFLOW_API_KEY;

type EquityMapping = { ticker: string; mint: string; provider: string };

async function fetchEquities(): Promise<EquityMapping[]> {
  for (let attempt = 1; attempt <= 5; attempt++) {
    const response = await fetch(`${DFLOW_TRADE_API_URL}/equities`, { headers });
    if (response.ok) return response.json();
    if (response.status === 404) {
      throw new Error("GET /equities returned 404: the API key is not enabled for equities");
    }
    if (response.status !== 503) {
      throw new Error(`GET /equities failed: ${response.status} ${await response.text()}`);
    }
    if (attempt < 5) await new Promise((resolve) => setTimeout(resolve, attempt * 2_000));
  }
  throw new Error("GET /equities is unavailable (503 after 5 attempts)");
}

const equities = await fetchEquities();

for (const { ticker, mint, provider } of equities) {
  console.log(`${ticker}  ${mint}  ${provider}`);
}
```

## Look Up an Equity by Ticker

Key the rows by ticker and pass the row's `mint` as `inputMint` or `outputMint` to [`/order`](https://pond.dflow.net/resources/trading-api/order/order).

```typescript theme={null}
const equitiesByTicker = new Map(equities.map((row) => [row.ticker, row]));

const ticker = "AAPL";
const match = equitiesByTicker.get(ticker);

console.log(match ? `${ticker}  mint=${match.mint}  provider=${match.provider}` : `${ticker} is not in the supported equities`);
```

## Look Up an Equity by Mint

Key the rows by mint to resolve a mint from a wallet balance or a transaction to its ticker.

```typescript theme={null}
const equitiesByMint = new Map(equities.map((row) => [row.mint, row]));

const mintAddress = "EQUITY_MINT_ADDRESS";
const equity = equitiesByMint.get(mintAddress);

console.log(equity ? `${equity.ticker}  provider=${equity.provider}` : `${mintAddress} is not a supported equity mint`);
```
