class CryptoApis::UnifiedEndpointsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/crypto_apis/api/unified_endpoints_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_address_details(blockchain, network, address, opts = {}) click to toggle source

Get Address Details Through this endpoint the customer can receive basic information about a given address based on confirmed/synced blocks only. In the case where there are any incoming or outgoing unconfirmed transactions for the specific address, they **will not** be counted or calculated here. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param address [String] Represents the public address, which is a compressed and shortened form of a public key. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetAddressDetailsR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 30
def get_address_details(blockchain, network, address, opts = {})
  data, _status_code, _headers = get_address_details_with_http_info(blockchain, network, address, opts)
  data
end
get_address_details_with_http_info(blockchain, network, address, opts = {}) click to toggle source

Get Address Details Through this endpoint the customer can receive basic information about a given address based on confirmed/synced blocks only. In the case where there are any incoming or outgoing unconfirmed transactions for the specific address, they **will not** be counted or calculated here. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param address [String] Represents the public address, which is a compressed and shortened form of a public key. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetAddressDetailsR, Integer, Hash)>] GetAddressDetailsR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 43
def get_address_details_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_address_details ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_address_details"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_address_details"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling UnifiedEndpointsApi.get_address_details"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'address' + '}', CGI.escape(address.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAddressDetailsR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_address_details",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_address_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_block_details_by_block_hash(blockchain, network, block_hash, opts = {}) click to toggle source

