Originally posted by SimonN
View Post
Fairly easy - square brackets in JSON denote an array, so all you need to do it add more comma-separated items, like this:
someCodes: ["Code1","Code2","Code3","Etc"]
Some of the values you can use for marketTypeCodes can be obtained via the listMarketTypes (no parameters required). However, if I recall correctly, they only appear if there are only actual current markets of a particular type.
For the over/under markets, the codes don't have a decimal point in the marketTypeCode. For example, over/under 5.5 goals has marketTypeCode = OVER_UNDER_55. You can get the yes/no or over/under names from the marketCatalogue - they are the "runner" names and will be called "Over 5.5 goals" or "Under 5.5 goals". If you do a listMarketCatalogue call with "BOTH_SIDES_TO_SCORE", the runner names will be available (not sure what they are, or I'd tell you!).
Something like this will do the job for you for specifying multiple marketTypeCodes (this has doubled-up quotes for VB):
"""filter"":{""eventIds"": [" & matchId & "],""marketTypeCodes"": [""MATCH_ODDS"",""CORRECT_SCORE"",""OVER_UNDER_25"" ,""OVER_UNDER_35""]},""maxResults"": ""10"",""marketProjection"":[""RUNNER_DESCRIPTION"",""MARKET_START_TIME""]")
Here is the output for a listMarketTypes call run at about 02:16 23/07/2016:
{"jsonrpc":"2.0",
"result":[
{"marketType":"NONSPORT","marketCount":36},{"marke tType":"ASIAN_HANDICAP","marketCount":603},{"marke tType":"BOTH_TEAMS_TO_SCORE","marketCount":649},{" marketType":"OVER_UNDER_65","marketCount":603},{"m arketType":"OVER_UNDER_55","marketCount":603},{"ma rketType":"FIRST_HALF_GOALS_15","marketCount":601} ,{"marketType":"DRAW_NO_BET","marketCount":615},{" marketType":"OVER_UNDER_05","marketCount":646},{"m arketType":"OVER_UNDER_75","marketCount":602},{"ma rketType":"OVER_UNDER_85","marketCount":603},{"mar ketType":"CORRECT_SCORE2","marketCount":13},{"mark etType":"TEAM_B_1","marketCount":603},{"marketType ":"FIRST_HALF_GOALS_05","marketCount":599},{"marke tType":"DOUBLE_CHANCE","marketCount":602},{"market Type":"ODD_OR_EVEN","marketCount":60},{"marketType ":"TEAM_A_1","marketCount":602},{"marketType":"MAT CH_ODDS","marketCount":1151},{"marketType":"OVER_U NDER_25","marketCount":704},{"marketType":"OVER_UN DER_15","marketCount":647},{"marketType":"OVER_UND ER_45","marketCount":650},{"marketType":"OVER_UNDE R_35","marketCount":648},{"marketType":"TOTAL_GOAL S","marketCount":108},{"marketType":"CORRECT_SCORE ","marketCount":652},{"marketType":"HALF_TIME_SCOR E","marketCount":601},{"marketType":"HALF_TIME","m arketCount":605},{"marketType":"NEXT_GOAL","market Count":603},{"marketType":"HALF_TIME_FULL_TIME","m arketCount":605},{"marketType":"STEWARDS","marketC ount":1},{"marketType":"UNUSED","marketCount":19}, {"marketType":"WINNER","marketCount":277},{"market Type":"SPECIALS_NEXT_MGR","marketCount":4},{"marke tType":"UNDIFFERENTIATED","marketCount":39},{"mark etType":"SEASON_SPECIALS","marketCount":17},{"mark etType":"GRAND_SLAM_SPECIALS","marketCount":1},{"m arketType":"TOURNAMENT_WINNER","marketCount":44},{ "marketType":"OUTRIGHT_WINNER","marketCount":55},{ "marketType":"TOP_N_FINISH","marketCount":141},{"m arketType":"SPECIAL","marketCount":34},{"marketTyp e":"OTHER_SPECIALS","marketCount":3},{"marketType" :"HEAD_TO_HEAD","marketCount":22},{"marketType":"W INNER_WITHOUT","marketCount":1},{"marketType":"SER IES_WINNER","marketCount":8},{"marketType":"TOP_WI CKETS_TAKER","marketCount":4},{"marketType":"TOP_B ATSMAN","marketCount":11},{"marketType":"TOURN_MAT CHBET_NOTIE","marketCount":9},{"marketType":"EACH_ WAY","marketCount":50},{"marketType":"WINNING_MARG IN","marketCount":9},{"marketType":"INNINGS_RUNS", "marketCount":11},{"marketType":"5_WICKETS_INNINGS ","marketCount":2},{"marketType":"OPENING_PARTNERS HIP","marketCount":4},{"marketType":"TO_SCORE_100" ,"marketCount":3},{"marketType":"CENTURY_SCORED"," marketCount":4},{"marketType":"TIED_MATCH","market Count":22},{"marketType":"TEST_MATCH_END","marketC ount":4},{"marketType":"TO_SCORE_50","marketCount" :3},{"marketType":"1ST_INNINGS_LEAD","marketCount" :4},{"marketType":"FIRST_HALF_GOALS_25","marketCou nt":600},{"marketType":"GAME_BY_GAME_03_01","marke tCount":43},{"marketType":"GAME_BY_GAME_02_13","ma rketCount":43},{"marketType":"GAME_BY_GAME_02_10", "marketCount":43},{"marketType":"GAME_BY_GAME_02_0 9","marketCount":43},{"marketType":"GAME_BY_GAME_0 2_12","marketCount":43},{"marketType":"GAME_BY_GAM E_02_11","marketCount":43},{"marketType":"SET_WINN ER","marketCount":281},{"marketType":"NUMBER_OF_SE TS","marketCount":43},{"marketType":"TIE_BREAK","m arketCount":43},{"marketType":"6-0_SET","marketCount":43},{"marketType":"PLAYER_A_W IN_A_SET","marketCount":42},{"marketType":"PLAYER_ B_WIN_A_SET","marketCount":43},{"marketType":"GAME _BY_GAME_02_04","marketCount":43},{"marketType":"G AME_BY_GAME_02_03","marketCount":42},{"marketType" :"SET_CORRECT_SCORE","marketCount":42},{"marketTyp e":"GAME_BY_GAME_02_02","marketCount":42},{"market Type":"SET_BETTING","marketCount":141},{"marketTyp e":"GAME_BY_GAME_02_01","marketCount":42},{"market Type":"GAME_BY_GAME_01_13","marketCount":42},{"mar ketType":"GAME_BY_GAME_02_08","marketCount":43},{" marketType":"GAME_BY_GAME_02_07","marketCount":43} ,{"marketType":"GAME_BY_GAME_02_06","marketCount": 43},{"marketType":"GAME_BY_GAME_02_05","marketCoun t":43},{"marketType":"GAME_BY_GAME_01_08","marketC ount":42},{"marketType":"GAME_BY_GAME_01_07","mark etCount":42},{"marketType":"GAME_BY_GAME_01_06","m arketCount":42},{"marketType":"GAME_BY_GAME_01_12" ,"marketCount":42},{"marketType":"TOTAL_GAMES","ma rketCount":3},{"marketType":"GAME_BY_GAME_01_11"," marketCount":42},{"marketType":"GAME_BY_GAME_01_10 ","marketCount":42},{"marketType":"GAME_BY_GAME_01 _09","marketCount":42},{"marketType":"HANDICAP","m arketCount":20},{"marketType":"GAME_BY_GAME_03_10" ,"marketCount":43},{"marketType":"GAME_BY_GAME_03_ 09","marketCount":43},{"marketType":"GAME_BY_GAME_ 03_08","marketCount":43},{"marketType":"GAME_BY_GA ME_03_07","marketCount":43},{"marketType":"GAME_BY _GAME_03_06","marketCount":43},{"marketType":"GAME _BY_GAME_03_05","marketCount":43},{"marketType":"G AME_BY_GAME_03_04","marketCount":43},{"marketType" :"GAME_BY_GAME_03_03","marketCount":43},{"marketTy pe":"GAME_BY_GAME_03_02","marketCount":43},{"marke tType":"GAME_BY_GAME_03_13","marketCount":43},{"ma rketType":"GAME_BY_GAME_03_12","marketCount":43},{ "marketType":"GAME_BY_GAME_03_11","marketCount":43 },{"marketType":"SESSION_RUNS","marketCount":3},{" marketType":"1ST_DISMISSAL_METHOD","marketCount":5 },{"marketType":"FORECAST","marketCount":99},{"mar ketType":"TOTAL_RUNS_LISTED","marketCount":15},{"m arketType":"RUN_LINE_LISTED","marketCount":60},{"m arketType":"TOTAL_POINTS","marketCount":9},{"marke tType":"CLEAN_SHEET","marketCount":117},{"marketTy pe":"WIN_BOTH_HALVES","marketCount":118},{"marketT ype":"TEAM_A_WIN_TO_NIL","marketCount":103},{"mark etType":"OTHER_PLACE","marketCount":308},{"marketT ype":"WIN","marketCount":377},{"marketType":"OVER_ UNDER","marketCount":6},{"marketType":"GAME_BY_GAM E_01_01","marketCount":41},{"marketType":"GAME_BY_ GAME_01_03","marketCount":41},{"marketType":"GAME_ BY_GAME_01_02","marketCount":41},{"marketType":"GA ME_BY_GAME_01_04","marketCount":41},{"marketType": "GAME_BY_GAME_01_05","marketCount":41},{"marketTyp e":"FIRST_GOAL_ODDS","marketCount":102},{"marketTy pe":"TEAM_B_WIN_TO_NIL","marketCount":102},{"marke tType":"HALF_MATCH_ODDS","marketCount":2},{"market Type":"MATCH_ODDS_UNMANAGED","marketCount":14},{"m arketType":"PLACE","marketCount":171},{"marketType ":"TRAP_CHALLENGE","marketCount":4},{"marketType": "TO_QUALIFY","marketCount":14},{"marketType":"TWO_ BALLS","marketCount":20},{"marketType":"PRACTICE_S ESSIONS","marketCount":1},{"marketType":"QUALIFYIN G_WINNER","marketCount":2},{"marketType":"QUALI_WI NNER_DOUBLE","marketCount":1},{"marketType":"QUALI FYING_ROUND_3","marketCount":1},{"marketType":"TO_ BE_CLASSIFIED","marketCount":1},{"marketType":"SAF ETY_CAR","marketCount":1},{"marketType":"TOTAL_CLA SS_DRIVERS","marketCount":3},{"marketType":"FASTES T_LAP","marketCount":1},{"marketType":"WINNING_CAR ","marketCount":1},{"marketType":"POINTS_FINISH"," marketCount":1},{"marketType":"TOTAL_MATCH_POINTS" ,"marketCount":1},{"marketType":"TEAM_A_2","market Count":8},{"marketType":"PENALTY_TAKEN","marketCou nt":12},{"marketType":"ANYTIME_SCORE","marketCount ":8},{"marketType":"TEAM_A_3","marketCount":8},{"m arketType":"TEAM_B_2","marketCount":8},{"marketTyp e":"TEAM_B_3","marketCount":8},{"marketType":"MATC H_ODDS_AND_OU_25","marketCount":7},{"marketType":" OVER_UNDER_105_CORNR","marketCount":7},{"marketTyp e":"CORNER_ODDS","marketCount":7},{"marketType":"T O_SCORE","marketCount":6},{"marketType":"SENDING_O FF","marketCount":7},{"marketType":"BOOKING_ODDS", "marketCount":7},{"marketType":"FIRST_GOAL_SCORER" ,"marketCount":6},{"marketType":"ANTEPOST_WIN","ma rketCount":50},{"marketType":"RACE_WIN_DIST","mark etCount":3},{"marketType":"HIGHEST_OVER_TOTAL","ma rketCount":6},{"marketType":"FIRST_OVER_RUNS","mar ketCount":4},{"marketType":"COMPLETED_MATCH","mark etCount":18},{"marketType":"TOTAL_SIXES","marketCo unt":6},{"marketType":"MATCH_ODDS_LO_TIE","marketC ount":18},{"marketType":"OVER_UNDER_85_CORNR","mar ketCount":3},{"marketType":"SHOWN_A_CARD","marketC ount":2},{"marketType":"TO_SCORE_2_OR_MORE","marke tCount":2},{"marketType":"TEAM_TOTAL_GOALS","marke tCount":6},{"marketType":"HAT_TRICKED_SCORED","mar ketCount":3},{"marketType":"MATCH_ODDS_AND_BTTS"," marketCount":3},{"marketType":"TO_SCORE_HATTRICK", "marketCount":2},{"marketType":"TO_SCORE_BOTH_HALV ES","marketCount":6},{"marketType":"OVER_UNDER_135 _CORNR","marketCount":3},{"marketType":"WINCAST"," marketCount":2},{"marketType":"OVER_UNDER_45_CARDS ","marketCount":3},{"marketType":"CORNER_MATCH_BET ","marketCount":3},{"marketType":"HALF_WITH_MOST_G OALS","marketCount":3},{"marketType":"SCORE_CAST", "marketCount":2},{"marketType":"PLAYER_180S","mark etCount":4},{"marketType":"MOST_180S","marketCount ":2},{"marketType":"TOTAL_180S","marketCount":2},{ "marketType":"RACE_TO_3_LEGS","marketCount":2},{"m arketType":"HIGHEST_CO_PLAYER","marketCount":2},{" marketType":"TOTAL_LEGS","marketCount":2},{"market Type":"HIGHEST_CO_SCORE","marketCount":2},{"market Type":"METHOD_OF_VICTORY","marketCount":26},{"mark etType":"ROUND_BETTING","marketCount":8},{"marketT ype":"GO_THE_DISTANCE","marketCount":8},{"marketTy pe":"SUPER_OVER","marketCount":1},{"marketType":"T OP_GOALSCORER","marketCount":3},{"marketType":"MAT CH_BET","marketCount":21},{"marketType":"ROCK_BOTT OM","marketCount":1},{"marketType":"MAKE_THE_CUT", "marketCount":2}
],
"id":1}


Comment