Open CVB91 opened 9 months ago
You can get this information from the pool account info.
Having poolIdMint
:
import {
LIQUIDITY_STATE_LAYOUT_V4
} from '@raydium-io/raydium-sdk'
const data = await connection
.getAccountInfo(new PublicKey(poolIdMint))
.then((info) => LIQUIDITY_STATE_LAYOUT_V4.decode(info.data))
console.log(new Date(Number(data.poolOpenTime.toString() * 1000)))
I want to get the timestamp for when a raydium pool initialisation transaction occurred. Is the a simple way to do this from the pool id?
I have managed to get the pool init transaction by going through the lp mint and then getting largest token accounts for the lp mint, which is the lp token account and then getting the signatures by address for this account and parsing it. However, this needs to be done immediately because as soon as the lp tokens get burned or the liqudity gets removed this token account gets closed. There must be a simpler way right?
Currently this works but needs to be done immediately. I want to find the transaction details after some time has passed so this is not a feasible technique for my implementation.