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
This commit is contained in:
ahalekelly 2022-06-23 00:37:04 -07:00 committed by GitHub
parent 6dcbc92a66
commit 4eedf65b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -115,10 +115,10 @@ Requires no authorization.
outcomeType: string // BINARY, FREE_RESPONSE, or NUMERIC outcomeType: string // BINARY, FREE_RESPONSE, or NUMERIC
mechanism: string // dpm-2 or cpmm-1 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 probability: number
p?: number // probability constant in y^p * n^(1-p) = k 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.
totalLiquidity?: number 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 volume: number
volume7Days: number volume7Days: number

View File

@ -24,7 +24,7 @@ export type LiteMarket = {
outcomeType: string outcomeType: string
mechanism: string mechanism: string
pool: number pool: { [outcome: string]: number }
probability?: number probability?: number
p?: number p?: number
totalLiquidity?: number totalLiquidity?: number
@ -96,7 +96,7 @@ export function toLiteMarket(contract: Contract): LiteMarket {
description, description,
tags, tags,
url: `https://manifold.markets/${creatorUsername}/${slug}`, url: `https://manifold.markets/${creatorUsername}/${slug}`,
pool: pool.YES + pool.NO, pool,
probability, probability,
p, p,
totalLiquidity, totalLiquidity,