Skip to main content
This section is for developers building dashboards, trading tools, bots, alerts, analytics, and wallet integrations for LFG.RICH.

Public API

Read token lists, details, trades, candles, portfolio data, and public protocol configuration.

Contract reference

Use V5 addresses and readable ABI string arrays for Factory, Hook, Router, Token, Referral, and Treasury.

Protocol examples

Follow V5 examples for Ethers, Viem, Web3.js, and Python Web3.py.

API examples

Copy practical fetch examples for existing public REST endpoints.

V5 is the current integration target

Use V5 contracts for new integrations. V3 exists only for legacy tokens and should be treated as deprecated.

Core integration flow

For token interactions, do not hardcode an old factory, hook, or PoolKey. Instead:
1

Read the token's factory and hook when available

V5 integrations should not assume old contract routes for every token.
2

Resolve the PoolKey from the correct Factory

Use getPoolKey(token) when available instead of guessing pool fields.
3

Use the PoolKey with the Swap Router

Buy and sell execution goes through the official Swap Router.
4

Use poolId with the Hook

Estimates, borrowing, repayment, and price reads use the token’s Hook and poolId.

Price precision

V5 price-like values are scaled by 1e22:
  • getEffectivePrice(poolId)
  • floorPrice
  • allTimeHighPrice
  • newPrice emitted by V5 buy/sell events
To show BNB per token:
Do not treat V5 price values as 1e18 prices, or your integration will show values 10,000x too high.

Contracts