text: /*
   * Upbit Open API
   * ## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] 
   *
   * OpenAPI spec version: 1.1.6
   * Contact: ujhin942@gmail.com
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.4.17
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient', 'model/Error'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'), require('../model/Error'));
    } else {
      // Browser globals (root is window)
      if (!root.UpbitOpenApi) {
        root.UpbitOpenApi = {};
      }
      root.UpbitOpenApi.CandleApi = factory(root.UpbitOpenApi.ApiClient, root.UpbitOpenApi.Error);
    }
  }(this, function(ApiClient, Error) {
    'use strict';
  
    /**
     * Candle service.
     * @module api/CandleApi
     * @version 1.1.6
     */
  
    /**
     * Constructs a new CandleApi. 
     * @alias module:api/CandleApi
     * @class
     * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
     * default to {@link module:ApiClient#instance} if unspecified.
     */
    var exports = function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
      /**
       * Callback function to receive the result of the candleDays operation.
       * @callback module:api/CandleApi~candleDaysCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 시세 캔들 조회 (일 단위)
       * ## 일(Day) 캔들 
       * @param {String} market 마켓 코드 (ex. KRW-BTC) 
       * @param {Object} opts Optional parameters
       * @param {String} opts.to 마지막 캔들 시각 (exclusive). 포맷 : `yyyy-MM-dd'T'HH:mm:ssXXX` or `yyyy-MM-dd HH:mm:ss`. 비워서 요청 시 가장 최근 캔들 
       * @param {Number} opts.count 캔들 개수 
       * @param {String} opts.convertingPriceUnit 종가 환산 화폐 단위 (생략 가능, KRW로 명시할 시 원화 환산 가격을 반환.)  `convertingPriceUnit` 파라미터의 경우, 원화 마켓이 아닌 다른 마켓(ex. BTC, ETH)의 일봉 요청 시 종가를 명시된 파라미터 값으로 환산해 `converted_trade_price` 필드에 추가하여 반환합니다. 현재는 원화(`KRW`) 로 변환하는 기능만 제공하며 추후 기능을 확장할 수 있습니다.  (default to KRW)
       * @param {module:api/CandleApi~candleDaysCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.candleDays = function(market, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'market' is set
        if (market === undefined || market === null) {
          throw new Error("Missing the required parameter 'market' when calling candleDays");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
          'market': market,
          'to': opts['to'],
          'count': opts['count'],
          'convertingPriceUnit': opts['convertingPriceUnit'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['Bearer'];
        var contentTypes = [];
        var accepts = ['application/json'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/candles/days', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the candleMinutes operation.
       * @callback module:api/CandleApi~candleMinutesCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 시세 캔들 조회 (분 단위)
       * ## 분(Minute) 캔들 
       * @param {Number} unit 분 단위. 가능한 값 : 1, 3, 5, 15, 10, 30, 60, 240 
       * @param {String} market 마켓 코드 (ex. KRW-BTC) 
       * @param {Object} opts Optional parameters
       * @param {String} opts.to 마지막 캔들 시각 (exclusive). 포맷 : `yyyy-MM-dd'T'HH:mm:ssXXX` or `yyyy-MM-dd HH:mm:ss`. 비워서 요청 시 가장 최근 캔들 
       * @param {Number} opts.count 캔들 개수 (최대 200개까지 요청 가능) 
       * @param {module:api/CandleApi~candleMinutesCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.candleMinutes = function(unit, market, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'unit' is set
        if (unit === undefined || unit === null) {
          throw new Error("Missing the required parameter 'unit' when calling candleMinutes");
        }
  
        // verify the required parameter 'market' is set
        if (market === undefined || market === null) {
          throw new Error("Missing the required parameter 'market' when calling candleMinutes");
        }
  
  
        var pathParams = {
          'unit': unit
        };
        var queryParams = {
          'market': market,
          'to': opts['to'],
          'count': opts['count'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['Bearer'];
        var contentTypes = [];
        var accepts = ['application/json'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/candles/minutes/{unit}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the candleMonth operation.
       * @callback module:api/CandleApi~candleMonthCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 시세 캔들 조회 (월 단위)
       * ## 월(Month) 캔들 
       * @param {String} market 마켓 코드 (ex. KRW-BTC) 
       * @param {Object} opts Optional parameters
       * @param {String} opts.to 마지막 캔들 시각 (exclusive). 포맷 : `yyyy-MM-dd'T'HH:mm:ssXXX` or `yyyy-MM-dd HH:mm:ss`. 비워서 요청 시 가장 최근 캔들 
       * @param {Number} opts.count 캔들 개수 
       * @param {module:api/CandleApi~candleMonthCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.candleMonth = function(market, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'market' is set
        if (market === undefined || market === null) {
          throw new Error("Missing the required parameter 'market' when calling candleMonth");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
          'market': market,
          'to': opts['to'],
          'count': opts['count'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['Bearer'];
        var contentTypes = [];
        var accepts = ['application/json'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/candles/months', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the candleWeeks operation.
       * @callback module:api/CandleApi~candleWeeksCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 시세 캔들 조회 (주 단위)
       * ## 주(Week) 캔들 
       * @param {String} market 마켓 코드 (ex. KRW-BTC) 
       * @param {Object} opts Optional parameters
       * @param {String} opts.to 마지막 캔들 시각 (exclusive). 포맷 : `yyyy-MM-dd'T'HH:mm:ssXXX` or `yyyy-MM-dd HH:mm:ss`. 비워서 요청 시 가장 최근 캔들 
       * @param {Number} opts.count 캔들 개수 
       * @param {module:api/CandleApi~candleWeeksCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.candleWeeks = function(market, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'market' is set
        if (market === undefined || market === null) {
          throw new Error("Missing the required parameter 'market' when calling candleWeeks");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
          'market': market,
          'to': opts['to'],
          'count': opts['count'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['Bearer'];
        var contentTypes = [];
        var accepts = ['application/json'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/candles/weeks', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
    };
  
    return exports;
  }));
  