huobi.fetchMarkets unified
diff --git a/js/huobi.js b/js/huobi.js
index f1fb3a6272ff..806667fe1e40 100644
--- a/js/huobi.js
+++ b/js/huobi.js
@@ -1245,18 +1245,13 @@ module.exports = class huobi extends Exchange {
                 pricePrecision = this.safeNumber (market, 'price_tick');
                 amountPrecision = 1;
             }
-            const precision = {
-                'amount': amountPrecision,
-                'price': pricePrecision,
-                'cost': costPrecision,
-            };
             let maker = undefined;
             let taker = undefined;
             if (spot) {
                 maker = (base === 'OMG') ? 0 : 0.2 / 100;
                 taker = (base === 'OMG') ? 0 : 0.2 / 100;
             }
-            const minAmount = this.safeNumber (market, 'min-order-amt', Math.pow (10, -precision['amount']));
+            const minAmount = this.safeNumber (market, 'min-order-amt');
             const maxAmount = this.safeNumber (market, 'max-order-amt');
             const minCost = this.safeNumber (market, 'min-order-value', 0);
             let active = undefined;
@@ -1267,6 +1262,9 @@ module.exports = class huobi extends Exchange {
                 const contractStatus = this.safeInteger (market, 'contract_status');
                 active = (contractStatus === 1);
             }
+            const leverageRatio = this.safeString (market, 'leverage-ratio', '1');
+            const superLeverageRatio = this.safeString (market, 'super-margin-leverage-ratio', '1');
+            const hasLeverage = Precise.stringGt (leverageRatio, '1') || Precise.stringGt (superLeverageRatio, '1');
             // 0 Delisting
             // 1 Listing
             // 2 Pending Listing
@@ -1287,36 +1285,45 @@ module.exports = class huobi extends Exchange {
                 'quoteId': quoteId,
                 'settleId': settleId,
                 'type': type,
-                'contract': contract,
                 'spot': spot,
-                'future': future,
+                'margin': (spot && hasLeverage),
                 'swap': swap,
+                'future': future,
+                'option': false,
+                'active': active,
+                'contract': contract,
                 'linear': linear,
                 'inverse': inverse,
-                'expiry': expiry,
-                'expiryDatetime': this.iso8601 (expiry),
-                'contractSize': contractSize,
-                'active': active,
-                'precision': precision,
                 'taker': taker,
                 'maker': maker,
+                'contractSize': contractSize,
+                'expiry': expiry,
+                'expiryDatetime': this.iso8601 (expiry),
+                'strike': undefined,
+                'optionType': undefined,
+                'precision': {
+                    'amount': amountPrecision,
+                    'price': pricePrecision,
+                    'cost': costPrecision,
+                },
                 'limits': {
+                    'leverage': {
+                        'min': this.parseNumber ('1'),
+                        'max': this.parseNumber (leverageRatio),
+                        'superMax': this.parseNumber (superLeverageRatio),
+                    },
                     'amount': {
                         'min': minAmount,
                         'max': maxAmount,
                     },
                     'price': {
-                        'min': pricePrecision,
+                        'min': undefined,
                         'max': undefined,
                     },
                     'cost': {
                         'min': minCost,
                         'max': undefined,
                     },
-                    'leverage': {
-                        'max': this.safeNumber (market, 'leverage-ratio', 1),
-                        'superMax': this.safeNumber (market, 'super-margin-leverage-ratio', 1),
-                    },
                 },
                 'info': market,
             });

```
             id |               symbol |           base | quote | settle |    baseId | quoteId | settleId |   type |  spot | margin |  swap | future | option | active | contract | linear | inverse | taker | maker | contractSize |        expiry |           expiryDatetime | strike | optionType |                                        precision |                                                                              limits
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          gtbtc |               GT/BTC |             GT |   BTC |        |        gt |     btc |          |   spot |  true |  false | false |  false |  false |   true |    false |        |         | 0.002 | 0.002 |              |               |                          |        |            |         {"amount":0.01,"price":1e-8,"cost":1e-8} |                                                                     [object Object]
Waiting for the debugger to disconnect...
...
        ksmusdt |             KSM/USDT |            KSM |  USDT |        |       ksm |    usdt |          |   spot |  true |   true | false |  false |  false |   true |    false |        |         | 0.002 | 0.002 |              |               |                          |        |            |      {"amount":0.001,"price":0.0001,"cost":1e-8} |                                                                     [object Object]
      FIL220211 |   FIL/USD:FIL-220211 |            FIL |   USD |    FIL |       FIL |     USD |      FIL | future | false |  false | false |   true |  false |   true |     true |  false |    true |       |       |           10 | 1644566400000 | 2022-02-11T08:00:00.000Z |        |            |                       {"amount":1,"price":0.001} | {"leverage":{"min":1,"max":1,"superMax":1},"amount":{},"price":{},"cost":{"min":0}}
       SAND-USD |        SAND/USD:SAND |           SAND |   USD |   SAND |      SAND |     USD |     SAND |   swap | false |  false |  true |  false |  false |   true |     true |  false |    true |       |       |           10 |               |                          |        |            |                      {"amount":1,"price":0.0001} | {"leverage":{"min":1,"max":1,"superMax":1},"amount":{},"price":{},"cost":{"min":0}}
       MANA-USD |        MANA/USD:MANA |           MANA |   USD |   MANA |      MANA |     USD |     MANA |   swap | false |  false |  true |  false |  false |   true |     true |  false |    true |       |       |           10 |               |                          |        |            |                      {"amount":1,"price":0.0001} | {"leverage":{"min":1,"max":1,"superMax":1},"amount":{},"price":{},"cost":{"min":0}}
1296 objects
```