@riocrypto/common-server 1.0.1169 → 1.0.1171

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.
@@ -89,7 +89,7 @@ class ClusterClient {
89
89
  }
90
90
  getBalance(asset) {
91
91
  return __awaiter(this, void 0, void 0, function* () {
92
- const rioResponse = yield this.axios.get(`${this.baseUrl}/api/wallet/balances/rio/${asset}`, {
92
+ const rioResponse = yield this.axios.get(`${this.baseUrl}/api/liquidity/${asset}`, {
93
93
  headers: {
94
94
  "x-api-key": this.clusterApiKey,
95
95
  },
@@ -63,7 +63,7 @@ const getExchangeRates = (from, to, noMarkups) => __awaiter(void 0, void 0, void
63
63
  const variance = squaredDeviations.reduce((sum, deviation) => sum + deviation, 0) /
64
64
  values.length;
65
65
  const volatility = Math.sqrt(variance);
66
- const maximumPriceChange = volatility * QUOTE_DURATION_MINUTES;
66
+ const maximumPriceChange = volatility * (QUOTE_DURATION_MINUTES / 2);
67
67
  safestPrice = safestPrice - maximumPriceChange;
68
68
  // Bank based markups
69
69
  let exchangeRateMultiplier = from === common_1.Fiat.PEN ? 0.9987 : 0.9997;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1169",
3
+ "version": "1.0.1171",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.1043",
29
+ "@riocrypto/common": "^1.0.1050",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",