Monaco Protocol SDK v0.7.8
Withdrawal Flow
The withdrawal flow has been updated to use a pre-signed calldata path through the backend.sdk.vault.withdraw() now posts to /api/v1/withdrawals to receive
gateway-signed calldata and a withdrawalIndex, then submits the transaction
on-chain via the wallet client.
Return type change
withdraw() now returns WithdrawResult instead of TransactionResult:
withdrawalIndex — you need it to retry a failed submission.
New method: retryWithdrawal
retryWithdrawal fetches the same gateway-signed calldata originally issued for
that index and resubmits it. Safe to call multiple times — the matching engine
is idempotent against duplicate submissions of a settled withdrawal.
Migration
hash or status from the return value, no code change is
required. The new withdrawalIndex field is additive.
Position Endpoints — position_id Body Rejection
The API gateway now rejects unknown fields in JSON request bodies. As a result,
position_id is no longer accepted in the body of:
POST /api/v1/positions/{id}/closePOST /api/v1/positions/{id}/add-marginPOST /api/v1/positions/{id}/reduce-margin
positionId argument
and never included it in the body.
If you call these endpoints directly over HTTP, remove position_id from the
request body:

