Links
💠

LI.FI Subgraphs

Use subgraphs to query data about transfers and swaps executed via the LI.FI Smart Contract and collected fees by integrators on all supported chains.

Supported Chains

Chain
Chain Key
Transfers Playground
Fee Collection Playground
Aurora
AUR
URL
URL
Boba
BOB
URL
URL
Harmony
ONE
URL
URL
Fuse
FUS
URL
URL
Moonbeam
MOO
URL
URL
Celo
CEL
URL
URL
Moonriver
MOR
URL
URL
Polygon (MATIC)
POL
URL
URL
Optimism
OPT
URL
URL
Fantom
FTM
URL
URL
Ethereum
ETH
URL
URL
Gnosis (xDAI)
DAI
URL
URL
Binance Smart Chain
BSC
URL
URL
Avalanche
AVA
URL
URL
Arbitrum-One
ARB
URL
URL

Transfers Playground

Endpoint Format

The endpoint is composed of the base URL and the chain key. Chain keys can be found in the table above. Example for Polygon:
const chainKey = 'pol'
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-diamond-v2-' + chainKey

Usage Examples

const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-diamond-v2-pol';
const query = `
query () {
liFiTransfers() {
id
bridge
fromUser {
id
}
fromAddress
}
}`;
const result = await axios.post(url, {
query
});
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-diamond-v2-pol';
const query = `
query () {
liFiTransferDestinationSides() {
id
timestamp
toUser {
id
}
toAddress
}
}`;
const result = await axios.post(url, {
query
});
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-diamond-v2-pol';
const query = `
query () {
liFiSwaps() {
id
timestamp
toUser {
id
}
}
}`;
const result = await axios.post(url, {
query
});

Fee Collection Playground

Endpoint Format

The endpoint is composed of the base URL and the chain key. Chain keys can be found in the table above. Example for Polygon:
const chainKey = 'pol'
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-fee-collection-' + chainKey

Usage Examples

const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-fee-collection-pol';
const query = `
query () {
integrators() {
id
address
tokens {
id
}
}
}`;
const result = await axios.post(url, {
query
});
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-fee-collection-pol';
const query = `
query () {
tokenBalances() {
id
address
integrator {
id
}
balance
}
}`;
const result = await axios.post(url, {
query
});
const url = 'https://api.thegraph.com/subgraphs/name/lifinance/lifi-fee-collection-pol';
const query = `
query () {
feeCollectionEvents() {
id
integratorFee
integrator{
id
address
}
}
}`;
const result = await axios.post(url, {
query
});
The full type description of the possible GraphQL queries can be viewed by accessing the above-listed URLs in a Browser.