Sweeping blocks to improve dashboard performance

Prev Next

By default, the Order Blotter displays active blocks, that is, blocks with any orders or placements that are not closed or cancelled.

LUSID allows you to mark inactive blocks as swept to improve the performance of the Order Blotter. Read more on using the Order Blotter.

How do I sweep a block?

For LUSID to successfully sweep a block, the block must meet the following requirements:

  • All orders are in one of the following states:

    • Closed

    • Cancelled

    • Booked

  • All placements are in one of the following states:

    • Allocated

    • Over-allocated

  • All allocations are in one of the following states:

    • Closed

    • Cancelled

    • Booked

  • Executions and allocations have not been modified since the specified LatestAllowableModificationTime.

LUSID evaluates whether the states of the block and its related entities meet the requirements above, and if so, allows you to update the block state to Swept.

To update a block state to Swept (providing the block meets all of the conditions above):

Call the SweepBlocks API, for example:

curl -X POST 'https://<your-domain>.lusid.com/api/api/ordermanagement/SweepBlocks'
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
  "blockIds": {
    "ORDER-C-BLK": {
      "scope": "Finbourne-Examples",
      "code": "ORDER-C-BLK"
    },
    "ORDER-1-BLK": {
      "scope": "Finbourne-Examples",
      "code": "ORDER-1-BLK"
    },
    "ORDER-B-BLK": {
      "scope": "Finbourne-Examples",
      "code": "ORDER-B-BLK"
    }
  },
  "latestAllowableModificationTime": "2025-07-21NLDN_Close"
}'

Alternatively, write a Luminesce SQL query using the Lusid.Block.Writer provider to set the block isSwept value to True, and execute it using a tool such as the LUSID web app. See an example.

Note the following:

  • Once you sweep a block, LUSID no longer includes the block in evaluations of the current state of orders.

  • You can view historical blocks (that is, blocks closed or cancelled on previous days) by selecting a date range.