Complete-set merge is not live on
https://api.futuur.com yet. The same handler will exist on /v1.5/ and /v2.0/. Examples below use https://api.futuur.com/v2.0. Sign the request the same way as any other private call. See Authentication.OOM) and real money (USDC) are separate merges. Splitting collateral into a new YES+NO set is a later step, documented in Split before quoting. This page is only the merge.
Who can call it
The phase-one endpoint accepts the house market maker and allowlisted accounts. Session auth (the site), OAuth, wallet JWT, and HMAC all use the same handler. An HMAC caller mergingUSDC also needs real-money API access on that key. Anyone else receives not_enabled.
The house market maker also merges on its own after a fill that increases its smaller side. You do not call this endpoint for that. You call it for your own inventory.
What you can merge
Quote first. The overlap is the shares that are free on both sides:- Open long shares, minus shares reserved by your own asks
- Open short shares, minus shares reserved by your own asks
k = min(long, short)
not_a_complete_set.
Quote the overlap
Open long shares not reserved by your own asks.
Open short shares not reserved by your own asks.
Perform the merge
Retrying a confirmed key returns the original merge and does not pay twice. A key that is still in progress returns
merge_in_progress.Long shares still open after the merge.
Short shares still open after the merge.
Cost of the shares closed. Profit is
collateral minus this number, and it can be negative.ledger credits the ledger. onchain pays from the Pool Safe to your Safe and fails closed if the Pool cannot pay. tokenized burns the YES+NO pair and returns the ERC-20. The request body is the same on every rail.Example
Quote a market, then merge the whole overlap:Errors
Error bodies are
{ "code", "detail" }.