Skip to content

Commit ee279c2

Browse files
committed
add numQuoters
1 parent a74ac72 commit ee279c2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.2.0
4+
5+
### Added
6+
7+
numQuoters
8+
39
## 2.1.0
410

511
### Added

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface PriceData extends Base, Price {
6565
priceType: number
6666
exponent: number
6767
numComponentPrices: number
68+
numQuoters: number
6869
lastSlot: bigint
6970
validSlot: bigint
7071
twap: Ema
@@ -199,8 +200,8 @@ export const parsePriceData = (data: Buffer): PriceData => {
199200
const exponent = data.readInt32LE(20)
200201
// number of component prices
201202
const numComponentPrices = data.readUInt32LE(24)
202-
// unused
203-
// const unused = accountInfo.data.readUInt32LE(28)
203+
// number of quoters that make up aggregate
204+
const numQuoters = data.readUInt32LE(28)
204205
// slot of last valid (not unknown) aggregate price
205206
const lastSlot = readBigUInt64LE(data, 32)
206207
// valid on-chain slot of aggregate price
@@ -255,6 +256,7 @@ export const parsePriceData = (data: Buffer): PriceData => {
255256
priceType,
256257
exponent,
257258
numComponentPrices,
259+
numQuoters,
258260
lastSlot,
259261
validSlot,
260262
twap,

0 commit comments

Comments
 (0)