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

# Preview a rate

> Show a live rate with pulse.rates.preview — no order created — proxied through a thin backend route for the client.

A quote is a locked price; creating one moves no money and creates no order.
`rates.preview` wraps it and reshapes it for display.

```ts theme={null}
import { type EngineNetwork } from '@pulsebyshiga/node';

export async function previewCollectionRate(payload: {
  from: string; // e.g. 'USDC'
  to: string; // e.g. 'NGN'
  amount: string; // decimal string in `from`
  network?: EngineNetwork; // UPPERCASE — engine surface
}) {
  const rate = await pulse.rates.preview(payload);
  // { rate, youSend, youReceive, expiresAt, quoteId }
  return rate;
}
```

<Warning>
  `EngineNetwork` (the engine surface used by rates, quotes, offramp, onramp)
  is **UPPERCASE** — `BASE`, `POLYGON`, `ARBITRUM`, `OPTIMISM`, `ETHEREUM`,
  `BSC`. This differs from the lowercase `Network` used by
  [`collectionSessions.create`](/backend/create-session). Pass the casing
  that matches the call you're making.
</Warning>

## Expose it as a thin proxy route

The API key stays on your server. Expose `rates.preview` behind a thin route —
for example `POST /api/pulse/rate` — that simply forwards the request and
returns the reshaped rate:

```ts theme={null}
// Express — a thin proxy so the browser never sees the key
app.post('/api/pulse/rate', async (req, res) => {
  const rate = await previewCollectionRate(req.body);
  res.json(rate);
});
```

Your frontend's `useRate()` hook and `<PulseRate>` component call this route to
show a live rate with no key on the client. Both are documented in the
[frontend SDK reference](/reference/frontend); their theming options are
covered in [Theming](/render/theming).
