Additions and updates to the TS SDK
account_id
.null
error when setting limit price outside of price range when closing a position.
layout
parameter. Sample code:useOrderbookStream
hook to add padding
param to not return anything if the orderbook depth is not enough.
useOrderEntry
Hook Enhancements:OrderEntity
with mandatory fields: order_type
, side
, and symbol
.
estLiqPrice
(Estimated Liquidation Price), estLeverage
(Leverage change post-position opening), formattedOrder
(Formatted order data), and metaState
(Validation results and form status).
submit()
Function: A parameter-free function to create orders via API, aiming to replace onSubmit
in future releases.
useWithdraw
Hook Update:availableWithdraw
Field: Indicates the direct withdrawal amount available without needing to settle PnL, calculated based on the unsettledPnL and freeCollateral.useDeposit
Hook Improvements:depositFee
, setQuantity(quantity: number)
, and quantity
for enhanced deposit management.
deposit()
Function: No parameters required for operation.
STOP_MARKET
and STOP_LIMIT
updateAlgoOrder(orderId: string, order: OrderEntity)
and cancelAlgoOrder(orderId: string, symbol?: string)
.