feat: allow fetching twap deltas - #996
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 GitHub Packages PublishedLast updated: Sep 7, 2026, 11:05:58 AM UTC The following packages have been published to GitHub Packages with pre-release version
InstallationThese packages require authentication to install from GitHub Packages. First, create a # Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrcTo get your GitHub token:
Then install any of the packages above, either by exact version (i.e. # Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-996
# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-996
# NPM
npm install npm:@cowprotocol/cow-sdk@pr-996Update to the latest version (only if you used the tag)Every commit will publish a new package. To upgrade to the latest version, run: # Yarn
yarn upgrade @cowprotocol/cow-sdk
# pnpm
pnpm update @cowprotocol/cow-sdk
# NPM
npm update @cowprotocol/cow-sdkView PackagesYou can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages |
Summary
Part of: FE-349
Add an optional
updatedAtBlockGtefilter togetTwapOrders. Clients can fetch changed TWAP parents instead of the full list.bigintand serialize it for GraphQL.To Test
getTwapOrderswithoutupdatedAtBlockGte.getTwapOrderswithupdatedAtBlockGteset to a known block.totalCountrepresents the filtered results, not all TWAPs.getTwapOrderswithupdatedAtBlockGte: -1n.Background
This filter supports delta polling in the frontend without a separate SDK method or GraphQL query.
The boundary is inclusive. Consecutive requests can return the same orders, so clients must merge results by order ID.
Self-checks