Monaco Protocol SDK v1.0.77
This release makes an edit to a margin reduce-only order readquantity as the order’s new total, like every other order. The all-markets market_stats rows carry perp index, funding and open-interest notional values, the instruments snapshot includes inactive markets, and TWAP taker slices now send the same WebSocket frames as any other taker fill. Action items: send the order’s total, not total - filled, when editing a reduce-only order; filter instruments rows on isActive when you need the tradable set.
Breaking
Reduce-only edits take the order’s total
sdk.trading.replaceOrder (PUT /api/v1/orders/{orderId}; gRPC OrdersService.ReplaceOrder) and each item of sdk.trading.batchReplace (POST /api/v1/orders/batch-replace; gRPC OrdersService.BatchReplaceOrders) now read a margin reduce-only order’s quantity as its new total. The replacement rests total - filled: a close of 0.8 with 0.3 filled, edited to quantity: "0.5", rests 0.2 and reads 0.3/0.5. Before, it rested 0.5 and read 0.3/0.8.
- A total at or below the filled amount is refused with
New quantity N must be greater than filled quantity F, where it used to be accepted as a smaller close. - What the replacement rests is still bounded by the live position, so a total whose remainder exceeds the position is refused.
- An exact full close of the remaining position is still admitted below the minimum order size.
- With
quantityomitted, the order keeps its total and rests the live remainder, as before.updatedFields.quantity(gRPCupdated_quantity) now reports that total, not the remaining close size.
total - filled as a workaround must now send the total. See Replace Orders.
Added
Index, funding and open-interest notional on marketStatsAll rows
Each perp row of sdk.ws.marketStatsAll (the all-markets market_stats frame and its subscribe-time snapshot) carries indexPrice, fundingRate, premium and openInterestNotional. fundingRate is the estimated next-window rate; currentFundingRate stays the last settled one. openInterestNotional is open interest priced at the mark, falling back to the last trade price, in quote units. It is omitted (never "0") until both open interest and a price are known, while REST getPerpMarketSummary reports "0" in that case. All four are omitted on spot rows and on rows from an older server. See WebSockets.
Changed
The instruments snapshot includes inactive markets
sdk.ws.instruments baselines, both the server snapshot and the replay a late subscriber gets, now include inactive (delisted) markets flagged isActive: false, so positions, orders and history on a delisted market can still resolve its metadata. useInstruments keeps those rows too. Filter on isActive to build the tradable set. See useInstruments.
Fixed
- TWAP taker slices send every taker frame — a slice that takes now sends the public trade (
sdk.ws.trades), order book and live candle updates, both sides’balancesupdates, andpositionsupdates for both sides, including the terminalCLOSEDupdate when it closes a position. Before, it sent only its ownordersframes. A passive TWAP child that rests or leaves the book now updates the order book, and a spot child that leaves it sends its owner themovementsframe for the released lock, as a manual cancel does.
Upgrade
instruments rows on isActive for the tradable set.
