> For the complete documentation index, see [llms.txt](https://docs.multimarkets.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.multimarkets.org/client-api/access/request.md).

# Request

## 1.Interface address=>HTTP

```
http://ip:port/path/
```

DEMO如下：

```http
POST http://127.0.0.1:9008/login/{bizType} # login
POST http://127.0.0.1:9008/register/{bizType} # register
POST http://127.0.0.1:9008/logout # logout
POST http://127.0.0.1:9008/global/{bizType} # other request
...
```

Request method: POST

### 1.2 Request

```
Request header information
Request body information, transmitted in the form of content-type=application/json
```

#### 1.2.1 Header Request Parameters

| parameter | type   | required     | describe                                     |
| --------- | ------ | ------------ | -------------------------------------------- |
| companyId | long   | Required     | System unique company identifier             |
| trace     | String | Required     | Global link unique identifier                |
| timestamp | long   | Required     | Timestamp, milliseconds                      |
| version   | String | Not required | Interface version number                     |
| group     | String | Not required | Interface Grouping                           |
| lang      | String | Not required | Language information, default is zh-CN       |
| token     | String | Not required | Token information, required after logging in |

#### 1.2.2 Request Body Parameters

| parameter | type | required | describe                  |
| --------- | ---- | -------- | ------------------------- |
| bizBody   | JSON | Required | Request message body，JSON |

## 1.2 Interface address=>websocket

```
ws://ip:port/path/ws
```

The DEMO is as follows:

```
ws://127.0.0.1:9008/ws
```

Pass in parameters:

| parameter | type | required | describe             |
| --------- | ---- | -------- | -------------------- |
| header    | JSON | Required | Consistent with http |
| body      | JSON | Required | Consistent with http |

The DEMO is as follows:

```
{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "customer.CustomerWebApiService.login",
    "version": "0.0.1",
	"group": "",
    "companyId": 11,
	"timestamp": 11111131331,
	"lang":"zh-CN"
  },
  "body": {
    "type": 3,
    "loginName": "139"
  }
}
```

The heartbeat format is as follows: bizType is fixed to ping

```
{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "ping",
	"sendTime":1617246557505,
	"lang":"zh-CN"，
	"timestamp": 11111131331
  }
}
```

The format of the heartbeat return message body is as follows: bizType is fixed to pong

```
{
  "trace": "Original parameters returned",
  "token": "Original parameters returned",
  "bizType": "pong",
  "sendTime": 1617678792458,
  "lang": "zh-CN"
}
```

Return parameter:

| parameter |   | type   | describe                                                                                             |
| --------- | - | ------ | ---------------------------------------------------------------------------------------------------- |
| code      |   | String | System general return code. 0-success, other exceptions                                              |
| msg       |   | String | returned messages                                                                                    |
| bizCode   |   | String | Module identification code                                                                           |
| tm        |   | Long   | Processing time (milliseconds)                                                                       |
| trace     |   | String | Global link flag information                                                                         |
| msgParams |   | String | Returns the placeholder parameter string in the description. Multiple parameters are separated by ,  |
| data      |   | Object | Data body, unified return of each business response information, return bizType in case of exception |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.multimarkets.org/client-api/access/request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