Get Block Details By Block Hash Through this endpoint customers can obtain basic information about a given mined block, specifically by using the `hash` parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [GetBlockDetailsByBlockHashR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 118
def get_block_details_by_block_hash(blockchain, network, block_hash, opts = {})
  data, _status_code, _headers = get_block_details_by_block_hash_with_http_info(blockchain, network, block_hash, opts)
  data
end
get_block_details_by_block_hash_with_http_info(blockchain, network, block_hash, opts = {}) click to toggle source

Get Block Details By Block Hash Through this endpoint customers can obtain basic information about a given mined block, specifically by using the &#x60;hash&#x60; parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetBlockDetailsByBlockHashR, Integer, Hash)>] GetBlockDetailsByBlockHashR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 131
def get_block_details_by_block_hash_with_http_info(blockchain, network, block_hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_block_details_by_block_hash ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_block_details_by_block_hash"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_block_details_by_block_hash"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'block_hash' is set
  if @api_client.config.client_side_validation && block_hash.nil?
    fail ArgumentError, "Missing the required parameter 'block_hash' when calling UnifiedEndpointsApi.get_block_details_by_block_hash"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHash' + '}', CGI.escape(block_hash.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetBlockDetailsByBlockHashR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_block_details_by_block_hash",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_block_details_by_block_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_block_details_by_block_height(blockchain, network, height, opts = {}) click to toggle source

Get Block Details By Block Height Through this endpoint customers can obtain basic information about a given mined block, specifically by using the `height` parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block&quot;. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [GetBlockDetailsByBlockHeightR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 206
def get_block_details_by_block_height(blockchain, network, height, opts = {})
  data, _status_code, _headers = get_block_details_by_block_height_with_http_info(blockchain, network, height, opts)
  data
end
get_block_details_by_block_height_with_http_info(blockchain, network, height, opts = {}) click to toggle source

Get Block Details By Block Height Through this endpoint customers can obtain basic information about a given mined block, specifically by using the &#x60;height&#x60; parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block&quot;. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetBlockDetailsByBlockHeightR, Integer, Hash)>] GetBlockDetailsByBlockHeightR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 219
def get_block_details_by_block_height_with_http_info(blockchain, network, height, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_block_details_by_block_height ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_block_details_by_block_height"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_block_details_by_block_height"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'height' is set
  if @api_client.config.client_side_validation && height.nil?
    fail ArgumentError, "Missing the required parameter 'height' when calling UnifiedEndpointsApi.get_block_details_by_block_height"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/height/{height}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'height' + '}', CGI.escape(height.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetBlockDetailsByBlockHeightR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_block_details_by_block_height",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_block_details_by_block_height\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_fee_recommendations(blockchain, network, opts = {}) click to toggle source

Get Fee Recommendations Through this endpoint customers can obtain fee recommendations. Our fees recommendations are based on Mempool data which makes them much more accurate than fees based on already mined blocks. Calculations are done in real time live. Using this endpoint customers can get gas price for Ethereum, fee per byte for Bitcoin, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [GetFeeRecommendationsR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 293
def get_fee_recommendations(blockchain, network, opts = {})
  data, _status_code, _headers = get_fee_recommendations_with_http_info(blockchain, network, opts)
  data
end
get_fee_recommendations_with_http_info(blockchain, network, opts = {}) click to toggle source

Get Fee Recommendations Through this endpoint customers can obtain fee recommendations. Our fees recommendations are based on Mempool data which makes them much more accurate than fees based on already mined blocks. Calculations are done in real time live. Using this endpoint customers can get gas price for Ethereum, fee per byte for Bitcoin, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetFeeRecommendationsR, Integer, Hash)>] GetFeeRecommendationsR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 305
def get_fee_recommendations_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_fee_recommendations ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_fee_recommendations"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "dogecoin", "dash", "litecoin"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_fee_recommendations"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "rinkeby", "ropsten", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/mempool/fees'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetFeeRecommendationsR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_fee_recommendations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_fee_recommendations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_latest_mined_block(blockchain, network, opts = {}) click to toggle source

Get Latest Mined Block Through this endpoint customers can fetch the last mined block in a specific blockchain network, along with its details. These could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [GetLatestMinedBlockR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 375
def get_latest_mined_block(blockchain, network, opts = {})
  data, _status_code, _headers = get_latest_mined_block_with_http_info(blockchain, network, opts)
  data
end
get_latest_mined_block_with_http_info(blockchain, network, opts = {}) click to toggle source

Get Latest Mined Block Through this endpoint customers can fetch the last mined block in a specific blockchain network, along with its details. These could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetLatestMinedBlockR, Integer, Hash)>] GetLatestMinedBlockR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 387
def get_latest_mined_block_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_latest_mined_block ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_latest_mined_block"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_latest_mined_block"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/last'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetLatestMinedBlockR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_latest_mined_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_latest_mined_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_transaction_details_by_transaction_id(blockchain, network, transaction_id, opts = {}) click to toggle source

Get Transaction Details By Transaction ID Through this endpoint customers can obtain details about a transaction by the transaction's unique identifier. In UTXO-based protocols like BTC there are attributes such as `transactionId` and transaction `hash`. They still could be different. In protocols like Ethereum there is only one unique value and it's `hash`. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param transaction_id [String] Represents the unique identifier of a transaction, i.e. it could be &#x60;transactionId&#x60; in UTXO-based protocols like Bitcoin, and transaction &#x60;hash&#x60; in Ethereum blockchain. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [GetTransactionDetailsByTransactionIDR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 458
def get_transaction_details_by_transaction_id(blockchain, network, transaction_id, opts = {})
  data, _status_code, _headers = get_transaction_details_by_transaction_id_with_http_info(blockchain, network, transaction_id, opts)
  data
end
get_transaction_details_by_transaction_id_with_http_info(blockchain, network, transaction_id, opts = {}) click to toggle source

Get Transaction Details By Transaction ID Through this endpoint customers can obtain details about a transaction by the transaction&#39;s unique identifier. In UTXO-based protocols like BTC there are attributes such as &#x60;transactionId&#x60; and transaction &#x60;hash&#x60;. They still could be different. In protocols like Ethereum there is only one unique value and it&#39;s &#x60;hash&#x60;. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param transaction_id [String] Represents the unique identifier of a transaction, i.e. it could be &#x60;transactionId&#x60; in UTXO-based protocols like Bitcoin, and transaction &#x60;hash&#x60; in Ethereum blockchain. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetTransactionDetailsByTransactionIDR, Integer, Hash)>] GetTransactionDetailsByTransactionIDR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 471
def get_transaction_details_by_transaction_id_with_http_info(blockchain, network, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_transaction_details_by_transaction_id ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_transaction_details_by_transaction_id"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.get_transaction_details_by_transaction_id"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling UnifiedEndpointsApi.get_transaction_details_by_transaction_id"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/transactions/{transactionId}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetTransactionDetailsByTransactionIDR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_transaction_details_by_transaction_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#get_transaction_details_by_transaction_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_transactions_by_address(blockchain, network, address, opts = {}) click to toggle source

List Transactions By Address This endpoint will list transactions by an attribute `address`. The transactions listed will detail additional information such as hash, height, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param address [String] Represents the public address, which is a compressed and shortened form of a public key. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListTransactionsByAddressR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 548
def list_transactions_by_address(blockchain, network, address, opts = {})
  data, _status_code, _headers = list_transactions_by_address_with_http_info(blockchain, network, address, opts)
  data
end
list_transactions_by_address_with_http_info(blockchain, network, address, opts = {}) click to toggle source

List Transactions By Address This endpoint will list transactions by an attribute &#x60;address&#x60;. The transactions listed will detail additional information such as hash, height, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param address [String] Represents the public address, which is a compressed and shortened form of a public key. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListTransactionsByAddressR, Integer, Hash)>] ListTransactionsByAddressR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 563
def list_transactions_by_address_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_transactions_by_address ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum-classic", "ethereum"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.list_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "mordor", "ropsten", "rinkeby"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling UnifiedEndpointsApi.list_transactions_by_address"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/transactions'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'address' + '}', CGI.escape(address.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListTransactionsByAddressR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_transactions_by_address",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#list_transactions_by_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_transactions_by_block_hash(blockchain, network, block_hash, opts = {}) click to toggle source

List Transactions by Block Hash This endpoint will list transactions by an attribute `transactionHash`. The transactions listed will detail additional information such as addresses, height, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListTransactionsByBlockHashR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 642
def list_transactions_by_block_hash(blockchain, network, block_hash, opts = {})
  data, _status_code, _headers = list_transactions_by_block_hash_with_http_info(blockchain, network, block_hash, opts)
  data
end
list_transactions_by_block_hash_with_http_info(blockchain, network, block_hash, opts = {}) click to toggle source

List Transactions by Block Hash This endpoint will list transactions by an attribute &#x60;transactionHash&#x60;. The transactions listed will detail additional information such as addresses, height, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListTransactionsByBlockHashR, Integer, Hash)>] ListTransactionsByBlockHashR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 657
def list_transactions_by_block_hash_with_http_info(blockchain, network, block_hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_transactions_by_block_hash ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_block_hash"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.list_transactions_by_block_hash"
  end
  # verify enum value
  allowable_values = ["testnet", "mainnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'block_hash' is set
  if @api_client.config.client_side_validation && block_hash.nil?
    fail ArgumentError, "Missing the required parameter 'block_hash' when calling UnifiedEndpointsApi.list_transactions_by_block_hash"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}/transactions'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHash' + '}', CGI.escape(block_hash.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListTransactionsByBlockHashR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_transactions_by_block_hash",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#list_transactions_by_block_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_transactions_by_block_height(blockchain, network, height, opts = {}) click to toggle source

List Transactions by Block Height This endpoint will list transactions by an attribute `blockHeight`. The transactions listed will detail additional information such as hash, addresses, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block&quot;. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListTransactionsByBlockHeightR]

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 736
def list_transactions_by_block_height(blockchain, network, height, opts = {})
  data, _status_code, _headers = list_transactions_by_block_height_with_http_info(blockchain, network, height, opts)
  data
end
list_transactions_by_block_height_with_http_info(blockchain, network, height, opts = {}) click to toggle source

List Transactions by Block Height This endpoint will list transactions by an attribute &#x60;blockHeight&#x60;. The transactions listed will detail additional information such as hash, addresses, time of creation in Unix timestamp, etc. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block&quot;. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListTransactionsByBlockHeightR, Integer, Hash)>] ListTransactionsByBlockHeightR data, response status code and response headers

# File lib/crypto_apis/api/unified_endpoints_api.rb, line 751
def list_transactions_by_block_height_with_http_info(blockchain, network, height, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_transactions_by_block_height ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_block_height"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "dash", "dogecoin", "litecoin", "bitcoin-cash", "ethereum-classic"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling UnifiedEndpointsApi.list_transactions_by_block_height"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "ropsten", "rinkeby", "mordor"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'height' is set
  if @api_client.config.client_side_validation && height.nil?
    fail ArgumentError, "Missing the required parameter 'height' when calling UnifiedEndpointsApi.list_transactions_by_block_height"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/height/{height}/transactions'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'height' + '}', CGI.escape(height.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListTransactionsByBlockHeightR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_transactions_by_block_height",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UnifiedEndpointsApi#list_transactions_by_block_height\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end