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

# Public API

> Public LFG.RICH API endpoints used by integrations.

The LFG.RICH app exposes public BSC API endpoints for token listings, token details, trades, candles, balances, portfolio data, borrow positions, referrals, and contract configuration.

<CardGroup cols={2}>
  <Card title="Tokens" icon="coins">
    List, search, filter, and inspect official LFG.RICH tokens.
  </Card>

  <Card title="Market activity" icon="chart-line">
    Read trades, candles, prices, volume, floors, and activity feeds.
  </Card>

  <Card title="Protocol config" icon="gear">
    Fetch public contract addresses and ABI payloads used by integrations.
  </Card>

  <Card title="User data" icon="wallet">
    Read portfolio and user-state data where public endpoints expose it.
  </Card>
</CardGroup>

Base path:

```txt theme={null}
/api/bsc
```

## Token endpoints

| Endpoint                                | Description                 |
| --------------------------------------- | --------------------------- |
| `GET /api/bsc`                          | Token list.                 |
| `GET /api/bsc/:address`                 | Token details.              |
| `GET /api/bsc/:address/trades`          | Token trades.               |
| `GET /api/bsc/:address/candles`         | Token chart candles.        |
| `GET /api/bsc/:address/balance/:wallet` | Token balance for a wallet. |
| `GET /api/bsc/creator/:wallet`          | Tokens created by a wallet. |

## Portfolio endpoints

| Endpoint                                  | Description               |
| ----------------------------------------- | ------------------------- |
| `GET /api/bsc/portfolio/:wallet/summary`  | Portfolio summary.        |
| `GET /api/bsc/portfolio/:wallet`          | Portfolio token holdings. |
| `GET /api/bsc/portfolio/:wallet/activity` | Recent wallet activity.   |
| `GET /api/bsc/portfolio/:wallet/borrows`  | Borrow positions.         |

## Referral endpoints

| Endpoint                            | Description              |
| ----------------------------------- | ------------------------ |
| `GET /api/bsc/referrals/:wallet`    | Referral dashboard data. |
| `GET /api/bsc/referrals/code/:code` | Resolve a referral code. |

## Config endpoints

| Endpoint                                 | Description                                     |
| ---------------------------------------- | ----------------------------------------------- |
| `GET /api/bsc/config/native-price`       | Current BNB/USD price used by the app.          |
| `GET /api/bsc/config/contracts`          | Contract addresses and human-readable ABI data. |
| `GET /api/bsc/jsonconfig/contracts`      | Contract addresses and JSON ABI data.           |
| `GET /api/bsc/config/owner-data/:wallet` | Admin ownership data for the connected wallet.  |

API responses may evolve as the app evolves. Integrations should tolerate extra fields and should not assume undocumented fields will remain forever.
