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

NameType
newOrder{ price: number ; qty: number ; symbol: string }
newOrder.pricenumber
newOrder.qtynumber
newOrder.symbolstring
positionsPick<PositionExt, "position_qty" | "mark_price" | "symbol">[]
totalCollateralnumber

Defined in

order.ts:157


EstimatedLiquidationPriceInputs

Ƭ EstimatedLiquidationPriceInputs: Object

Type declaration

NameType
IMR_Factornumber
baseIMRnumber
baseMMRnumber
markPricenumber
newOrder{ price: number ; qty: number ; symbol: string }
newOrder.pricenumber
newOrder.qtynumber
newOrder.symbolstring
orderFeenumber
positionsPick<PositionExt, "position_qty" | "mark_price" | "symbol" | "mmr">[]
totalCollateralnumber

Defined in

order.ts:51

Functions

estLeverage

estLeverage(inputs): number | null

Estimated leverage

Parameters

NameTypeDescription
inputsEstimatedLeverageInputsEstimtedLeverageInputs

Returns

number | null

number

Defined in

order.ts:175


estLiqPrice

estLiqPrice(inputs): number

Estimated liquidation price

Parameters

NameType
inputsEstimatedLiquidationPriceInputs

Returns

number

Defined in

order.ts:74


maxPrice

maxPrice(markprice, range): number

Maximum price when placing an order

Parameters

NameType
markpricenumber
rangenumber

Returns

number

Defined in

order.ts:8


minPrice

minPrice(markprice, range): number

Minimum price when placing an order

Parameters

NameType
markpricenumber
rangenumber

Returns

number

Defined in

order.ts:15


orderFee

orderFee(inputs): number

Calculate the order fee

Parameters

NameTypeDescription
inputsObject-
inputs.futuresTakeFeeRatenumber-
inputs.pricenumber-
inputs.qtynumberOrder quantity

Returns

number

Defined in

order.ts:37


scropePrice

scropePrice(price, scrope, side): number

Scrope price when placing an order

Parameters

NameType
pricenumber
scropenumber
side"BUY" | "SELL"

Returns

number

number

Defined in

order.ts:23