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?
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?


Comment