> For the complete documentation index, see [llms.txt](https://docs.origami.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.tech/reference/grid-language/functions/amount-before-price.md).

# amount\_before\_price()

amount\_before\_price() sums the order book volume on the bid or ask side up to a given price level.

The Amount Before Price function in Origami Tech measures cumulative liquidity before a price level, useful for order book and slippage analysis.

## `amount_before_price`(*threshold\_price*:*decimal*, *amounts*: *list*\[*decimal*], *prices*: *list*\[*decimal*], *side*: *union*\["*ask*"|"*bid*") -> *decimal*|*None*

Example:
