Basic structure | WEBSOKET

This section describes the basic info and structure of WS requests and responses.

Endpoint

ws.earnbit.com
circle-info

The connection will be closed by the server in case of inactivity from the client after 60 seconds.

Request parameters

Name
Type
Desciption
Example

method*

STRING

Method name

server.ping

params

ARRAY

Array of parameters required by a specific method

-

id*

NUMERIC

Request ID, Should be unique to handle response for your request

1

Response Example

Name
Type
Success
Error

id

Integer

NUMERIC

NUMERIC

params

ARRAY

ARRAY

Failure

result

JSON Object

ARRAY

NULL

error

JSON Object

NULL

Failure

General error code:

  • internal error

  • service unavailable

  • method not found

  • service timeout

  • require authentication

Last updated