Skip to content

@gala-chain/chaincodeAPI


API > getPosition

Function: getPosition()

getPosition(ctx, dto): Promise\<DexPositionData>

Parameters

ctx: GalaChainContext

GalaChainContext – The execution context providing access to the GalaChain environment.

dto: GetPositionDto

GetPositionDto - A data transfer object containing: - Pool identifiers – Class keys or token details required to identify the pool. - Positions identifier - lower tick, upper tick.

Returns

DexPositionData

Dev

The positions function retrieves details of a specific liquidity position within a Decentralized exchange pool on the GalaChain ecosystem. It provides insights into the user's position, including token amounts, fees, and other state variables.

Source

chaincode/src/dex/getPosition.ts:38