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

# getPriceChanges24h

> Fetch each pair's price change over the last 24 hours, the same figure the Ostium app shows.

```ts theme={null}
const changes = await client.getPriceChanges24h({ pairIds: [0, 1, 10] });
```

Each pair's change over the last 24 hours: the live mid price against the price 24 hours ago from Ostium's price-history service. It uses the same source and formula as the Ostium app, so an integration shows the same figure. Omit `pairIds` to get every pair.

## Parameters

```ts theme={null}
interface GetPriceChanges24hParams {
  pairIds?: Array<string | number>;
}
```

## Response schema

```ts theme={null}
type Response = Array<{
  pairId: string;
  pairFrom: string;     // normalized display name, e.g. "US500"
  pairTo: string;
  price: number;        // live mid price
  price24hAgo: number;
  change: number;       // price - price24hAgo
  changePct: number;    // change / price24hAgo * 100; -1.41 means down 1.41%
}>;
```

Example item:

```ts theme={null}
{ pairId: '0', pairFrom: 'BTC', pairTo: 'USD', price: 83034.96,
  price24hAgo: 84221.73, change: -1186.77, changePct: -1.41 }
```

## Notes

* A pair is left out when it has no live price or no 24-hour-ago price, rather than reported as 0%.
* A call is one request to the price-history service plus the cached live prices, about 2 seconds.
* Mainnet and testnet use the same price-history service.
* Don't derive this from [getCandles](/developer/reference/get-candles.md): its series can start a little less than 24 hours back, so the figure won't match the app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.