Skip to Content

calcMinOdds

Calculates the minimum odds value at which the bet can be placed. If the current odds value is lower than the specified value, the bet cannot be placed and will be rejected by the contract.

⚠️

Function renamed in v6.0.0: This function was renamed from calcMindOdds to calcMinOdds (typo fix). The old name was a typo and has been corrected. Please update your imports if migrating from v5.x.

Usage

import { calcMinOdds } from '@azuro-org/toolkit' const minOdds = calcMinOdds({ odds: 1.17, slippage: 5, // 5% })

Props

type CalcMinOddsParams = { odds: number | number[] slippage: number }

Return Value

string (.toFixed(ODDS_DECIMALS) called on the number)

Last updated on