useOrderEntry
hook provides a variety of supporting functions according to input parameters and the prevailing market data.
useOrderEntry
provides some real-time data that the UI will use when creating orders based on the latest market data.
maxQty
: The maximum quantity that the user can trade based on the free collateral.freeCollateral
: The amount collateral available for trading, factoring in open positions and pending orders.markPrice
: The mark price of the symbol.estLiqPrice
: The estimated liquidation price, if a position is created from given order paramters.estLeverage
: The estimated leverage, if a position is created from given order paramters.setValue
and setValues
.
useOrderEntry
is built on the concepts of react-hook-form
.
If you have been using it in conjunction with react-hook-form
with the SDK v1, then you might want to entirely remove it now.
metaState.errors
field.
submit
function.