Join the collateral queue
/collateral/joinapi_keyPost principal and permit for count new positions, each under its own lender key. Positions cannot be withdrawn once queued, so acknowledgeNoWithdrawal must be true. Send expectedEmissionBoxId from the quote to get a 409 instead of a join priced against stale state.
Send priorityFeeEachNanoErgs as the quote was taken at, since it decides what each position locks up. A non-zero fee is at least minPriorityFeeNanoErgs, but there is no maximum: a fee above the quote's break-even is accepted, because the mined block's own transaction fees can still cover it.
Refused with 409 while the client has autoCollateralize on. The automated pass owns lender-key selection, and a manual join can take a key it is already using; only one live position per key is allowed, and the second is forfeited. Check manualJoinAllowed on the quote first.
Positions are created one at a time, each chained onto the last. If one fails, the run stops there: the response is 200 with the positions already created and a stoppedReason. A run that creates none returns an error status instead.
Request body
CollateralJoinExecuteRequest · application/jsoncountinteger · int32requiredPositions to create
1 – 25acknowledgeNoWithdrawalbooleanrequiredMust be true, or the request is rejected with 400. A queued position cannot be withdrawn or cancelled; its principal and permit return only when a block spends the box.
maxPermitEachLitstringPermit cap. If any single permit would exceed this, nothing is sent. Omit for no cap. Decimal string.
expectedEmissionBoxIdstringEmission box the quote was made against
priorityFeeEachNanoErgsstringThe fee, as the quote was taken at. Omitted or '0' posts at the floor; anything else is at least minPriorityFeeNanoErgs. Not capped at the quote's break-even — a higher fee is accepted and can still be repaid by the mined block's transaction fees. Decimal string.
default"0"decimal string
Responses
200The join transactions, one per positionCollateralJoinResult▶
▶
joinsCollateralJoinEntry[]requiredoutcomestringrequiredNode submission outcome for the known transaction ID.
one ofacceptedrejecteduncertaintxIdstringrequiredpositioninteger · int64requiredQueue position taken
lenderAddressstringrequiredThe key holding this position. It receives the block reward when the position is mined against, and the permit back when the box is spent.
principalNanoErgsstringrequiredWhat this position locked up, the whole priority fee included. Decimal string.
priorityFeeNanoErgsstringThe fee this position posted. '0' when it posted at the floor. Decimal string.
permitLitstringrequiredDecimal string.
totalNanoErgsstringrequiredEverything sent, principals plus fees. Decimal string.
stoppedReasonstringPresent when fewer positions were created than requested, giving the error that stopped the run. The entries in
joinswere still created and their principal is committed.
400Malformed body, a count outside 1..25, a permit cap below the current requirement, or `acknowledgeNoWithdrawal` not set. ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
409`autoCollateralize` is on, so manual joins are refused — the client's own pass owns joining. Also returned when the emission box moved between quote and send, in which case re-quote and resend. ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
422The wallet cannot cover it, a permit exceeds `maxPermitEachLit`, fewer free lender keys remain than positions requested, or the run created no position at all. ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503Node or wallet unavailable. Retry.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