@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 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
- "networks": ["BEP20", "ARBITRUM", "ETHEREUM"],
92
- "whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"],
93
- "amounts": [
94
- {
95
- "ticker": "USDC",
96
- "max": 100000,
97
- "min": 1
98
- },
99
- {
100
- "ticker": "USDT",
101
- "max": 100000,
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
- "networks": ["BEP20", "ARBITRUM", "ETH"], // Networks supported by your exchanges
582
- "whitelist": ["0x9d467fa9062b6e9b1a46e26007ad82db116c67cb"],
583
- "amounts": [
584
- {
585
- "ticker": "USDT",
586
- "max": 100000,
587
- "min": 1
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
  ```