Skip to main content

How to query Public Allocator's Data thanks to the API?

Select the query you are interested in in the list below, and paste it into this window below:

Basic Queries

Public Allocator address

query {
publicAllocators {
items {
address
creationBlockNumber
morphoBlue {
address
chain {
id
network
}
}
}
}
}

Total reallocatable liquidity

Reallocations necessary to reach this number

query {
marketByUniqueKey(uniqueKey: "0xe7e9694b754c4d4f7e21faf7223f6fa71abaeb10296a4c43a54a7977149687d2") {
reallocatableLiquidityAssets
state {
liquidityAssets
}
publicAllocatorSharedLiquidity {
assets
vault {
address
name
}
allocationMarket {
uniqueKey
}
}
}
}

Reallocations that occurred for a MetaMorpho vault

query {
publicAllocatorReallocates(
where: { vaultAddress_in: ["0xBEEf050ecd6a16c4e7bfFbB52Ebba7846C4b8cD4"] }
) {
items {
timestamp
assets
type
vault {
address
}
market {
uniqueKey
}
}
}
}

Config of the Public Allocator for a MetaMorpho vault

query {
vaultByAddress(
address: "0x38989BBA00BDF8181F4082995b3DEAe96163aC5D"
chainId: 1
) {
address
publicAllocatorConfig {
fee
flowCaps {
market {
uniqueKey
}
maxIn
maxOut
}
}
}
}