Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
titlelistMarketBook Request to a Settled market
[{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.114363660"],"priceProjection":{"priceData":["EX_BEST_OFFERS"]}}, "id": 1}]  
Code Block
titlelistMarketBook Response
collapsetrue
[
    {
        "jsonrpc": "2.0",
        "result": [
            {
                "marketId": "1.114363660",
                "isMarketDataDelayed": false,
                "status": "CLOSED",
                "betDelay": 0,
                "bspReconciled": false,
                "complete": true,
                "inplay": false,
                "numberOfWinners": 1,
                "numberOfRunners": 14,
                "numberOfActiveRunners": 0,
                "totalMatched": 0,
                "totalAvailable": 0,
                "crossMatching": false,
                "runnersVoidable": false,
                "version": 767398001,
                "runners": [
                    {
                        "selectionId": 8611526,
                        "handicap": 0,
                        "status": "REMOVED",
                        "adjustmentFactor": 9.1,
                        "removalDate": "2014-06-13T08:44:17.000Z",
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 8611527,
                        "handicap": 0,
                        "status": "REMOVED",
                        "adjustmentFactor": 3.5,
                        "removalDate": "2014-06-13T08:44:29.000Z",
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7920154,
                        "handicap": 0,
                        "status": "WINNER",
                        "adjustmentFactor": 17.5,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 1231425,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 4.3,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7533866,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 11.4,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 8220841,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 5.4,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7533883,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 8.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 8476712,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 8.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7012263,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 5.4,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7374225,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 8.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 8611525,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 0.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7659121,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 26.8,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 6996332,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 0.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    },
                    {
                        "selectionId": 7137541,
                        "handicap": 0,
                        "status": "LOSER",
                        "adjustmentFactor": 1.7,
                        "ex": {
                            "availableToBack": [],
                            "availableToLay": [],
                            "tradedVolume": []
                        }
                    }
                ]
            }
        ],
        "id": 1
    }
]

Retrieving

details

Details of Bets on a Settled Market - including P&L & Commission paid.

You can retrieve details of a settled bet/market using the listClearedOrders request. The below request uses a specific settledDatRange to limit the returned records and groupBy MARKET rollup to group results at markeId level.

Code Block
titlelistClearedOrders Request for bets on SETTLED markets
[{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params": {"betStatus":"SETTLED","settledDateRange":{"from":"2018-04-30T23:00:00Z","to":"2018-05-31T23:00:00Z"},"groupBy":"MARKET"}, "id": 1}]
Code Block
titleResponse
collapsetrue
[{
	"jsonrpc": "2.0",
	"result": {
		"clearedOrders": [{
			"eventTypeId": "1",
			"eventId": "28746818",
			"marketId": "1.144281274",
			"placedDate": "2018-05-29T10:48:50.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"betOutcome": "LOST",
			"settledDate": "2018-05-29T19:12:41.000Z",
			"lastMatchedDate": "2018-05-29T15:25:26.000Z",
			"betCount": 8,
			"commission": 0.0,
			"priceReduced": false,
			"profit": -16.0
		}, {
			"eventTypeId": "2",
			"eventId": "28741289",
			"marketId": "1.144157120",
			"selectionId": 2830908,
			"handicap": 0.0,
			"betId": "126613673925",
			"placedDate": "2018-05-25T08:26:20.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"side": "BACK",
			"betOutcome": "WON",
			"priceRequested": 1.28,
			"settledDate": "2018-05-25T10:19:02.000Z",
			"lastMatchedDate": "2018-05-25T08:26:40.000Z",
			"betCount": 1,
			"commission": 0.03,
			"priceMatched": 1.28,
			"priceReduced": false,
			"sizeSettled": 2.0,
			"profit": 0.56
		}, {
			"eventTypeId": "7",
			"eventId": "28739568",
			"marketId": "1.144114832",
			"selectionId": 11295111,
			"handicap": 0.0,
			"placedDate": "2018-05-23T21:27:52.000Z",
			"orderType": "LIMIT",
			"betOutcome": "WON",
			"settledDate": "2018-05-24T13:06:01.000Z",
			"lastMatchedDate": "2018-05-24T13:04:24.000Z",
			"betCount": 2,
			"commission": 0.11,
			"priceReduced": true,
			"profit": 2.14,
			"customerStrategyRef": "HedgerPro_216"
		}, {
			"eventTypeId": "7",
			"eventId": "28739518",
			"marketId": "1.144114517",
			"selectionId": 8912176,
			"handicap": 0.0,
			"betId": "126486489864",
			"placedDate": "2018-05-23T15:31:57.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"side": "BACK",
			"betOutcome": "LOST",
			"priceRequested": 11.5,
			"settledDate": "2018-05-23T17:12:22.000Z",
			"lastMatchedDate": "2018-05-23T15:31:57.000Z",
			"betCount": 1,
			"commission": 0.0,
			"priceMatched": 11.5,
			"priceReduced": false,
			"sizeSettled": 2.65,
			"profit": -2.65
		}, {
			"eventTypeId": "1",
			"eventId": "28724382",
			"marketId": "1.143781550",
			"selectionId": 2081063,
			"handicap": 0.0,
			"placedDate": "2018-05-21T15:43:12.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"side": "BACK",
			"betOutcome": "LOST",
			"priceRequested": 4.4,
			"settledDate": "2018-05-21T20:53:27.000Z",
			"lastMatchedDate": "2018-05-21T15:43:12.000Z",
			"betCount": 3,
			"commission": 0.0,
			"priceMatched": 4.4,
			"priceReduced": false,
			"sizeSettled": 6.0,
			"profit": -6.0
		}, {
			"eventTypeId": "1",
			"eventId": "28717428",
			"marketId": "1.143588270",
			"selectionId": 18565,
			"handicap": 0.0,
			"betId": "125772703658",
			"placedDate": "2018-05-16T14:48:53.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"side": "BACK",
			"betOutcome": "WON",
			"priceRequested": 2.18,
			"settledDate": "2018-05-16T20:43:37.000Z",
			"lastMatchedDate": "2018-05-16T14:48:53.000Z",
			"betCount": 1,
			"commission": 0.12,
			"priceMatched": 2.18,
			"priceReduced": false,
			"sizeSettled": 2.0,
			"profit": 2.36
		}, {
			"eventTypeId": "1",
			"eventId": "28722989",
			"marketId": "1.143732676",
			"selectionId": 198689,
			"handicap": 0.0,
			"placedDate": "2018-05-14T13:22:56.000Z",
			"persistenceType": "LAPSE",
			"orderType": "LIMIT",
			"side": "BACK",
			"betOutcome": "WON",
			"priceRequested": 1.42,
			"settledDate": "2018-05-14T18:22:07.000Z",
			"lastMatchedDate": "2018-05-14T13:22:56.000Z",
			"betCount": 2,
			"commission": 0.13,
			"priceMatched": 1.42,
			"priceReduced": false,
			"sizeSettled": 6.0,
			"profit": 2.52
		}],
		"moreAvailable": false
	},
	"id": 1
}]