@gala-chain/chaincode ∙ API
API > getPositionById
Function: getPositionById()
getPositionById(
ctx,dto):Promise\<DexPositionData>
Parameters
▪ ctx: GalaChainContext
GalaChainContext – The execution context providing access to the GalaChain environment.
▪ dto: GetPositionByIdDto
GetPositionByIdDto - A data transfer object containing: - poolHash: The identifier of the liquidity pool. - tickUpper: The upper tick boundary of the position. - tickLower: The lower tick boundary of the position. - positionId: The unique identifier for the user's position.
Returns
A Promise resolving to the DexPositionData instance.
Dev
Fetches the DexPositionData object using the provided positionId.