You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to ... build deal tickets for FCAP markets We will build an API to... that returns margin estimates So that ... so the front end can return correct information
Currently the FCAP market does not return the correct margin requirements or liquidation prices for fully collateralised FCAP markets.
The API should be updated to implement the following formulas when requesting estimates for a fully collateralised FCAP market:
Position margin
Note, as margin requirements are independent of the order book for a fully collateralised market, there is no need to distinguish between the best and worst case as any slippage is not considered in the calc.
API Overview
In order to ... build deal tickets for FCAP markets
We will build an API to... that returns margin estimates
So that ... so the front end can return correct information
Currently the FCAP market does not return the correct margin requirements or liquidation prices for fully collateralised FCAP markets.
The API should be updated to implement the following formulas when requesting estimates for a fully collateralised FCAP market:
Position margin
Note, as margin requirements are independent of the order book for a fully collateralised market, there is no need to distinguish between the best and worst case as any slippage is not considered in the calc.
Order margin
Note, for market orders use$price=markPrice$ and for limit orders use $price=limitPrice$ .
Liquidation price
Note, will unlikely be unused in deal ticket but must be updated for completeness.
Specs
https://github.com/vegaprotocol/specs/blob/colosseo_II/protocol/0019-MCAL-margin_calculator.md#fully-collateralised
Tests
API will be validated with market-sim tests in a similar fashion to the liquidation price tests.
The text was updated successfully, but these errors were encountered: