Retrieve Total Bets/Wins of User

This function returns the total amount of bets or wins placed by a specific user during the selected time interval. It’s useful for calculating activity, loyalty tiers, or generating reports.


📜 Sample JSON Request (from your server to the RGS-CWS server)

//for bets
{ "command": "9", "login": "demoaccount", "sdate": "2000-01-23 10:01:00", "fdate": "2012-12-25 04:04:02", "apiusername": "your_api_username", "apipass": "your_api_password" }
//for wins
{ "command": "10", "login": "demoaccount", "sdate": "2000-01-23 10:01:00", "fdate": "2012-12-25 04:04:02", "apiusername": "your_api_username", "apipass": "your_api_password" }

📥 Input Parameters (from your server to the RGS-CWS server)

Parameter

Mandatory

Description

Type

*command

Must be "9" to trigger the bet total calculation
OR Must be "10" to trigger the win total calculation

string

*login

Username of the player (min. 6 characters). Optional if userid is used.

string

userid

RGS-CWS user ID. Optional alternative to login, but cannot be used together.You must provide either login or userid — not both.

string

*sdate

Start date for filtering bets. Use 0 to include all. Format: Y-m-d H:i:s

string

*fdate

End date for filtering bets. Use 0 to include all. Format: Y-m-d H:i:s

string

*apiusername

API username

string

*apipass

API password

string

You must provide either login or userid — not both.


📃 Sample JSON Response (returned by RGS-CWS)

✅ Success:

{ "message": "OK", "amount": 41241924.11 }

❌ Failure (e.g., invalid user):

{ "message": "ERROR", "amount": 0 }

📤 Output Parameters (returned by RGS-CWS)

Parameter

Required

Description

Type

message

"OK" if successful, "ERROR" if user is invalid

string

amount

Total value of bets placed during the period

number