Message Format

The messages between Aggregator and Operator & Provider are defined as below.

Success

Parameter

Type

Example Value

Mandatory

Description

data

object

Mandatory

The response data

pagination

object

Optional

Pagination information

Parameter of object data will vary for different APIs, see example below for /balance API.

{
  "balance": 12345678,
  "round_id": "DLAJDLSJ12345"
}

Parameter of object pagination

Parameter

Type

Example Value

Mandatory

Description

page_no

int

1

Mandatory

Current page number.

total_pages

int

10

Mandatory

Total page number.

total_count

int

2315

Mandatory

Total record number.

Error

The error message should follow the json format below with proper http status code other than 200.

Parameter

Type

Example Value

Mandatory

Description

code

int

10000

Mandatory

Error code. See error code definition below.

msg

string

“invalid currency“

Mandatory

Error message.

details

arrary of object

{

“game_id“: “12345678“,

“operator_id“: “ABCDEF“

}

Optional

Detailed message of the error.

Error codes

The values of code in error response are defined as below and should be followed in the error message to identify the exact error.

Error Code

10000

bad request

10001

message validation failed

10002

user not found

10003

insufficient funds

10004

round not found

10005

bet not found

10006

transaction not found

Last updated