Skip to content

Commit

Permalink
Merge pull request #96 from Premian-Labs/fix/orderbook-api-response-type
Browse files Browse the repository at this point in the history
Update totalValueLockedUSD to totalContracts in the function to get available liquidity
  • Loading branch information
froggiedev committed Jan 3, 2024
2 parents 4b6908b + f426243 commit 0357a49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@premia/v3-sdk",
"version": "2.3.4",
"version": "2.4.0",
"description": "The official SDK for building applications on Premia V3.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/services/orderbookV1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class OrderbookV1 {
.toPairs()
.map(([maturity, sum]) => ({
maturity: Number(maturity),
totalValueLockedUSD: BigInt(sum),
totalContracts: BigInt(sum),
}))
.value()
}
Expand All @@ -278,7 +278,7 @@ export class OrderbookV1 {
.toPairs()
.map(([strike, sum]) => ({
strike: BigInt(strike),
totalValueLockedUSD: BigInt(sum),
totalContracts: BigInt(sum),
}))
.value()
}
Expand Down
4 changes: 2 additions & 2 deletions src/services/orderbookV1/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ export interface GroupByStrikeRequest extends LiquiditySummaryRequest {

export interface GroupByMaturityResponse {
maturity: number
totalValueLockedUSD: BigInt
totalContracts: BigInt
}

export interface GroupByStrikeResponse {
strike: BigInt
totalValueLockedUSD: BigInt
totalContracts: BigInt
}

0 comments on commit 0357a49

Please sign in to comment.