docs icon indicating copy to clipboard operation
docs copied to clipboard

Both REST v4 and GraphQL APIs authenticate successfully (200 OK) but return empty arrays despite having betting history visible in the web interface.

Open apires89 opened this issue 6 months ago • 0 comments

Environment

 - **API Key**: Configured and valid
 - **Account**: Has betting history (verified via web interface)
 - **Test Date**: 2025-07-17 15:45:33

 ## REST API v4 Test
 ### Request
 ```
 URL: https://sports-api.cloudbet.com/pub/v4/bets/history
 Method: GET
 Headers:
   Content-Type: application/json
   Accept: application/json
   X-API-KEY: ...
   User-Agent: BearBet/1.0
 Parameters:
   limit: 10
   offset: 0
 ```

 ### Response
 ```
 Status: 200 OK
 Headers:
   x-ratelimit-limit: 2
   x-ratelimit-remaining: 1
   x-ratelimit-reset: 1752763534
 Body:
 {
   "bets": [],
   "totalBets": "0"
 }
 ```

 ✅ **Status**: Authentication successful, but empty results

 ## GraphQL API Test
 ### Request
 ```
 URL: https://sports-api-graphql.cloudbet.com/graphql
 Method: POST
 Headers:
   Content-Type: application/json
   Accept: application/json
   X-API-KEY: ...
   User-Agent: BearBet/1.0
 Body:
 {
   "query": "query Query($limit: Int) {\n    bets(limit: $limit) {\n        referenceId\n        eventName\n        stake\n        betStatus\n    }\n}",
   "variables": {
     "limit": 10
   }
 }
 ```

 ### Response
 ```
 Status: 200 OK
 Headers:
 Body:
 {
   "data": {
     "bets": []
   }
 }
 ```

 ✅ **Status**: Authentication successful, but empty results

 ## Expected Behavior
 The APIs should return betting history data for bets that are visible in the web interface.

 ## Questions
 1. Why do both APIs return empty arrays when there is betting history?
 2. Are there additional parameters or filters needed?
 3. Do the APIs only show bets placed via API, or all bets?
 4. Are there any account or API key permissions that need to be configured?

 ## Additional Information
 - Account has betting history visible in web interface
 - API key has "trading" access tier
 - Both authentication methods work (no 401 errors)
 - Rate limiting is being respected

apires89 avatar Jul 17 '25 14:07 apires89