Skip to main content

getReadablePrice

@foprta/sdk


@foprta/sdk / getReadablePrice

Function: getReadablePrice()

getReadablePrice(rawPrice, jetton0Decimals, jetton1Decimals): number

Defined in: utils/price.ts:27

Converts a blockchain price to its human-readable representation accounting for decimal differences

Parameters

rawPrice

number

Price in blockchain format

jetton0Decimals

number

Number of decimal places for the first token

jetton1Decimals

number

Number of decimal places for the second token

Returns

number

Price adjusted for human readability with proper decimal scaling