Hi guys,
I'm trying to run the sample jsonrpc.php but it returns allways null. Can you please me advice on what i'm doing wrong?? (I'm a newbie in php). I did the same in .net and it's working fine!!!
1. Get all Event Types....
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "pa
rams" :{"filter":{}}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
30
2. Extract Event Type Id for Horse Racing....
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 34
3. EventTypeId for Horse Racing is:
4. Get next horse racing market in the UK....
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue"
, "params" :{"filter":{"eventTypeIds":[""],
"marketCountries":["GB"],
"marketTypeCodes":["WIN"],
"marketStartTime":{"from":"2015-02-04T11:41:18+01:00"}},
"sort":"FIRST_TO_START",
"maxResults":"1",
"marketProjection":["RUNNER_DESCRIPTION"]}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
50
5. Print static marketId, name and runners....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
54
MarketId:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
55
MarketName:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
56
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 56
6. Get volatile info for Market including best 3 exchange prices available...
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
20
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "pa
rams" :{"marketIds":[""], "priceProjection":{"priceData":["EX_BEST_OFFERS"]}}, "
id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
64
7. Print volatile price data along with static runner info....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
80
MarketId:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
81
MarketName:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
82
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 82
8. Place a bet below minimum stake to prevent the bet actually being placed....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders", "param
s" :{"marketId":"",
"instructions":
[{"selectionId":"",
"handicap":"0",
"side":"BACK",
"orderType":
"LIMIT",
"limitOrder":{"size":"1",
"price":"1000",
"persistenceType":"LAPSE"}
}], "customerRef":"fsdf"}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
102
9. Print result of bet....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
106
Status:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
107
Warning!!! Bet placement succeeded !!!
I'm trying to run the sample jsonrpc.php but it returns allways null. Can you please me advice on what i'm doing wrong?? (I'm a newbie in php). I did the same in .net and it's working fine!!!
1. Get all Event Types....
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEventTypes", "pa
rams" :{"filter":{}}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
30
2. Extract Event Type Id for Horse Racing....
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 34
3. EventTypeId for Horse Racing is:
4. Get next horse racing market in the UK....
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue"
, "params" :{"filter":{"eventTypeIds":[""],
"marketCountries":["GB"],
"marketTypeCodes":["WIN"],
"marketStartTime":{"from":"2015-02-04T11:41:18+01:00"}},
"sort":"FIRST_TO_START",
"maxResults":"1",
"marketProjection":["RUNNER_DESCRIPTION"]}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
50
5. Print static marketId, name and runners....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
54
MarketId:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
55
MarketName:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
56
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 56
6. Get volatile info for Market including best 3 exchange prices available...
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
20
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "pa
rams" :{"marketIds":[""], "priceProjection":{"priceData":["EX_BEST_OFFERS"]}}, "
id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
64
7. Print volatile price data along with static runner info....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
80
MarketId:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
81
MarketName:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
82
Warning: Invalid argument supplied for foreach() in C:\xampp\php\jsonrpc.php on
line 82
8. Place a bet below minimum stake to prevent the bet actually being placed....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
24
Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders", "param
s" :{"marketId":"",
"instructions":
[{"selectionId":"",
"handicap":"0",
"side":"BACK",
"orderType":
"LIMIT",
"limitOrder":{"size":"1",
"price":"1000",
"persistenceType":"LAPSE"}
}], "customerRef":"fsdf"}, "id": 1}]
Response: null
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
102
9. Print result of bet....
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
106
Status:
Notice: Trying to get property of non-object in C:\xampp\php\jsonrpc.php on line
107
Warning!!! Bet placement succeeded !!!

