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