@alpha-arcade/sdk 0.2.9 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -156,6 +156,27 @@ const result = await client.cancelOrder({
156
156
  // result: { success, txIds }
157
157
  ```
158
158
 
159
+ #### `amendOrder(params)`
160
+
161
+ Edits an existing unfilled order in-place — cheaper and faster than cancel + recreate. The escrow contract adjusts collateral automatically: sends you a refund if the new value is lower, or requires extra funds (sent automatically) if higher.
162
+
163
+ Only works on orders with zero quantity filled.
164
+
165
+ ```typescript
166
+ // Get your open orders to find the escrowAppId
167
+ const orders = await client.getOpenOrders(123456789);
168
+ const order = orders[0];
169
+
170
+ // Amend the order to a new price and quantity
171
+ const result = await client.amendOrder({
172
+ marketAppId: 123456789,
173
+ escrowAppId: order.escrowAppId,
174
+ price: 600_000, // new price: $0.60
175
+ quantity: 3_000_000, // new quantity: 3 shares
176
+ });
177
+ // result: { success, txIds, confirmedRound }
178
+ ```
179
+
159
180
  #### `proposeMatch(params)`
160
181
 
161
182
  Manually matches an existing maker order against a taker.