Where does LTP within Stream API come from?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andytrif
    Junior Member
    • Dec 2019
    • 8

    #1

    Where does LTP within Stream API come from?

    Hi

    I've been looking at LTP (last traded price) within the Stream API over the last couple of months, but I'm confused as to where the figure comes from.

    Its name would obviously suggest that it is the last price at which a bet was traded within that market, and on that particular runner. However, other data on a lot of runners breaks that assumption.

    For example...

    marketId: 1.171116347
    selectionId: 30013813
    ltp (5 mins before start): 42
    ltp (at start): 18.5
    totalMatched (runner, at start): 0 GBP

    There are hundreds of examples of a positive LTP, yet 0 GBP totalMatched (runner) at the off. How can there be a "last traded price", if no bets have been matched?

    In other cases, there are runners who's batl (best available to lay) is significantly lower than the LTP. Are people trading at higher prices than the ask? For example...

    marketId: 1.171111527
    selectionId: 17117835
    ltp (5 mins before start): 25
    batl (5 mins before start): 12.5
    ltp (at start): 30
    batl (at start): 13.5

    For reference, both of the above examples (and pretty much all of the cases I've found) are PLACE marketType, in case that is significant.

    Is anybody able to advise what LTP actually represents, please?

    Thanks!
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    Are you using a delayed key?

    Comment

    • Andytrif
      Junior Member
      • Dec 2019
      • 8

      #3
      Hi Liam

      Nope - live key

      Comment

      • Andytrif
        Junior Member
        • Dec 2019
        • 8

        #4
        In case anybody comes across a similar issue to this and wonders what happened, I'll detail the problem... it was my own stupid fault.

        LTP does appear to be correct and what you would assume it to be, but when streaming markets, I had added all markets within a defined period, then set:

        "marketTypes":["WIN","PLACE","OTHER_PLACE","WITHOUT_FAV"]'

        I was then pushing runner price changes to an array with the selectionId as key. As the selectionId is the same for each market, without realising, I was getting WIN prices added to the PLACE and OTHER_PLACE prices.

        Prior to using the stream API, locally I always use a unique ID for every runner. Very early on when starting on my stream routine, it hadn't clicked that by switching to using the stream's selectionId, it wasn't unique amongst the markets.

        I was only ever looking at data I'd recorded for place markets, so didn't notice my WIN and PLACE data was identical, and those markets I was interested in had very low volumes of LTP changes, so it looked like the data contained outliers, which I was incorrectly guessing may be down to some form of cross-matching, and so it wasn't obvious that multiple markets had been mixed together.

        A bit of rubber ducking probably would have solved this before now, but I was looking to blame the data, rather than my own stupidity. Painfully obvious now. Doh!

        Comment

        Working...
        X