LFJ Developer Docs
  • Liquidity Book
  • Introduction
  • LB V2.2 Key Changes
  • Guides
    • Swap Tokens
    • Add/Remove Liquidity
    • Tracking Volume
    • Tracking Pool Balances
    • Finding The Best Quote
    • Byte32 Decoding
    • Price From Bin Id
    • Bin Id From Price
    • Finding Liquidity Depth
    • User Balances
  • Concepts
    • Concentrated Liquidity
    • Bin Math
    • Bin Liquidity
    • Swaps
    • Fees
    • Oracle
  • Contracts
    • Interfaces
      • ILBLegacyFactory
      • ILBLegacyToken
      • ILBLegacyPair
      • ILBLegacyRouter
      • ILBFlashLoanCallback
      • IPendingOwnable
      • IJoeFactory
      • IJoePair
      • IJoeRouter01
      • IJoeRouter02
      • IWNATIVE
      • ILBFactory
      • ILBHooks
      • ILBPair
      • ILBRouter
      • ILBToken
    • Libraries
      • Math
        • BitMath
        • Encoded
        • LiquidityConfigurations
        • PackedUint128Math
        • SafeCast
        • SampleMath
        • TreeMath
        • Uint128x128Math
        • Uint256x256Math
      • BinHelper
      • Clone
      • Constants
      • FeeHelper
      • Hooks
      • ImmutableClone
      • JoeLibrary
      • OracleHelper
      • PairParameterHelper
      • PriceHelper
      • ReentrancyGuardUpgradeable
      • TokenHelper
    • LBBaseHooks
    • LBFactory
    • LBPair
    • LBQuoter
    • LBRouter
    • LBToken
  • Deployment Addresses
    • Avalanche C-Chain
    • Fuji Testnet
    • Arbitrum One
    • Binance Smart Chain
    • Binance Smart Chain Testnet
    • Ethereum Mainnet
    • Monad Testnet
  • SDK
    • Introduction
    • Making a Trade
    • Adding Liquidity
    • Removing Liquidity
  • Audits
  • AMM
    • Joe V1 Contracts
    • Joe V1 Audits
  • LFJ DEX API
    • Dex Analytics
    • Pools
    • Rewards
    • User
    • User Lifetime Stats
    • Vaults
    • Models
  • LFJ Aggregator API
    • Default
    • Models
Powered by GitBook
On this page
  1. LFJ DEX API

User

PreviousRewardsNextUser Lifetime Stats

User Current Bin Ids

get
Path parameters
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
chainstring · enumRequired

An enumeration.

Possible values:
pool_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Responses
200
Successful Response
application/json
Responseinteger[]
422
Validation Error
application/json
get
GET /v1/user/bin-ids/{user_address}/{chain}/{pool_address} HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  1
]

Get User Pool Ids

get
Path parameters
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
chainstring · enumRequired

An enumeration.

Possible values:
Query parameters
pageSizeinteger · max: 100OptionalDefault: 20
pageNumintegerOptionalDefault: 1
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/pool-ids/{user_address}/{chain} HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  {
    "poolAddress": "text",
    "pairName": "text",
    "status": "main",
    "version": "v2.0",
    "chain": "text",
    "lbBinStep": 1,
    "lbBaseFeePct": 1,
    "lbMaxFeePct": 1,
    "binIds": [
      1
    ],
    "tokenX": {
      "address": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "priceUsd": 1
    },
    "tokenY": {
      "address": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "priceUsd": 1
    }
  }
]

Get Pool User Balances

get

This API is only accessible by users with the the partner API key.

Query parameters
chainIdintegerRequired
lpAddressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
poolAddressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/pool-user-balances HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  {
    "user": "0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c",
    "balance": "text",
    "pool": "0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c",
    "lpTokenAddress": "0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c",
    "baseTokenBalance": "text",
    "quoteTokenBalance": "text",
    "baseTokenAddress": "0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c",
    "quoteTokenAddress": "0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c"
  }
]

Get User Farm Positions

get
Path parameters
chainstring · enumRequired

An enumeration.

Possible values:
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/{chain}/{user_address}/farms HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  {
    "farmId": "text",
    "userPosition": "text",
    "userPositionRaw": "text",
    "userPositionUsd": "text",
    "pendingJoe": 1
  }
]

Get User Farm Position

get
Path parameters
chainstring · enumRequired

An enumeration.

Possible values:
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
vault_idstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/{chain}/{user_address}/farms/{vault_id} HTTP/1.1
Host: api.lfj.dev
Accept: */*
{
  "farmId": "text",
  "userPosition": "text",
  "userPositionRaw": "text",
  "userPositionUsd": "text",
  "pendingJoe": 1
}

User Historical Position

get
Path parameters
chainstring · enumRequired

An enumeration.

Possible values:
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
pool_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Query parameters
pageSizeinteger · max: 100OptionalDefault: 20
pageNumintegerOptionalDefault: 1
startTimeintegerRequired
endTimeintegerOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/{chain}/history/{user_address}/{pool_address} HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  {
    "poolAddress": "text",
    "pairName": "text",
    "binId": 1,
    "lbBinStep": 1,
    "lbBaseFeePct": 1,
    "lbMaxFeePct": 1,
    "tokenX": {
      "address": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "amount": 1,
      "amountRaw": "text",
      "price": 1,
      "priceUsd": 1
    },
    "tokenY": {
      "address": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "amount": 1,
      "amountRaw": "text",
      "price": 1,
      "priceUsd": 1
    },
    "isDeposit": true,
    "timestamp": "2025-06-18T00:07:53.246Z",
    "blockNumber": 1
  }
]

User Earned Fees Per Bin

get
Path parameters
chainstring · enumRequired

An enumeration.

Possible values:
user_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
pool_addressstringRequiredExample: 0xe785e0899e7acd50a55f6b517f1f9c46574c9d7c
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/user/fees-earned/{chain}/{user_address}/{pool_address} HTTP/1.1
Host: api.lfj.dev
Accept: */*
[
  {
    "binId": 1,
    "mostRecentDepositTime": "2025-06-18T00:07:53.246Z",
    "timestamp": 1,
    "accruedFeesX": 1,
    "accruedFeesY": 1,
    "accruedFeesL": 1,
    "priceXY": 1,
    "priceYX": 1
  }
]
  • GETUser Current Bin Ids
  • GETGet User Pool Ids
  • GETGet Pool User Balances
  • GETGet User Farm Positions
  • GETGet User Farm Position
  • GETUser Historical Position
  • GETUser Earned Fees Per Bin