/**
 * CoinAPI Market Data REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import ApiClient from "../ApiClient";
import V1OrderBookBase from '../model/V1OrderBookBase';

/**
* OrderBookL3 service.
* @module api/OrderBookL3Api
* @version v1
*/
export default class OrderBookL3Api {

    /**
    * Constructs a new OrderBookL3Api. 
    * @alias module:api/OrderBookL3Api
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }


    /**
     * Callback function to receive the result of the v1Orderbooks3CurrentGet operation.
     * @callback module:api/OrderBookL3Api~v1Orderbooks3CurrentGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/V1OrderBookBase>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Current order books
     * @param {Object} opts Optional parameters
     * @param {String} [filterSymbolId] Comma or semicolon delimited parts of symbol identifier used to filter the response.
     * @param {Number} [limitLevels] The maximum number of levels to include in the response.
     * @param {module:api/OrderBookL3Api~v1Orderbooks3CurrentGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/V1OrderBookBase>}
     */
    v1Orderbooks3CurrentGet(opts, callback) {
      opts = opts || {};
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
        'filter_symbol_id': opts['filterSymbolId'],
        'limit_levels': opts['limitLevels']
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['text/plain', 'application/json', 'text/json', 'application/x-msgpack'];
      let returnType = [V1OrderBookBase];
      return this.apiClient.callApi(
        '/v1/orderbooks3/current', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1Orderbooks3SymbolIdCurrentGet operation.
     * @callback module:api/OrderBookL3Api~v1Orderbooks3SymbolIdCurrentGetCallback
     * @param {String} error Error message, if any.
     * @param {module:model/V1OrderBookBase} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Current order book by symbol_id
     * Retrieves the current order book for the specified symbol.
     * @param {String} symbolId The symbol ID (from the Metadata -> Symbols)
     * @param {Object} opts Optional parameters
     * @param {Number} [limitLevels] The maximum number of levels to include in the response.
     * @param {module:api/OrderBookL3Api~v1Orderbooks3SymbolIdCurrentGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/V1OrderBookBase}
     */
    v1Orderbooks3SymbolIdCurrentGet(symbolId, opts, callback) {
      opts = opts || {};
      let postBody = null;
      // verify the required parameter 'symbolId' is set
      if (symbolId === undefined || symbolId === null) {
        throw new Error("Missing the required parameter 'symbolId' when calling v1Orderbooks3SymbolIdCurrentGet");
      }

      let pathParams = {
        'symbol_id': symbolId
      };
      let queryParams = {
        'limit_levels': opts['limitLevels']
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['text/plain', 'application/json', 'text/json', 'application/x-msgpack'];
      let returnType = V1OrderBookBase;
      return this.apiClient.callApi(
        '/v1/orderbooks3/{symbol_id}/current', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }


}
