Modules
Orderly network perp.orderUtils
Orderly SDKs / Modules / @orderly.network/perp / orderUtils
Namespace: orderUtils
@orderly.network/perp.orderUtils
Table of contents
Type Aliases
Functions
Type Aliases
EstimatedLeverageInputs
Ƭ EstimatedLeverageInputs: Object
Type declaration
Name | Type |
---|---|
newOrder | { price : number ; qty : number ; symbol : string } |
newOrder.price | number |
newOrder.qty | number |
newOrder.symbol | string |
positions | Pick <PositionExt , "position_qty" | "mark_price" | "symbol" >[] |
totalCollateral | number |
Defined in
EstimatedLiquidationPriceInputs
Ƭ EstimatedLiquidationPriceInputs: Object
Type declaration
Name | Type |
---|---|
IMR_Factor | number |
baseIMR | number |
baseMMR | number |
markPrice | number |
newOrder | { price : number ; qty : number ; symbol : string } |
newOrder.price | number |
newOrder.qty | number |
newOrder.symbol | string |
orderFee | number |
positions | Pick <PositionExt , "position_qty" | "mark_price" | "symbol" | "mmr" >[] |
totalCollateral | number |
Defined in
Functions
estLeverage
▸ estLeverage(inputs
): number
| null
Estimated leverage
Parameters
Name | Type | Description |
---|---|---|
inputs | EstimatedLeverageInputs | EstimtedLeverageInputs |
Returns
number
| null
number
Defined in
estLiqPrice
▸ estLiqPrice(inputs
): number
Estimated liquidation price
Parameters
Name | Type |
---|---|
inputs | EstimatedLiquidationPriceInputs |
Returns
number
Defined in
maxPrice
▸ maxPrice(markprice
, range
): number
Maximum price when placing an order
Parameters
Name | Type |
---|---|
markprice | number |
range | number |
Returns
number
Defined in
minPrice
▸ minPrice(markprice
, range
): number
Minimum price when placing an order
Parameters
Name | Type |
---|---|
markprice | number |
range | number |
Returns
number
Defined in
orderFee
▸ orderFee(inputs
): number
Calculate the order fee
Parameters
Name | Type | Description |
---|---|---|
inputs | Object | - |
inputs.futuresTakeFeeRate | number | - |
inputs.price | number | - |
inputs.qty | number | Order quantity |
Returns
number
Defined in
scropePrice
▸ scropePrice(price
, scrope
, side
): number
Scrope price when placing an order
Parameters
Name | Type |
---|---|
price | number |
scrope | number |
side | "BUY" | "SELL" |
Returns
number
number