@usherlabs/cex-broker 0.1.21 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -32
- package/dist/commands/cli.js +18546 -15131
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/index.d.ts +62 -0
- package/dist/helpers/logger.d.ts +9 -0
- package/dist/helpers/otel.d.ts +70 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12390 -9415
- package/dist/index.js.map +107 -66
- package/dist/proto/cex_broker/Action.d.ts +17 -0
- package/dist/proto/cex_broker/ActionRequest.d.ts +17 -0
- package/dist/proto/cex_broker/ActionResponse.d.ts +8 -0
- package/dist/proto/cex_broker/SubscribeRequest.d.ts +17 -0
- package/dist/proto/cex_broker/SubscribeResponse.d.ts +14 -0
- package/dist/proto/cex_broker/SubscriptionType.d.ts +11 -0
- package/dist/proto/cex_broker/cex_service.d.ts +28 -0
- package/dist/proto/node.d.ts +20 -0
- package/dist/proto/node.descriptor.d.ts +124 -0
- package/dist/types.d.ts +5 -25
- package/package.json +21 -10
package/README.md
CHANGED
|
@@ -82,27 +82,26 @@ OTEL_SERVICE_NAME=cex-broker
|
|
|
82
82
|
|
|
83
83
|
### Policy Configuration
|
|
84
84
|
|
|
85
|
-
Configure trading policies in `policy/policy.json
|
|
85
|
+
Configure trading policies in `policy/policy.json`.
|
|
86
|
+
|
|
87
|
+
- **Full reference**: see `POLICY.md` (supported options, matching rules, reload behaviour, and troubleshooting)
|
|
88
|
+
- **Example policy**: `policy/policy.json`
|
|
86
89
|
|
|
87
90
|
```json
|
|
88
91
|
{
|
|
89
92
|
"withdraw": {
|
|
90
|
-
"rule":
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"min": 1
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
93
|
+
"rule": [
|
|
94
|
+
{
|
|
95
|
+
"exchange": "BINANCE",
|
|
96
|
+
"network": "BEP20",
|
|
97
|
+
"whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"exchange": "BINANCE",
|
|
101
|
+
"network": "ARBITRUM",
|
|
102
|
+
"whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
106
105
|
},
|
|
107
106
|
"deposit": {},
|
|
108
107
|
"order": {
|
|
@@ -114,10 +113,7 @@ Configure trading policies in `policy/policy.json`:
|
|
|
114
113
|
"BINANCE:BTC/ETH"
|
|
115
114
|
],
|
|
116
115
|
"limits": [
|
|
117
|
-
{ "from": "USDT", "to": "ETH", "min": 1, "max": 100000 }
|
|
118
|
-
{ "from": "ETH", "to": "USDT", "min": 0.5, "max": 5 },
|
|
119
|
-
{ "from": "ARB", "to": "USDC", "min": 1, "max": 1000 },
|
|
120
|
-
{ "from": "USDC", "to": "ARB", "min": 1, "max": 10000 }
|
|
116
|
+
{ "from": "USDT", "to": "ETH", "min": 1, "max": 100000 }
|
|
121
117
|
]
|
|
122
118
|
}
|
|
123
119
|
}
|
|
@@ -577,17 +573,18 @@ for (const [currency, info] of Object.entries(currencies)) {
|
|
|
577
573
|
```json
|
|
578
574
|
{
|
|
579
575
|
"withdraw": {
|
|
580
|
-
"rule":
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
576
|
+
"rule": [
|
|
577
|
+
{
|
|
578
|
+
"exchange": "BINANCE",
|
|
579
|
+
"network": "BEP20",
|
|
580
|
+
"whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"exchange": "BINANCE",
|
|
584
|
+
"network": "ARBITRUM",
|
|
585
|
+
"whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"]
|
|
586
|
+
}
|
|
587
|
+
]
|
|
591
588
|
}
|
|
592
589
|
}
|
|
593
590
|
```
|