import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
export class LCDQueryClient {
  constructor({
    requestClient
  }) {
    _defineProperty(this, "req", void 0);
    this.req = requestClient;
    this.queryExchangeParams = this.queryExchangeParams.bind(this);
    this.subaccountDeposits = this.subaccountDeposits.bind(this);
    this.subaccountDeposit = this.subaccountDeposit.bind(this);
    this.exchangeBalances = this.exchangeBalances.bind(this);
    this.spotMarkets = this.spotMarkets.bind(this);
    this.spotMarket = this.spotMarket.bind(this);
    this.spotOrderbook = this.spotOrderbook.bind(this);
    this.traderSpotOrders = this.traderSpotOrders.bind(this);
    this.spotOrdersByHashes = this.spotOrdersByHashes.bind(this);
    this.subaccountOrders = this.subaccountOrders.bind(this);
    this.traderSpotTransientOrders = this.traderSpotTransientOrders.bind(this);
    this.spotMidPriceAndTOB = this.spotMidPriceAndTOB.bind(this);
    this.derivativeMidPriceAndTOB = this.derivativeMidPriceAndTOB.bind(this);
    this.derivativeOrderbook = this.derivativeOrderbook.bind(this);
    this.traderDerivativeOrders = this.traderDerivativeOrders.bind(this);
    this.derivativeOrdersByHashes = this.derivativeOrdersByHashes.bind(this);
    this.traderDerivativeTransientOrders = this.traderDerivativeTransientOrders.bind(this);
    this.derivativeMarkets = this.derivativeMarkets.bind(this);
    this.derivativeMarket = this.derivativeMarket.bind(this);
    this.derivativeMarketAddress = this.derivativeMarketAddress.bind(this);
    this.subaccountTradeNonce = this.subaccountTradeNonce.bind(this);
    this.exchangeModuleState = this.exchangeModuleState.bind(this);
    this.positions = this.positions.bind(this);
    this.subaccountPositions = this.subaccountPositions.bind(this);
    this.subaccountPositionInMarket = this.subaccountPositionInMarket.bind(this);
    this.subaccountEffectivePositionInMarket = this.subaccountEffectivePositionInMarket.bind(this);
    this.perpetualMarketInfo = this.perpetualMarketInfo.bind(this);
    this.expiryFuturesMarketInfo = this.expiryFuturesMarketInfo.bind(this);
    this.perpetualMarketFunding = this.perpetualMarketFunding.bind(this);
    this.subaccountOrderMetadata = this.subaccountOrderMetadata.bind(this);
    this.tradeRewardPoints = this.tradeRewardPoints.bind(this);
    this.pendingTradeRewardPoints = this.pendingTradeRewardPoints.bind(this);
    this.tradeRewardCampaign = this.tradeRewardCampaign.bind(this);
    this.feeDiscountAccountInfo = this.feeDiscountAccountInfo.bind(this);
    this.feeDiscountSchedule = this.feeDiscountSchedule.bind(this);
    this.balanceMismatches = this.balanceMismatches.bind(this);
    this.balanceWithBalanceHolds = this.balanceWithBalanceHolds.bind(this);
    this.feeDiscountTierStatistics = this.feeDiscountTierStatistics.bind(this);
    this.ninjaVaultInfos = this.ninjaVaultInfos.bind(this);
    this.queryMarketIDFromVault = this.queryMarketIDFromVault.bind(this);
    this.historicalTradeRecords = this.historicalTradeRecords.bind(this);
    this.isOptedOutOfRewards = this.isOptedOutOfRewards.bind(this);
    this.optedOutOfRewardsAccounts = this.optedOutOfRewardsAccounts.bind(this);
    this.marketVolatility = this.marketVolatility.bind(this);
    this.binaryOptionsMarkets = this.binaryOptionsMarkets.bind(this);
    this.traderDerivativeConditionalOrders = this.traderDerivativeConditionalOrders.bind(this);
  }
  /* Retrieves exchange params */

