Skip to content

Commit c878af5

Browse files
author
sting_bo
committed
update readme
1 parent e2264f3 commit c878af5

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ $order = new Order($uuid, $oid, $symbol, $transaction, $volume, $price);
3939
```php
4040
return [
4141
'mengine' => [
42-
// Transaction types, not to be changed
42+
// Transaction types, not subject to change.
4343
'transaction' => [
4444
'buy',
4545
'sell',
4646
],
47-
// Precision, can be changed
48-
'accuracy' => 8, //default
49-
'test2usdt_accuracy' => 4, // Set precision for the trading pair, if not set, use accuracy
47+
48+
// Default precision, can be changed.
49+
'accuracy' => 8,
50+
// If the precision for the trading pair is set, use it; otherwise, take the default accuracy.
51+
'abc2usdt_accuracy' => 6, // Example of a trading pair
52+
'test2usdt_accuracy' => 7, // Example of a trading pair
53+
54+
// If strict mode is set to true, it will validate that the decimal places of the transaction volume or price must be less than the configured length, otherwise the order will fail.
55+
// If strict mode is set to false, the data will be truncated to the configured decimal places length.
56+
'strict_mode' => false,
5057
],
5158
];
5259
```

README_CN.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ return [
4242
'buy',
4343
'sell',
4444
],
45-
// 精度,可更改
46-
'accuracy' => 8, //default
47-
'test2usdt_accuracy' => 4, //设置交易对精度则使用,没有则取accuracy
45+
46+
// 默认精度,可更改
47+
'accuracy' => 8,
48+
// 设置了交易对精度则使用,没有则取accuracy
49+
'abc2usdt_accuracy' => 6, // 交易对示例
50+
'test2usdt_accuracy' => 7, // 交易对示例
51+
52+
// 如果严格模式为true,会校验交易量或价格的小数位长度必须小于设置的长度,否则会下单失败
53+
// 如果严格模式为false,则会截断数据到设定的小数位长度
54+
'strict_mode' => false,
4855
],
4956
];
5057

0 commit comments

Comments
 (0)