From 4eedf65b211a76bd0c8d0e2a74dbeea1c2bb4be6 Mon Sep 17 00:00:00 2001 From: ahalekelly Date: Thu, 23 Jun 2022 00:37:04 -0700 Subject: [PATCH] API update pool (#553) * Update api pool and totalLiquidity * fix pool type * reverting totalLiquidity changes * pool and totalLiquidity docs description * Changed pool type to match elsewhere --- docs/docs/api.md | 6 +++--- web/pages/api/v0/_types.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/api.md b/docs/docs/api.md index e7e6a341..a25d245c 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -115,10 +115,10 @@ Requires no authorization. outcomeType: string // BINARY, FREE_RESPONSE, or NUMERIC mechanism: string // dpm-2 or cpmm-1 - pool: number // sum of YES and NO shares in liquidity pool for CPMM, null for DPM probability: number - p?: number // probability constant in y^p * n^(1-p) = k - totalLiquidity?: number + pool: { outcome: number } // For CPMM markets, the number of shares in the liquidity pool. For DPM markets, the amount of mana invested in each answer. + p?: number // CPMM markets only, probability constant in y^p * n^(1-p) = k + totalLiquidity?: number // CPMM markets only, the amount of mana deposited into the liquidity pool volume: number volume7Days: number diff --git a/web/pages/api/v0/_types.ts b/web/pages/api/v0/_types.ts index 4909efc9..d3a74053 100644 --- a/web/pages/api/v0/_types.ts +++ b/web/pages/api/v0/_types.ts @@ -24,7 +24,7 @@ export type LiteMarket = { outcomeType: string mechanism: string - pool: number + pool: { [outcome: string]: number } probability?: number p?: number totalLiquidity?: number @@ -96,7 +96,7 @@ export function toLiteMarket(contract: Contract): LiteMarket { description, tags, url: `https://manifold.markets/${creatorUsername}/${slug}`, - pool: pool.YES + pool.NO, + pool, probability, p, totalLiquidity,