Skip to content

Public Allocator

Addresses

Refer to this section. Otherwise query the API like this:

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

Total reallocatable liquidity

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

Configuration per vault

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

Market's Available liquidity

API
query MarketByUniqueKey($uniqueKey: String!, $chainId: Int) {
  marketByUniqueKey(uniqueKey: $uniqueKey, chainId: $chainId) {
    reallocatableLiquidityAssets
    state {
      liquidityAssets
    }
    publicAllocatorSharedLiquidity {
      assets
      vault {
        address
        name
      }
      allocationMarket {
        uniqueKey
        reallocatableLiquidityAssets
      }
    }
  }
}

with the follwoing variable:

{
  "uniqueKey": "0xb8fc70e82bc5bb53e773626fcc6a23f7eefa036918d7ef216ecfb1950a94a85e",
  "chainId": 1
}

Reallocation performed

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