Fill an order
/sigmafi/orders/{boxId}/fillapi_keyLend the principal to the borrower. The fill mints two units with the order's box id as token id: one circulating claim to this wallet and one singleton locked in the bond. Whoever holds the claim receives the repayment plus the unused reserve, or the collateral after maturity liquidation. The lender funds the reserve above the borrower's full collateral value.
Path parameters
boxIdstringrequired
Request body
SFFillRequest · application/jsonbatchingFeestringNonnegative nanoERG added above collateral. Defaults to sigmafi.bonds.batchingFeeNanoErg (50000000). Values below the automatic batcher floor produce a warning.
Responses
200The transaction was sent; `outcome` says whether the node accepted it.SFResult▶
txIdstringrequiredoutcomestringrequiredone ofacceptedrejecteduncertainboxIdstringThe output that matters: the new order or bond, the vault box a repayment or liquidation pays, or the first box a cancel or claim returns to this wallet.
assetIdstringThe bond asset a fill minted.
warningsstring[]What to know about the sent transaction: vault boxes a claim left locked for good, or a repayment sent with two blocks or fewer left to be mined in.
400A malformed field, or terms no contract or shipped client accepts.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
403Missing or wrong api_key.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
404No unspent box has that id, it is not the kind named, or it is not this wallet's.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
409A pending transaction already spends a box this names. Re-read and resend.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
422Valid, but not possible now: the box's terms are refused, maturity has passed or not come, the wallet cannot cover it, or no wallet box can authorize a cancel.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503Node, wallet or transaction engine unavailable, or the request ran out of time. The message says whether anything was sent. When it says the outcome is unknown, check `GET /sigmafi/portfolio` before retrying.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description