Quote a new LithosDex pool
/dex/pools/create/checkWhat creating a pool with reserves amountX and amountY would do. tokenX is ERG for an ERG/token pool. All of it goes into the pool at genesis, at the price the two amounts set, and genesis gives this wallet a provision for all of the supply but 1,000,000 shares. Those shares are locked for good, and with them a millionth of the pool. An ERG/token pool box must always keep over 0.01 ERG, so a warning says when a full exit by its only provider would leave more than the locked share behind. Lists any pool already trading the pair.
Request body
LDPoolCreateRequest · application/jsontokenXstringrequiredERG for an ERG/token pool, or a token/token pool's first token id
tokenYstringrequiredThe pool's other token id
amountXstringrequiredThe pool's reserve of X at genesis; nanoERG for ERG, at least 0.01 ERG
amountYstringrequired▶
feeParamsLDFeeParamsFee numerators over
feeDenom.dexFeeNumstays in the pool;ergFeeNum/tokenFeeNumare set aside for liquidity providers.dexFeeNuminteger · int64requiredergFeeNuminteger · int64requiredtokenFeeNuminteger · int64requiredfeeDenominteger · int64requiredDenominator of every numerator above
Responses
200The quoteLDPoolCreateQuote▶
kindstringrequiredone ofn2tt2ttokenXstringrequiredtokenYstringrequired▶
feeParamsLDFeeParamsrequiredFee numerators over
feeDenom.dexFeeNumstays in the pool;ergFeeNum/tokenFeeNumare set aside for liquidity providers.dexFeeNuminteger · int64requiredergFeeNuminteger · int64requiredtokenFeeNuminteger · int64requiredfeeDenominteger · int64requiredDenominator of every numerator above
reserveXstringrequiredreserveYstringrequiredsharesstringrequiredThe creator's provision: all of the genesis supply but lockedShares
lockedSharesstringrequiredSupply no provision may represent, so its share of the reserves is locked for good
lockedSharenumber · doublerequiredThat supply's fraction of the pool
lockedErgstringrequirednanoERG nobody can take back: the vault box, and a token/token pool box
▶
lockedTokensLDTokenAmount[]requiredTokens nobody can take back beyond the locked share: a token/token vault's one of each
tokenIdstringrequiredamountstringrequiredRaw token units. Decimal string.
poolBoxValuestringrequiredvaultBoxValuestringrequiredprovisionBoxValuestringrequirednanoERG the provision box holds, which a redeem returns
totalErgRequiredstringrequirednanoERG that leaves the wallet across the four transactions
▶
tokensRequiredLDTokenAmount[]requiredtokenIdstringrequiredamountstringrequiredRaw token units. Decimal string.
networkFeestringrequiredThe four transactions' fees together
warningsstring[]requiredPools already trading this pair or why none were looked for, and an ERG/token pool's exit floor
400The request is malformed, names ERG as tokenY or one token twice, offers an ERG reserve under 0.01 ERG, or gives fees out of bounds.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description