getting markets with matched bets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lmlac
    Junior Member
    • Feb 2014
    • 27

    #1

    getting markets with matched bets

    I want a list of markets where I have bets matched. Like going into current bets on the website and clicking the "Matched" drop down list item.

    If I use listMarketCatalogue and specify orderStatus of EXECUTION_COMPLETE it doesn't return markets with partly matched bets. But if I use EXECUTABLE it returns all markets I have unmatched bets in(a lot) or just errors with too much data. Is there any way to get what I want without doing the filtering myself? It would be really useful if there was a third order status of ALL_MATCHED or something.
  • Lopiner
    Junior Member
    • Feb 2009
    • 117

    #2
    You can add both imlac like in this example:

    Code:
    {
        "jsonrpc": "2.0",
        "method": "SportsAPING/v1.0/listMarketCatalogue",
        "params": {
            "filter": {
                "marketStartTime": {
                    "from": "2014-10-30T14:15:43.6804426Z",
                    "to": "2015-10-30T14:15:44.1023398Z"
                },
                "withOrders": [
                    "EXECUTABLE",
                    "EXECUTION_COMPLETE"
                ]
            },
            "marketProjection": [
                "EVENT_TYPE",
                "MARKET_START_TIME"
            ],
            "sort": "FIRST_TO_START",
            "maxResults": "1000",
            "locale": "en"
        },
        "id": 1
    }
    fooledbyabet.com

    Comment

    • lmlac
      Junior Member
      • Feb 2014
      • 27

      #3
      But that will give me all markets that I have unmatched bets as well as those with matched? I just want markets with any matched bets. I'm not interested in whether they're partly or fully matched.

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        Do you need to use listMarketCatalogue?

        Why not use listCurrentOrders with an orderBy setting of BY_MATCH_TIME (as per the best practice statement in the documentation)?

        This will return a list of all matched bets, which you could then parse to get the marketIds.
        Last edited by betdynamics; 30-10-2014, 11:28 PM.

        Comment

        Working...
        X