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
integer
required
Market id. Long and short are the two sides of this market.
string
required
OOM or USDC.integer
required
Market id you quoted.
string
required
Currency you quoted.
Open long shares not reserved by your own asks.
Open short shares not reserved by your own asks.
number
required
k, the overlap: min(long_shares, short_shares).string
required
long, short, or flat after a max merge. The larger side is what remains.number
required
Collateral a max merge would return. One currency unit per merged set.
Perform the merge
integer
required
Market id.
string
required
OOM or USDC.string
max, or an explicit size up to k. Omitted means max. A larger size returns over_merge.string
Retrying a confirmed key returns the original merge and does not pay twice. A key that is still in progress returns
merge_in_progress.integer
required
Merge record id.
integer
required
Market id.
string
required
Currency merged.
number
required
Shares closed on each side.
Long shares still open after the merge.
Short shares still open after the merge.
number
required
Overlap still left.
0 when this call merged the whole pair.string
required
Side still open after this merge, or
flat.number
required
Collateral credited, equal to
amount.number
required
Cost of the shares closed. Profit is
collateral minus this number, and it can be negative.number
required
collateral minus cost_basis.string
required
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.string
The key stored for this merge, when you sent one.
Example
Quote a market, then merge the whole overlap:Errors
Error bodies are
{ "code", "detail" }.