Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openTime is 0 when using fetchPoolByMints #83

Open
dseravalli opened this issue Jan 26, 2025 · 0 comments
Open

openTime is 0 when using fetchPoolByMints #83

dseravalli opened this issue Jan 26, 2025 · 0 comments

Comments

@dseravalli
Copy link

The pool is open yet openTime is 0.

import { Connection } from "@solana/web3.js";
import { Raydium } from "@raydium-io/raydium-sdk-v2";

export async function getAllRaydiumPools(mint: string) {
  const solana = new Connection(process.env.RPC_URL);
  const raydium = await Raydium.load({ connection: solana });
  const pools = await raydium.api.fetchPoolByMints({
    mint1: mint,
    mint2: WSOL_MINT,
  });
  return pools;
}

const pools = await getAllRaydiumPools(
  "J73iJbQFQtBYuzD57PbZMYeLmFUHEki9ih5CvhaYVDuh"
);

console.log(pools);
{
  count: 1,
  data: [
    {
      type: "Standard",
      programId: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
      id: "8y4s9KfpHi2ayt4jZjyb6iDvx9ux6hYivHodD3gyfcBf",
      mintA: [Object ...],
      mintB: [Object ...],
      price: 524591.157243102,
      mintAmountA: 203.844494493,
      mintAmountB: 106935019.263718,
      feeRate: 0.0025,
      openTime: "0",
      tvl: 101336.21,
      day: [Object ...],
      week: [Object ...],
      month: [Object ...],
      pooltype: [ "OpenBookMarket" ],
      rewardDefaultInfos: [],
      farmUpcomingCount: 0,
      farmOngoingCount: 0,
      farmFinishedCount: 0,
      marketId: "Ko5bjeXKNhpWDkKtbZ3GtkT1mzxLKPDWguaP2yyKDZ1",
      lpMint: [Object ...],
      lpPrice: 23.333845225672828,
      lpAmount: 4342.88509523,
      burnPercent: 100,
    }
  ],
  hasNextPage: false,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant