Method Signature
Parameters
The market application ID on Algorand
The escrow app ID of the order to amend
New price in microunits (e.g.,
500_000 = $0.50)New quantity in microunits (e.g.,
1_000_000 = 1 share)New slippage in microunits (default:
0). Use 0 for limit orders.Return Type
Whether the amendment succeeded. Always
true if the method completes without throwing an error.Array of transaction IDs from the amendment
The confirmed round number on the blockchain
Example
Behavior Notes
- Unfilled Orders Only: You can only amend orders that have zero quantity filled. If the order has been partially matched, you must cancel it and create a new one.
- Automatic Collateral Adjustment:
- Increased collateral needed: The SDK sends the additional USDC or outcome tokens to the escrow.
- Decreased collateral needed: The escrow performs an inner transaction to refund the excess back to you (the SDK budgets extra transaction fees automatically).
- Transaction Fees:
- ~1,000 microAlgos if additional collateral is required
- ~2,000 microAlgos if a refund is issued (to cover the inner refund transaction)
- Preserves Escrow: The order keeps the same
escrowAppId— it’s not deleted and recreated. - Gas Efficiency: Amending is cheaper than cancelling + recreating (saves ~8,000 microAlgos in fees + the MBR).
- Error Handling: Throws an error if
quantity_filled > 0.