  async queryExchangeParams(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/exchangeParams`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a Subaccount's Deposits */

  async subaccountDeposits(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.subaccountId) !== "undefined") {
      options.params.subaccount_id = params.subaccountId;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.subaccount) !== "undefined") {
      options.params.subaccount = params.subaccount;
    }
    const endpoint = `injective/exchange/v1beta1/exchange/subaccountDeposits`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a Subaccount's Deposits */

  async subaccountDeposit(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.subaccountId) !== "undefined") {
      options.params.subaccount_id = params.subaccountId;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.denom) !== "undefined") {
      options.params.denom = params.denom;
    }
    const endpoint = `injective/exchange/v1beta1/exchange/subaccountDeposit`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves all of the balances of all users on the exchange. */

  async exchangeBalances(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/exchange/exchangeBalances`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a list of spot markets. */

  async spotMarkets(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.status) !== "undefined") {
      options.params.status = params.status;
    }
    const endpoint = `injective/exchange/v1beta1/spot/markets`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a spot market by ticker */

  async spotMarket(params) {
    const endpoint = `injective/exchange/v1beta1/spot/markets/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a spot market's orderbook by marketID */

  async spotOrderbook(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.limit) !== "undefined") {
      options.params.limit = params.limit;
    }
    const endpoint = `injective/exchange/v1beta1/spot/orderbook/${params.marketId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a trader's spot orders */

  async traderSpotOrders(params) {
    const endpoint = `injective/exchange/v1beta1/spot/orders/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves spot orders corresponding to specified order hashes for a given subaccountID and marketID */

  async spotOrdersByHashes(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.orderHashes) !== "undefined") {
      options.params.order_hashes = params.orderHashes;
    }
    const endpoint = `injective/exchange/v1beta1/spot/orders_by_hashes/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves subaccount's orders */

  async subaccountOrders(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.marketId) !== "undefined") {
      options.params.market_id = params.marketId;
    }
    const endpoint = `injective/exchange/v1beta1/orders/${params.subaccountId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a trader's transient spot orders */

  async traderSpotTransientOrders(params) {
    const endpoint = `injective/exchange/v1beta1/spot/transient_orders/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a spot market's mid-price */

  async spotMidPriceAndTOB(params) {
    const endpoint = `injective/exchange/v1beta1/spot/mid_price_and_tob/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a derivative market's mid-price */

  async derivativeMidPriceAndTOB(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/mid_price_and_tob/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a derivative market's orderbook by marketID */

  async derivativeOrderbook(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.limit) !== "undefined") {
      options.params.limit = params.limit;
    }
    const endpoint = `injective/exchange/v1beta1/derivative/orderbook/${params.marketId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a trader's derivative orders */

  async traderDerivativeOrders(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/orders/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a trader's derivative orders */

  async derivativeOrdersByHashes(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.orderHashes) !== "undefined") {
      options.params.order_hashes = params.orderHashes;
    }
    const endpoint = `injective/exchange/v1beta1/derivative/orders_by_hashes/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a trader's transient derivative orders */

  async traderDerivativeTransientOrders(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/transient_orders/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a list of derivative markets. */

  async derivativeMarkets(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.status) !== "undefined") {
      options.params.status = params.status;
    }
    const endpoint = `injective/exchange/v1beta1/derivative/markets`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a derivative market by ticker */

  async derivativeMarket(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/markets/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a derivative market's corresponding address for fees that contribute to the market's insurance fund */

  async derivativeMarketAddress(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/market_address/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves a subaccount's trade nonce */

  async subaccountTradeNonce(params) {
    const endpoint = `injective/exchange/v1beta1/exchange/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the entire exchange module's state */

  async exchangeModuleState(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/module_state`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the entire exchange module's positions */

  async positions(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/positions`;
    return await this.req.get(endpoint);
  }
  /* Retrieves subaccount's positions */

  async subaccountPositions(params) {
    const endpoint = `injective/exchange/v1beta1/positions/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves subaccount's position in market */

  async subaccountPositionInMarket(params) {
    const endpoint = `injective/exchange/v1beta1/positions/${params.subaccountId}/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves subaccount's position in market */

  async subaccountEffectivePositionInMarket(params) {
    const endpoint = `injective/exchange/v1beta1/effective_positions/${params.subaccountId}/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves perpetual market info */

  async perpetualMarketInfo(params) {
    const endpoint = `injective/exchange/v1beta1/perpetual_market_info/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves expiry market info */

  async expiryFuturesMarketInfo(params) {
    const endpoint = `injective/exchange/v1beta1/expiry_market_info/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves perpetual market funding */

  async perpetualMarketFunding(params) {
    const endpoint = `injective/exchange/v1beta1/perpetual_market_funding/${params.marketId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves subaccount's order metadata */

  async subaccountOrderMetadata(params) {
    const endpoint = `injective/exchange/v1beta1/order_metadata/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the account and total trade rewards points */

  async tradeRewardPoints(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.accounts) !== "undefined") {
      options.params.accounts = params.accounts;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.pendingPoolTimestamp) !== "undefined") {
      options.params.pending_pool_timestamp = params.pendingPoolTimestamp;
    }
    const endpoint = `injective/exchange/v1beta1/trade_reward_points`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves the pending account and total trade rewards points */

  async pendingTradeRewardPoints(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.accounts) !== "undefined") {
      options.params.accounts = params.accounts;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.pendingPoolTimestamp) !== "undefined") {
      options.params.pending_pool_timestamp = params.pendingPoolTimestamp;
    }
    const endpoint = `injective/exchange/v1beta1/pending_trade_reward_points`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves the trade reward campaign */

  async tradeRewardCampaign(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/trade_reward_campaign`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the account's fee discount info */

  async feeDiscountAccountInfo(params) {
    const endpoint = `injective/exchange/v1beta1/fee_discount_account_info/${params.account}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the fee discount schedule */

  async feeDiscountSchedule(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/fee_discount_schedule`;
    return await this.req.get(endpoint);
  }
  /* Retrieves mismatches between available vs. total balance */

  async balanceMismatches(params) {
    const endpoint = `injective/exchange/v1beta1/balance_mismatches/${params.dustFactor}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves available and total balances with balance holds */

  async balanceWithBalanceHolds(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/balances_with_balance_holds`;
    return await this.req.get(endpoint);
  }
  /* Retrieves fee discount tier stats */

  async feeDiscountTierStatistics(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/fee_discount_tier_stats`;
    return await this.req.get(endpoint);
  }
  /* Retrieves market making pool info */

  async ninjaVaultInfos(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/ninja_vault_infos`;
    return await this.req.get(endpoint);
  }
  /* QueryMarketIDFromVault returns the market ID for a given vault subaccount ID */

  async queryMarketIDFromVault(params) {
    const endpoint = `injective/exchange/v1beta1/vault_market_id/${params.vaultSubaccountId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves historical trade records for a given market ID */

  async historicalTradeRecords(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.marketId) !== "undefined") {
      options.params.market_id = params.marketId;
    }
    const endpoint = `injective/exchange/v1beta1/historical_trade_records`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves if the account is opted out of rewards */

  async isOptedOutOfRewards(params) {
    const endpoint = `injective/exchange/v1beta1/is_opted_out_of_rewards/${params.account}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves all accounts opted out of rewards */

  async optedOutOfRewardsAccounts(_params = {}) {
    const endpoint = `injective/exchange/v1beta1/opted_out_of_rewards_accounts`;
    return await this.req.get(endpoint);
  }
  /* MarketVolatility computes the volatility for spot and derivative markets trading history. */

  async marketVolatility(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.tradeHistoryOptions) !== "undefined") {
      options.params.trade_history_options = params.tradeHistoryOptions;
    }
    const endpoint = `injective/exchange/v1beta1/market_volatility/${params.marketId}`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a spot market's orderbook by marketID */

  async binaryOptionsMarkets(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.status) !== "undefined") {
      options.params.status = params.status;
    }
    const endpoint = `injective/exchange/v1beta1/binary_options/markets`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves a trader's derivative conditional orders */

  async traderDerivativeConditionalOrders(params) {
    const endpoint = `injective/exchange/v1beta1/derivative/orders/conditional/${params.marketId}/${params.subaccountId}`;
    return await this.req.get(endpoint);
  }
}