Exposure calculation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newbie99
    Junior Member
    • Dec 2018
    • 62

    #1

    Exposure calculation

    This is more theory / logic than about actual coding...

    If I call getAccountFunds then I get the data as I would expect, including the exposure field.

    As I understand it from the documentation available, the exposure is the worst case scenario (which makes sense).

    However, I want to break this down, so I can see exposure by market etc. and I assumed the correct way to do this would be to call the listMarketCatalogue and filter for all Market Id's, I'm active in.

    To do this, I call listMarketCatalogue with the following parameters:

    $paramaters ='{"filter":{"withOrders":["EXECUTION_COMPLETE","EXECUTABLE"]},"marketProjection":["EVENT"],"maxResults": "1000"}';

    This (I think) should return the small number of markets I'm involved with (so I believe the max results is irrelevant).

    The list of markets looks to be correct, I then sum the minimum winning amount per market (i.e. essentially my liability per market), which when totalled I would expect to be match the exposure number.

    However in reality its totally different!

    I suspect my logic is wrong, rather than a coding error (but of course happy to hear ideas), so does anyone have any suggestions?
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    Instead of summing you need to take the min per market.

    Comment

    • newbie99
      Junior Member
      • Dec 2018
      • 62

      #3
      Originally posted by LiamP View Post
      Instead of summing you need to take the min per market.
      Sorry, thats ambiguous on my part, I did mean min per market. However then by adding up all the minimums I expected to get to the exposure figure, however the numbers are way off, which is confusing me.

      Comment

      • tradernz
        Junior Member
        • Feb 2016
        • 19

        #4
        Hey there... what i normally do in these situations is run it just one a single market with a single placement into the market and then look at the data to see how it should be calculated... do you have a screenshot example

        Comment

        • jabe
          Senior Member
          • Dec 2014
          • 705

          #5
          Can't you retrieve listCurrentOrders for a market and work it out from averagePriceMatched x size? I assume no bets become settled (or cleared) until an event is over.

          Comment

          Working...
          X