Hitbtc v2 : update-ratelimits
diff --git a/js/hitbtc.js b/js/hitbtc.js
index f49d6016042a..759aa72a2f45 100644
--- a/js/hitbtc.js
+++ b/js/hitbtc.js
@@ -15,7 +15,10 @@ module.exports = class hitbtc extends Exchange {
             'id': 'hitbtc',
             'name': 'HitBTC',
             'countries': [ 'HK' ],
-            'rateLimit': 1500,
+            // 300 requests per second => 1000ms / 300 = 3.333ms between requests on average (Trading)
+            // 100 requests per second => ( 1000ms / rateLimit ) / 100 => cost = 3.0003 (Market Data)
+            // 10 requests per second => ( 1000ms / rateLimit ) / 10 => cost = 30.003 (Other Requests)
+            'rateLimit': 3.333,
             'version': '2',
             'pro': true,
             'has': {
@@ -84,84 +87,84 @@ module.exports = class hitbtc extends Exchange {
             },
             'api': {
                 'public': {
-                    'get': [
-                        'currency', // Available Currencies
-                        'currency/{currency}', // Get currency info
-                        'symbol', // Available Currency Symbols
-                        'symbol/{symbol}', // Get symbol info
-                        'ticker', // Ticker list for all symbols
-                        'ticker/{symbol}', // Ticker for symbol
-                        'trades',
-                        'trades/{symbol}', // Trades
-                        'orderbook',
-                        'orderbook/{symbol}', // Orderbook
-                        'candles',
-                        'candles/{symbol}', // Candles
-                    ],
+                    'get': {
+                        'currency': 3, // Available Currencies
+                        'currency/{currency}': 3, // Get currency info
+                        'symbol': 3, // Available Currency Symbols
+                        'symbol/{symbol}': 3, // Get symbol info
+                        'ticker': 3, // Ticker list for all symbols
+                        'ticker/{symbol}': 3, // Ticker for symbol
+                        'trades': 3,
+                        'trades/{symbol}': 3, // Trades
+                        'orderbook': 3,
+                        'orderbook/{symbol}': 3, // Orderbook
+                        'candles': 3,
+                        'candles/{symbol}': 3, // Candles
+                    },
                 },
                 'private': {
-                    'get': [
-                        'trading/balance', // Get trading balance
-                        'order', // List your current open orders
-                        'order/{clientOrderId}', // Get a single order by clientOrderId
-                        'trading/fee/all', // Get trading fee rate
-                        'trading/fee/{symbol}', // Get trading fee rate
-                        'margin/account',
-                        'margin/account/{symbol}',
-                        'margin/position',
-                        'margin/position/{symbol}',
-                        'margin/order',
-                        'margin/order/{clientOrderId}',
-                        'history/order', // Get historical orders
-                        'history/trades', // Get historical trades
-                        'history/order/{orderId}/trades', // Get historical trades by specified order
-                        'account/balance', // Get main acccount balance
-                        'account/crypto/address/{currency}', // Get current address
-                        'account/crypto/addresses/{currency}', // Get last 10 deposit addresses for currency
-                        'account/crypto/used-addresses/{currency}', // Get last 10 unique addresses used for withdraw by currency
-                        'account/crypto/estimate-withdraw',
-                        'account/crypto/is-mine/{address}',
-                        'account/transactions', // Get account transactions
-                        'account/transactions/{id}', // Get account transaction by id
-                        'sub-acc',
-                        'sub-acc/acl',
-                        'sub-acc/balance/{subAccountUserID}',
-                        'sub-acc/deposit-address/{subAccountUserId}/{currency}',
-                    ],
-                    'post': [
-                        'order', // Create new order
-                        'margin/order',
-                        'account/crypto/address/{currency}', // Create new crypto deposit address
-                        'account/crypto/withdraw', // Withdraw crypto
-                        'account/crypto/transfer-convert',
-                        'account/transfer', // Transfer amount to trading account or to main account
-                        'account/transfer/internal',
-                        'sub-acc/freeze',
-                        'sub-acc/activate',
-                        'sub-acc/transfer',
-                    ],
-                    'put': [
-                        'order/{clientOrderId}', // Create new order
-                        'margin/account/{symbol}',
-                        'margin/order/{clientOrderId}',
-                        'account/crypto/withdraw/{id}', // Commit crypto withdrawal
-                        'sub-acc/acl/{subAccountUserId}',
-                    ],
-                    'delete': [
-                        'order', // Cancel all open orders
-                        'order/{clientOrderId}', // Cancel order
-                        'margin/account',
-                        'margin/account/{symbol}',
-                        'margin/position',
-                        'margin/position/{symbol}',
-                        'margin/order',
-                        'margin/order/{clientOrderId}',
-                        'account/crypto/withdraw/{id}', // Rollback crypto withdrawal
-                    ],
+                    'get': {
+                        'trading/balance': 30, // Get trading balance
+                        'order': 30, // List your current open orders
+                        'order/{clientOrderId}': 30, // Get a single order by clientOrderId
+                        'trading/fee/all': 30, // Get trading fee rate
+                        'trading/fee/{symbol}': 30, // Get trading fee rate
+                        'margin/account': 30,
+                        'margin/account/{symbol}': 30,
+                        'margin/position': 30,
+                        'margin/position/{symbol}': 30,
+                        'margin/order': 30,
+                        'margin/order/{clientOrderId}': 30,
+                        'history/order': 30, // Get historical orders
+                        'history/trades': 30, // Get historical trades
+                        'history/order/{orderId}/trades': 30, // Get historical trades by specified order
+                        'account/balance': 30, // Get main acccount balance
+                        'account/crypto/address/{currency}': 30, // Get current address
+                        'account/crypto/addresses/{currency}': 30, // Get last 10 deposit addresses for currency
+                        'account/crypto/used-addresses/{currency}': 30, // Get last 10 unique addresses used for withdraw by currency
+                        'account/crypto/estimate-withdraw': 30,
+                        'account/crypto/is-mine/{address}': 30,
+                        'account/transactions': 30, // Get account transactions
+                        'account/transactions/{id}': 30, // Get account transaction by id
+                        'sub-acc': 30,
+                        'sub-acc/acl': 30,
+                        'sub-acc/balance/{subAccountUserID}': 30,
+                        'sub-acc/deposit-address/{subAccountUserId}/{currency}': 30,
+                    },
+                    'post': {
+                        'order': 1, // Create new order
+                        'margin/order': 1,
+                        'account/crypto/address/{currency}': 1, // Create new crypto deposit address
+                        'account/crypto/withdraw': 1, // Withdraw crypto
+                        'account/crypto/transfer-convert': 1,
+                        'account/transfer': 1, // Transfer amount to trading account or to main account
+                        'account/transfer/internal': 1,
+                        'sub-acc/freeze': 1,
+                        'sub-acc/activate': 1,
+                        'sub-acc/transfer': 1,
+                    },
+                    'put': {
+                        'order/{clientOrderId}': 1, // Create new order
+                        'margin/account/{symbol}': 1,
+                        'margin/order/{clientOrderId}': 1,
+                        'account/crypto/withdraw/{id}': 1, // Commit crypto withdrawal
+                        'sub-acc/acl/{subAccountUserId}': 1,
+                    },
+                    'delete': {
+                        'order': 1, // Cancel all open orders
+                        'order/{clientOrderId}': 1, // Cancel order
+                        'margin/account': 1,
+                        'margin/account/{symbol}': 1,
+                        'margin/position': 1,
+                        'margin/position/{symbol}': 1,
+                        'margin/order': 1,
+                        'margin/order/{clientOrderId}': 1,
+                        'account/crypto/withdraw/{id}': 1, // Rollback crypto withdrawal
+                    },
                     // outdated?
-                    'patch': [
-                        'order/{clientOrderId}', // Cancel Replace order
-                    ],
+                    'patch': {
+                        'order/{clientOrderId}': 1, // Cancel Replace order
+                    },
                 },
             },
             'precisionMode': TICK_SIZE,
