DEV Community

Fancy Diamond
Fancy Diamond

Posted on Originally published at fancyodds.live

Fancy odds explained: line, rate, Yes and No

A fancy market does not quote decimal odds. It quotes a line (a number of runs, wickets or a total) and a rate for each side. This guide explains how to read them, how much a bet wins or loses, and how Khado ranges differ.

The line and the rate

Take the market 10 over run NZ. The board shows two boxes:

No Yes
Line 91 91
Rate 110 90

The line is the number in question: 91 runs after 10 overs. The rate is what a stake of 100 wins or risks.

Yes: the result reaches the line

A Yes bet of 100 at 91, rate 90, wins 90 if New Zealand have 91 or more runs after 10 overs, and loses the 100 stake if they have fewer.

No: the result stays below

A No bet of 100 at 91, rate 110, wins 100 if they finish below 91, and loses 110 if they reach it. That is why the No rate is above 100 while the Yes rate is below: the difference is the margin.

When Yes and No show different lines

Often the two sides quote different lines, for example No 90 and Yes 92, both at rate 100. A Yes bet then needs 92 or more, a No bet needs 89 or fewer, and a result of 90 or 91 means both lose. The gap works like a spread.

Khado: a range, not a line

Khado markets quote a start and a width. With a start of 45 and a width of 8, Yes wins on 45 to 52 runs, both included, and at rate 90 a stake of 100 wins 90. Khado is back (Yes) only. In the API these markets have format range.

How the API sends it

In a line market the back ladder is Yes and the lay ladder is No; price is the line and size is the rate. Always read format before using a price: the same two fields mean decimal odds in a match odds market and a rate in a bookmaker market.

{
  "name": "10 over run NZ", "type": "fancy", "format": "line", "status": "OPEN",
  "runners": [{
    "name": "10 over run NZ",
    "back": [{ "price": 91, "size": 90 }],   // Yes: line 91, rate 90
    "lay":  [{ "price": 91, "size": 110 }]   // No:  line 91, rate 110
  }]
}
Enter fullscreen mode Exit fullscreen mode

Profit and loss in code

// stake in your currency; returns the player's profit (negative = loss)
function fancyPnl({ side, line, rate, stake }, result) {
  const wins = side === 'yes' ? result >= line : result < line
  if (side === 'yes') return wins ? stake * rate / 100 : -stake
  return wins ? stake : -stake * rate / 100
}

fancyPnl({ side: 'yes', line: 91, rate: 90, stake: 100 }, 94)  //  90
fancyPnl({ side: 'no',  line: 91, rate: 110, stake: 100 }, 94) // -110
fancyPnl({ side: 'no',  line: 91, rate: 110, stake: 100 }, 88) //  100
Enter fullscreen mode Exit fullscreen mode

Liability before the result

For your risk checks, a bet's worst case is fixed when it is placed: a Yes bet risks its stake, a No bet risks stake × rate / 100. Add these per market to cap what one session can cost you.

FAQ

Is fancy the same as session?

Session markets are the most common fancy markets: runs after a set number of overs. Fancy also covers lambi, wickets, player runs, boundaries, Khado, Meter and Odd/Even.

Why does the market close on every ball?

Prices are only fair while the ball is dead. The market shows BALL_RUNNING while the ball is in play and opens again when new prices arrive.

What does rate 100 mean?

Even money: a stake of 100 wins 100 or loses 100.


First published at fancyodds.live/guides/fancy-odds-explained. Full API reference: docs.fancyodds.live. Runnable examples in Node, Python, PHP and curl: github.com/fancy-diamond/fancyodds-api-examples.

Top comments (0)