Monaco Protocol SDK v1.0.87
Order-create idempotency keys now replay for 15 minutes after acceptance instead of 24 hours. The deprecated PitPass aliases are gone:sdk.pitpass, PitpassAPIImpl, the React usePitpass module and the /api/v1/pitpass/... paths. A wallet keeps its first referrer, and sign-in reports why a presented TraderCode did not apply. Frontends can set a maker add-on beside the builder fee, and account movements now list deposits and withdrawals that go straight into or out of the parent margin account. Action items: never retry an unresolved order submission past 15 minutes; replace any sdk.pitpass, usePitpass or /api/v1/pitpass/... use with sdk.tradercodes, useTraderCodes and /api/v1/tradercodes/....
Breaking
Idempotency keys replay for 15 minutes
idempotencyKey on placeLimitOrder / placeMarketOrder (POST /api/v1/orders; gRPC OrdersService.CreateOrder) and each item’s idempotencyKey on batchCreate (POST /api/v1/orders/batch-create; gRPC OrdersService.BatchCreateOrders) now replays for 15 minutes after the original acceptance, down from 24 hours. Request and response fields are unchanged.
- Retrying the same key and normalized payload within 15 minutes still returns the original committed result without executing again. Retries do not extend the window.
- After 15 minutes the same key is a new submission and can place a new order. Never retry an unresolved submission past that window; reconcile on the order stream instead.
- Keys accepted before this release keep their original 24-hour expiry.
- The engine caps how many unexpired keys it retains. At that ceiling a new key is refused with the existing retryable
ORDER_SUBMISSION_CAPACITY_EXCEEDED(HTTP503/ gRPCUNAVAILABLE, or a per-item batch error), which accepts and reserves nothing. Retries of an already accepted key, and orders without a key, are unaffected.
PitPass aliases removed
The PitPass names deprecated in v1.0.82 are removed. Each had the same methods, messages and responses as its TraderCodes replacement:@0xmonaco/core: thesdk.pitpassproperty and thePitpassAPIImplclass. Usesdk.tradercodesandTraderCodesAPIImpl; since v1.0.82sdk.pitpasswas the same object, so renaming the property is the only change.@0xmonaco/types: thePitpassAPItype and thepitpassfield onMonacoSDK. UseTraderCodesAPIandtradercodes. The wire types drop the/api/v1/pitpass/...operations and theirpitpass_prefixed operation ids.@0xmonaco/react: theusePitpassmodule. Import the same hooks (useMyTraderCode,useSetTraderCode,useClearTraderCode,useTraderCodeAvailability,useTraderCodeInfo,useRewardsBalance,useTransferRewards,useMyReferralPosition,useMyReferralDownline,useMyReferralTree) fromuseTraderCodesor the package root.- REST:
/api/v1/pitpass/...returns404. Use/api/v1/tradercodes/.... - gRPC:
monaco.api.pitpass.TraderCodeServicereturnsUNIMPLEMENTED. Usemonaco.api.tradercodes.TraderCodeService. - Rust: the
pitpass_prefixed methods leavemonaco-sdk, and themonaco.api.pitpassmodule leavesmonaco-grpc-sdk.
Added
Why a referral did not apply
AuthState, returned by sdk.auth.authenticate and sdk.auth.verifySignature (POST /api/v1/auth/verify; gRPC AuthService.Verify), may carry referralNotAppliedReason when a TraderCode presented on a first sign-in did not record a referral:
REFERRAL_NOT_APPLIED_REASON_ALREADY_REFERRED: the wallet already has a different referrer from an earlier sign-up, on this or another applicationREFERRAL_NOT_APPLIED_REASON_UNKNOWN_CODE: the code matches no TraderCodeREFERRAL_NOT_APPLIED_REASON_SELF_REFERRAL: the code is the wallet’s own
ReferralNotAppliedReason type is widened to string for values added later.
A wallet now keeps its first referrer across applications. A first sign-in to another application with a different referrer’s code records no referral and returns referralApplied: false with ALREADY_REFERRED, where it previously recorded one. Sign-in succeeds either way, and a code from the same referrer is still recorded. See Auth and TraderCodes.
Builder maker add-on
setBuilderFee (PUT /api/v1/buildercodes/builder-fee; gRPC BuildercodeRewardsService.SetBuilderFee) takes optional makerBps beside bps: an add-on your frontend charges makers, from 0 up to builderFeeCapBps (at most 100). Omitting it leaves the maker add-on unchanged, and one call that sets both sides counts as one change against the two-per-24-hours limit. A new maker add-on applies to orders placed after the next BuilderCodes enrollment refresh, shortly after it is saved; resting orders keep the rate they were placed with.
SetBuilderFeeResponseaddsbuilderMakerFeeBpsandpreviousBuilderMakerFeeBps;getConfigaddsbuilderMakerFeeBps;BuilderFeeChangeaddsoldMakerBpsandnewMakerBps.- Payout kind
BUILDER_MAKER_FEEis accepted by thelistPayoutskindfilter and appears on payouts andbyTokenAndKind.getPayoutSummaryaddsbuilderFeeByToken(BUILDER_FEEplusBUILDER_MAKER_FEEper token). simulateFees(gRPCFeesService.SimulateFees) addsapplicationMakerFeeandapplicationMakerFeeBps, andmakerTotalReceiptnets the add-on.getApplicationStats(gRPCApplicationsService.GetAppStats) addsapplicationMakerFeeandbuilderFeeTotal;applicationTakerFeestays taker-only.- On a maker’s trade row and order event,
builderFeeis the maker add-on.
Fixed
Margin account deposits and withdrawals in movements
getPaginatedUserMovements (GET /api/v1/accounts/movements; gRPC AccountsService.GetMovements) listed only spot wallet movements, so a deposit routed into the parent margin account and a withdrawal paid out of it never appeared. They now appear as DEPOSIT / CREDIT and WITHDRAWAL / DEBIT rows with the token amount, referenceType margin_account_deposit or margin_account_withdrawal, and referenceId set to the margin account id. A margin deposit carries its txHash. balanceBefore and balanceAfter are 0 on these rows, because margin collateral is not a wallet balance. The DEPOSIT and WITHDRAWAL filters include them. Earlier margin movements are not backfilled. See Account Balances.
Upgrade
sdk.pitpass to sdk.tradercodes and any usePitpass import to useTraderCodes. Check that order-submission retries stop within 15 minutes of acceptance.
