@usherlabs/cex-broker 0.1.10 → 0.1.12

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.
@@ -290020,6 +290020,7 @@ function createBroker(cex3, metadata, useVerity, verityProverUrl) {
290020
290020
  exchange.setSandboxMode(true);
290021
290021
  }
290022
290022
  exchange.options.recvWindow = 60000;
290023
+ exchange.redact_exclusion = "key";
290023
290024
  return exchange;
290024
290025
  }
290025
290026
  function selectBroker(brokers, metadata) {
@@ -290160,7 +290161,8 @@ var Action = {
290160
290161
  CancelOrder: 5,
290161
290162
  FetchBalance: 6,
290162
290163
  FetchBalances: 7,
290163
- FetchDepositAddresses: 8
290164
+ FetchDepositAddresses: 8,
290165
+ FetchTicker: 9
290164
290166
  };
290165
290167
 
290166
290168
  // src/proto/cex_broker/SubscriptionType.ts
@@ -290481,6 +290483,21 @@ function getServer(policy, brokers, whitelistIps, useVerity, verityProverUrl) {
290481
290483
  }, null);
290482
290484
  }
290483
290485
  break;
290486
+ case Action.FetchTicker:
290487
+ try {
290488
+ const ticker = await broker.fetchTicker(symbol);
290489
+ callback(null, {
290490
+ proof: broker.last_proof || "",
290491
+ result: JSON.stringify(ticker)
290492
+ });
290493
+ } catch (error) {
290494
+ log.error(`Error fetching ticker from ${cex3}:`, error);
290495
+ callback({
290496
+ code: grpc.status.INTERNAL,
290497
+ message: `Failed to fetch ticker from ${cex3}`
290498
+ }, null);
290499
+ }
290500
+ break;
290484
290501
  default:
290485
290502
  return callback({
290486
290503
  code: grpc.status.INVALID_ARGUMENT,
@@ -290910,6 +290927,7 @@ class CEXBroker {
290910
290927
  recvWindow: 60000
290911
290928
  }
290912
290929
  });
290930
+ exchange.redact_exclusion = "key";
290913
290931
  secondaryBrokers[+index2] = exchange;
290914
290932
  } else {
290915
290933
  log.warn(`⚠️ Incomplete secondary credentials for broker "${broker}" at index ${index2}`);
@@ -290975,7 +290993,7 @@ class CEXBroker {
290975
290993
  for (const index2 of Object.keys(creds2.secondaryKeys)) {
290976
290994
  const sec = creds2.secondaryKeys[+index2];
290977
290995
  if (!!sec?.apiKey && !!sec?.apiSecret) {
290978
- secondaryBroker[+index2] = new ExchangeClass({
290996
+ const exchange = new ExchangeClass({
290979
290997
  apiKey: sec.apiKey,
290980
290998
  secret: sec.apiSecret,
290981
290999
  enableRateLimit: true,
@@ -290988,6 +291006,8 @@ class CEXBroker {
290988
291006
  recvWindow: 60000
290989
291007
  }
290990
291008
  });
291009
+ exchange.redact_exclusion = "key";
291010
+ secondaryBroker[+index2] = exchange;
290991
291011
  } else {
290992
291012
  log.warn(`⚠️ Incomplete secondary credentials for broker "${broker}" at index ${index2}`);
290993
291013
  }
@@ -291010,6 +291030,7 @@ class CEXBroker {
291010
291030
  recvWindow: 60000
291011
291031
  }
291012
291032
  });
291033
+ client.redact_exclusion = "key";
291013
291034
  this.brokers[broker] = {
291014
291035
  primary: client,
291015
291036
  secondaryBrokers: secondaryBroker
package/dist/index.js CHANGED
@@ -285067,6 +285067,7 @@ function createBroker(cex3, metadata, useVerity, verityProverUrl) {
285067
285067
  exchange.setSandboxMode(true);
285068
285068
  }
285069
285069
  exchange.options.recvWindow = 60000;
285070
+ exchange.redact_exclusion = "key";
285070
285071
  return exchange;
285071
285072
  }
285072
285073
  function selectBroker(brokers, metadata) {
@@ -285207,7 +285208,8 @@ var Action = {
285207
285208
  CancelOrder: 5,
285208
285209
  FetchBalance: 6,
285209
285210
  FetchBalances: 7,
285210
- FetchDepositAddresses: 8
285211
+ FetchDepositAddresses: 8,
285212
+ FetchTicker: 9
285211
285213
  };
285212
285214
 
285213
285215
  // src/proto/cex_broker/SubscriptionType.ts
@@ -285528,6 +285530,21 @@ function getServer(policy, brokers, whitelistIps, useVerity, verityProverUrl) {
285528
285530
  }, null);
285529
285531
  }
285530
285532
  break;
285533
+ case Action.FetchTicker:
285534
+ try {
285535
+ const ticker = await broker.fetchTicker(symbol);
285536
+ callback(null, {
285537
+ proof: broker.last_proof || "",
285538
+ result: JSON.stringify(ticker)
285539
+ });
285540
+ } catch (error) {
285541
+ log.error(`Error fetching ticker from ${cex3}:`, error);
285542
+ callback({
285543
+ code: grpc.status.INTERNAL,
285544
+ message: `Failed to fetch ticker from ${cex3}`
285545
+ }, null);
285546
+ }
285547
+ break;
285531
285548
  default:
285532
285549
  return callback({
285533
285550
  code: grpc.status.INVALID_ARGUMENT,
@@ -285957,6 +285974,7 @@ class CEXBroker {
285957
285974
  recvWindow: 60000
285958
285975
  }
285959
285976
  });
285977
+ exchange.redact_exclusion = "key";
285960
285978
  secondaryBrokers[+index2] = exchange;
285961
285979
  } else {
285962
285980
  log.warn(`\u26A0\uFE0F Incomplete secondary credentials for broker "${broker}" at index ${index2}`);
@@ -286022,7 +286040,7 @@ class CEXBroker {
286022
286040
  for (const index2 of Object.keys(creds2.secondaryKeys)) {
286023
286041
  const sec = creds2.secondaryKeys[+index2];
286024
286042
  if (!!sec?.apiKey && !!sec?.apiSecret) {
286025
- secondaryBroker[+index2] = new ExchangeClass({
286043
+ const exchange = new ExchangeClass({
286026
286044
  apiKey: sec.apiKey,
286027
286045
  secret: sec.apiSecret,
286028
286046
  enableRateLimit: true,
@@ -286035,6 +286053,8 @@ class CEXBroker {
286035
286053
  recvWindow: 60000
286036
286054
  }
286037
286055
  });
286056
+ exchange.redact_exclusion = "key";
286057
+ secondaryBroker[+index2] = exchange;
286038
286058
  } else {
286039
286059
  log.warn(`\u26A0\uFE0F Incomplete secondary credentials for broker "${broker}" at index ${index2}`);
286040
286060
  }
@@ -286057,6 +286077,7 @@ class CEXBroker {
286057
286077
  recvWindow: 60000
286058
286078
  }
286059
286079
  });
286080
+ client.redact_exclusion = "key";
286060
286081
  this.brokers[broker] = {
286061
286082
  primary: client,
286062
286083
  secondaryBrokers: secondaryBroker
@@ -286125,4 +286146,4 @@ export {
286125
286146
  CEXBroker as default
286126
286147
  };
286127
286148
 
286128
- //# debugId=DE92A15E05E8EF9F64756E2164756E21
286149
+ //# debugId=16AAAD0D4E9C3C9564756E2164756E21