Skip to content

Commit 1b0413f

Browse files
authored
add cn version of 2022-02 changes (binance#80)
1 parent 05e4de2 commit 1b0413f

2 files changed

Lines changed: 57 additions & 9 deletions

File tree

CHANGELOG_CN.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
# 更新日志 (2021-12-29)
1+
# 更新日志 (2022-02-24)
2+
3+
## 2022-02-24
4+
5+
* 现货规则`PRICE_FILTER`里面的 `(price-minPrice) % tickSize == 0` 改成 `price % tickSize == 0`
6+
* 新添加了一个规则 `PERCENT_PRICE_BY_SIDE`.
7+
* 接口 `GET api/v3/depth` 的变动:
8+
* `limit` 原先必须是固定值(比如 5, 10, 20, 50, 100, 500, 1000, 5000), 现在可以是在1-5000之间的任意的正整数, 服务器会返回指定的limit数量。(比如如果设置limit=3, 会返回前3个最好的卖价和买价)
9+
* 如果`limit`超过5000, 服务器也最多返回5000条记录.
10+
* 相应的, 此接口的权重变成:
11+
12+
|Limit|Request Weight
13+
------|-------
14+
1-100| 1
15+
101-500| 5
16+
501-1000| 10
17+
1001-5000| 50
18+
19+
* GET `api/v3/aggTrades` 接口的变动:
20+
* 当同时提供参数 `startTime``endTime`, 最旧的订单会优先返回.
21+
22+
---
23+
224

325
# 2021-12-29
426
* 移除交易对类型枚举

rest-api_CN.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REST行情与交易接口 (2021-08-12)
1+
# REST行情与交易接口 (2022-02-24)
22
# 基本信息
33
* 本篇列出REST接口的baseurl **https://api.binance.com**
44
* 如果上面的baseURL访问有性能问题,请访问下面的API集群:
@@ -195,7 +195,7 @@ There is no & between "GTC" and "quantity=1".
195195
* SPOT 现货
196196
* MARGIN 杠杆
197197
* LEVERAGED 杠杆代币
198-
* TRD_GRP_002 交易组 002
198+
* TRD_GRP_002 交易组 002
199199
200200
**订单状态 (status):**
201201
@@ -403,18 +403,19 @@ GET /api/v3/depth
403403

404404
**权重:**
405405

406-
Limit | Weight
406+
限制 | 权重
407407
------------ | ------------
408-
5, 10, 20, 50, 100 | 1
409-
500 | 5
410-
1000 | 10
408+
1-100 | 1
409+
101-500 | 5
410+
501-1000 | 10
411+
1001-5000 | 50
411412

412413
**参数:**
413414

414415
名称 | 类型 | 是否必须 | 描述
415416
------------ | ------------ | ------------ | ------------
416417
symbol | STRING | YES |
417-
limit | INT | NO | 默认 100; 最大 1000. 可选值:[5, 10, 20, 50, 100, 500, 1000]
418+
limit | INT | NO | 默认 100; 最大 5000. 可选值:[5, 10, 20, 50, 100, 500, 1000, 5000] <br> 如果 limit > 5000, 最多返回5000条数据.
418419

419420
**注意:** limit=0 返回全部orderbook,但数据量会非常非常非常非常大!
420421

@@ -1352,7 +1353,7 @@ listenKey | STRING | YES
13521353
逻辑伪代码如下:
13531354
* `price` >= `minPrice`
13541355
* `price` <= `maxPrice`
1355-
* (`price`-`minPrice`) % `tickSize` == 0
1356+
* `price` % `tickSize` == 0
13561357

13571358
**/exchangeInfo 响应中的格式:**
13581359
```javascript
@@ -1382,6 +1383,31 @@ listenKey | STRING | YES
13821383
}
13831384
```
13841385

1386+
#### PERCENT_PRICE_BY_SIDE
1387+
1388+
> **ExchangeInfo format:**
1389+
```javascript
1390+
{
1391+
"filterType": "PERCENT_PRICE_BY_SIDE",
1392+
"bidMultiplierUp": "10",
1393+
"bidMultiplierDown": "9",
1394+
"askMultiplierUp": "0.1",
1395+
"askMultiplierDown": "0.2",
1396+
"avgPriceMins": 1
1397+
}
1398+
```
1399+
1400+
`PERCENT_PRICE_BY_SIDE` 过滤器定义了基于交易对lastPrice的合法价格范围. 取决于`BUY`或者`SELL`, 价格范围可能有所不同.
1401+
1402+
买向订单需要满足:
1403+
* `Max Order price` <= `bidMultiplierUp` * `lastPrice`
1404+
* `Minimum Order price` >= `bidMultiplierDown` * `lastPrice`
1405+
1406+
卖向订单需要满足:
1407+
* `Max Order Price` <= `askMultiplierUp` * `lastPrice`
1408+
* `Min Order Price` >= `askMultiplierDown` * `lastPrice`
1409+
1410+
13851411
### LOT_SIZE 订单尺寸
13861412
lots是拍卖术语,这个过滤器对订单中的`quantity`也就是数量参数进行合法性检查。包含三个部分:
13871413

0 commit comments

Comments
 (0)