Files
sunfuze 36123021bf I18n (#99)
* convert to zh-HK

* support en

* corrent some words

* use HTTP API instead of Rest Api

* correct some translation error

* fix english writing standard
2022-05-09 13:59:42 +08:00

53 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 獲取長連接 OTP
id: socket-otp-api
slug: /socket-token-api
sidebar_position: 2
---
# 獲取長連接 OTP(One Time Password)
獲取長連接使用的 `Token`(One time password),長連接的 `Token` 可以用來連接行情和交易的長連接網關,是一次性的,使用過後就會作廢。
> 最後更新於 2022-04-28
## 請求
| 基本信息 | |
| ----------- | -------------- |
| HTTP URL | /v1/socket/token |
| HTTP Method | GET |
### 請求頭
| 名稱 | 類型 | 必須 | 描述 |
| ------------- | ------ | ---- | --------------------------------------------- |
| Authorization | string | 是 | |
| Content-Type | string | 是 | **固定值**:"application/json; charset=utf-8" |
### 請求參數
## 響應
### 響應體
| 名稱 | 類型 | 描述 |
| ---- | ------ | --------------------- |
| code | int | 錯誤碼,非 0 表示失敗 |
| msg | string | 錯誤描述 |
| data | object | |
| ∟otp | string | 獲取到的 token |
### 響應體示例
```json
{
"code": 0,
"message": "",
"data": {
"otp": "xxxxxxxx"
}
}
}
```