Buy from an ask (quote)
/sigmafi/zc/asks/{boxId}/buy/checkWhat the send would do, at the snapshot at. Signs nothing. A write that cannot run now answers 200 with its refusals.
Path parameters
boxIdstringrequiredA ZC box id.
Request body
ZcBuyRequest · application/jsonunitsstringDefault all the ask holds.
allowLiquidatableboolean▶
limitsZcLimitsBounds on the rebuilt transaction. For fills, buys, repays, recollateralizations and claims, amounts are in the action's market unit (nanoERG for ERG, fee included; raw units for SigUSD; nanoERG for actions with no market). For posts (orders, offers, asks, lots, fractionalize and wraps),
maxPayis always in nanoERG (box value plus miner fee), since any token capital or collateral is fixed directly by the request body. Outside them the send answers 409.maxPaystringminReceivestring
Responses
200What the write would do, or its `refusals`. Nothing was signed or sent.ZcQuote▶
actionstring▶
atZcAtThe snapshot a read or quote was taken from.
heightintegerblockIdstringindexedHeightintegerrevisioninteger · int64Changes whenever anything a read returns changes, the mempool included.
cutbooleanTrue when the book is at its size cap and left boxes out.
mempoolbooleanWhether unconfirmed boxes are laid over the confirmed book.
paysNanoErgsstringnanoERG leaving this wallet, the miner fee included.
▶
paysTokensZcToken[]tokenIdstringrequiredamountstringrequired
receivesNanoErgsstring▶
receivesTokensZcToken[]tokenIdstringrequiredamountstringrequired
▶
feesobject[]namestringnanoErgstringkindstringone ofspentlockedrefundableearned
▶
createsobject[]Each output that does not come to this wallet, by role.
rolestringcontractstringnullablenanoErgstring▶
tokensZcToken[]tokenIdstringrequiredamountstringrequired
termsobjectThe resolved terms; they differ by action.
validFromintegervalidThroughintegernullablematchesNowanyFor a create, the simulation of its body; for a fill or buy, the offers that would compete for it.
warningsstring[]refusalsstring[]When not empty, the send answers 422 with these reasons.
requiresstring[]What must happen before the write can run.
400A malformed field, or terms the contracts refuse.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
404No such box or token, or not this wallet's.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
429Too many concurrent quotes, simulations, or heavy reads (`/curves`, `/orderbook`, `/fills`): at most 4 quotes/simulations and at most 4 heavy reads run or wait at once across all callers, and simulations are additionally limited to 5 in flight per caller, then 1 a second. Retry shortly.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503ZC tracking is off or not seeded, or the node, its index or the wallet did not answer. Nothing was sent.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description