v9 migration

For v9, external devs and partners need to adjust the updated getLiquidationPrice function from the Gains Network SDK by removing the tradeInfo param and adding the fee: Fee param.

export const getLiquidationPrice = (
  trade: Trade,
  fee: Fee,
  initialAccFees: BorrowingFee.InitialAccFees,
  context: GetBorrowingFeeContext
):
export type Fee = {
  openFeeP: number;
  closeFeeP: number;
  minPositionSizeUsd: number;
  triggerOrderFeeP: number;
};

Fetching openFeeP from method

Fetching closeFeeP from method

Fetching minPositionSizeUsd: number;

Fetching triggerOrderFeeP

Last updated