Monaco Protocol SDK v0.8.5
App Statistics (Backend)
Backend users can now fetch aggregate volume and fee metrics for their application via a new endpoint available on both REST and gRPC. Auth requires a backend secret key (sk_...).
REST
Response (
GetAppStatsResponse):
All monetary values are normalized, human-readable strings in quote token units (e.g.
"12345.67").
TypeScript SDK
gRPC
RPC:ApplicationsService/GetAppStats
x-server-key: sk_... header.
Auto-Margin Funding & Risk Simulation
Two newsdk.marginAccounts methods let you fund and simulate orders against an auto-resolved margin bucket, using a (tradingPairId, strategyKey) pair instead of a raw marginAccountId. This complements the strategyKey introduced in v0.8.4 for delegated agents and strategy-segregated accounts.
transferCollateralToAutoMarginAccount
Transfers collateral into the margin bucket for a given tradingPairId + optional strategyKey. Monaco resolves the parent account and ensures the bucket exists automatically.
TransferCollateralToAutoMarginAccountRequest):
Response shape is the same as
transferCollateralToMarginAccount (movement_id, margin_account_id, new_equity, new_total_collateral_value, new_withdrawable_collateral).
simulateAutoMarginOrderRisk
Preflight a perp order against the auto-resolved margin account for a (tradingPairId, strategyKey) — no marginAccountId lookup required.
SimulateOrderRiskRequest):
Response shape is identical to
simulateOrderRisk.
listMarginAccounts — tradingPairId filter
listMarginAccounts now accepts an optional tradingPairId param to filter results to accounts scoped to a specific trading pair.
MarginAccountSummary also now includes trading_pair_id?: string and strategy_key?: string in its response shape.

