Class: CryptoApis::UnifiedEndpointsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/crypto_apis/api/unified_endpoints_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UnifiedEndpointsApi

Returns a new instance of UnifiedEndpointsApi.



19
20
21
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#estimate_transaction_smart_fee(blockchain, network, opts = {}) ⇒ EstimateTransactionSmartFeeR

Estimate Transaction Smart Fee Through this endpoint, customers can estimate the approximate fee per kilobyte needed for a transaction to begin confirmation within the ‘confirmationTarget` blocks when possible. After which it will return the number of blocks for which the estimate is valid.

Parameters:

  • blockchain (String)
  • network (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :confirmation_target (Integer)

    Integer representation of confirmation target in blocks that estimation will be valid for

  • :estimate_mode (String)

    String representation of the address

Returns:



31
32
33
34
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 31

def estimate_transaction_smart_fee(blockchain, network, opts = {})
  data, _status_code, _headers = estimate_transaction_smart_fee_with_http_info(blockchain, network, opts)
  data
end

#estimate_transaction_smart_fee_with_http_info(blockchain, network, opts = {}) ⇒ Array<(EstimateTransactionSmartFeeR, Integer, Hash)>

Estimate Transaction Smart Fee Through this endpoint, customers can estimate the approximate fee per kilobyte needed for a transaction to begin confirmation within the &#x60;confirmationTarget&#x60; blocks when possible. After which it will return the number of blocks for which the estimate is valid.

Parameters:

  • blockchain (String)
  • network (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :confirmation_target (Integer)

    Integer representation of confirmation target in blocks that estimation will be valid for

  • :estimate_mode (String)

    String representation of the address

Returns:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 45

def estimate_transaction_smart_fee_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.estimate_transaction_smart_fee ...'
  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.estimate_transaction_smart_fee"
  end
  # verify enum value
  allowable_values = ["bitcoin", "litecoin", "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.estimate_transaction_smart_fee"
  end
  # verify enum value
  allowable_values = ["testnet", "mainnet"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  allowable_values = ["economical", "conservative"]
  if @api_client.config.client_side_validation && opts[:'estimate_mode'] && !allowable_values.include?(opts[:'estimate_mode'])
    fail ArgumentError, "invalid value for \"estimate_mode\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/estimate-transaction-smart-fee'.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?
  query_params[:'confirmationTarget'] = opts[:'confirmation_target'] if !opts[:'confirmation_target'].nil?
  query_params[:'estimateMode'] = opts[:'estimate_mode'] if !opts[:'estimate_mode'].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] || 'EstimateTransactionSmartFeeR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.estimate_transaction_smart_fee",
    :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#estimate_transaction_smart_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_address_details(blockchain, network, address, opts = {}) ⇒ GetAddressDetailsR

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. Applies only for coins.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



122
123
124
125
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 122

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 = {}) ⇒ Array<(GetAddressDetailsR, Integer, Hash)>

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. Applies only for coins.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetAddressDetailsR, Integer, Hash)>)

    GetAddressDetailsR data, response status code and response headers



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 135

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", "binance-smart-chain", "zcash"]
  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", "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 = {}) ⇒ GetBlockDetailsByBlockHashR

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



210
211
212
213
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 210

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 = {}) ⇒ Array<(GetBlockDetailsByBlockHashR, Integer, Hash)>

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetBlockDetailsByBlockHashR, Integer, Hash)>)

    GetBlockDetailsByBlockHashR data, response status code and response headers



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 223

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", "binance-smart-chain", "zcash"]
  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", "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 = {}) ⇒ GetBlockDetailsByBlockHeightR

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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 &quot;Genesis block&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



298
299
300
301
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 298

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 = {}) ⇒ Array<(GetBlockDetailsByBlockHeightR, Integer, Hash)>

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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 &quot;Genesis block&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 311

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", "binance-smart-chain", "zcash"]
  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", "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 = {}) ⇒ GetFeeRecommendationsR

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



385
386
387
388
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 385

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 = {}) ⇒ Array<(GetFeeRecommendationsR, Integer, Hash)>

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetFeeRecommendationsR, Integer, Hash)>)

    GetFeeRecommendationsR data, response status code and response headers



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 397

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", "binance-smart-chain", "zcash", "xrp"]
  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", "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_last_mined_block(blockchain, network, opts = {}) ⇒ GetLastMinedBlockR

Get Last 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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



467
468
469
470
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 467

def get_last_mined_block(blockchain, network, opts = {})
  data, _status_code, _headers = get_last_mined_block_with_http_info(blockchain, network, opts)
  data
end

#get_last_mined_block_with_http_info(blockchain, network, opts = {}) ⇒ Array<(GetLastMinedBlockR, Integer, Hash)>

Get Last 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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetLastMinedBlockR, Integer, Hash)>)

    GetLastMinedBlockR data, response status code and response headers



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 479

def get_last_mined_block_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_last_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_last_mined_block"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash", "binance-smart-chain", "zcash"]
  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_last_mined_block"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "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}/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] || 'GetLastMinedBlockR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_last_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_last_mined_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_next_available_nonce(blockchain, network, address, opts = {}) ⇒ GetNextAvailableNonceR

Get Next Available Nonce Through this endpoint customers can get information about the next available nonce by providing the specific blockchain, network and address.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



550
551
552
553
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 550

def get_next_available_nonce(blockchain, network, address, opts = {})
  data, _status_code, _headers = get_next_available_nonce_with_http_info(blockchain, network, address, opts)
  data
end

#get_next_available_nonce_with_http_info(blockchain, network, address, opts = {}) ⇒ Array<(GetNextAvailableNonceR, Integer, Hash)>

Get Next Available Nonce Through this endpoint customers can get information about the next available nonce by providing the specific blockchain, network and address.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetNextAvailableNonceR, Integer, Hash)>)

    GetNextAvailableNonceR data, response status code and response headers



563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 563

def get_next_available_nonce_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_next_available_nonce ...'
  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_next_available_nonce"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain"]
  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_next_available_nonce"
  end
  # verify enum value
  allowable_values = ["ropsten", "mainnet", "mordor", "testnet"]
  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_next_available_nonce"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/next-available-nonce'.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] || 'GetNextAvailableNonceR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_next_available_nonce",
    :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_next_available_nonce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_raw_transaction_data(blockchain, network, transaction_id, opts = {}) ⇒ GetRawTransactionDataR

Get Raw Transaction Data Through this endpoint customers can get information on a transaction in its raw format by providing its ‘transactionId`.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • transaction_id (String)

    Represents the unique identifier of a transaction, i.e. it could be transactionId in UTXO-based protocols like Bitcoin, and transaction hash in Ethereum blockchain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



638
639
640
641
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 638

def get_raw_transaction_data(blockchain, network, transaction_id, opts = {})
  data, _status_code, _headers = get_raw_transaction_data_with_http_info(blockchain, network, transaction_id, opts)
  data
end

#get_raw_transaction_data_with_http_info(blockchain, network, transaction_id, opts = {}) ⇒ Array<(GetRawTransactionDataR, Integer, Hash)>

Get Raw Transaction Data Through this endpoint customers can get information on a transaction in its raw format by providing its &#x60;transactionId&#x60;.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • transaction_id (String)

    Represents the unique identifier of a transaction, i.e. it could be transactionId in UTXO-based protocols like Bitcoin, and transaction hash in Ethereum blockchain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(GetRawTransactionDataR, Integer, Hash)>)

    GetRawTransactionDataR data, response status code and response headers



651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 651

def get_raw_transaction_data_with_http_info(blockchain, network, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_raw_transaction_data ...'
  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_raw_transaction_data"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "zcash"]
  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_raw_transaction_data"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet"]
  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_raw_transaction_data"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/transactions/{transactionId}/raw-data'.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] || 'GetRawTransactionDataR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.get_raw_transaction_data",
    :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_raw_transaction_data\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 = {}) ⇒ GetTransactionDetailsByTransactionIDR

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`.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



726
727
728
729
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 726

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 = {}) ⇒ Array<(GetTransactionDetailsByTransactionIDR, Integer, Hash)>

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;.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 739

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", "binance-smart-chain", "zcash"]
  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", "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_all_unconfirmed_transactions(blockchain, network, opts = {}) ⇒ ListAllUnconfirmedTransactionsR

List All Unconfirmed Transactions Through this endpoint customers can list all unconfirmed transactions for a specified blockchain and network.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



815
816
817
818
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 815

def list_all_unconfirmed_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = list_all_unconfirmed_transactions_with_http_info(blockchain, network, opts)
  data
end

#list_all_unconfirmed_transactions_with_http_info(blockchain, network, opts = {}) ⇒ Array<(ListAllUnconfirmedTransactionsR, Integer, Hash)>

List All Unconfirmed Transactions Through this endpoint customers can list all unconfirmed transactions for a specified blockchain and network.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 829

def list_all_unconfirmed_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_all_unconfirmed_transactions ...'
  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_all_unconfirmed_transactions"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "zcash", "binance-smart-chain"]
  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_all_unconfirmed_transactions"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "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}/address-transactions-unconfirmed'.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?
  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] || 'ListAllUnconfirmedTransactionsR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_all_unconfirmed_transactions",
    :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_all_unconfirmed_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_confirmed_tokens_transfers_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ ListConfirmedTokensTransfersByAddressAndTimeRangeR

List Confirmed Tokens Transfers By Address And Time Range Through this endpoint customers can obtain a list with confirmed token transfers by the ‘address` attribute and the query parameters `fromTimestamp` and `toTimestamp` which gives customers the opportunity to filter the results by a specified time period. noteThis refers only to transfers done for **confirmed tokens** not coins./note

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Ethereum Classic, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



906
907
908
909
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 906

def list_confirmed_tokens_transfers_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  data, _status_code, _headers = list_confirmed_tokens_transfers_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts)
  data
end

#list_confirmed_tokens_transfers_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ Array<(ListConfirmedTokensTransfersByAddressAndTimeRangeR, Integer, Hash)>

List Confirmed Tokens Transfers By Address And Time Range Through this endpoint customers can obtain a list with confirmed token transfers by the &#x60;address&#x60; attribute and the query parameters &#x60;fromTimestamp&#x60; and &#x60;toTimestamp&#x60; which gives customers the opportunity to filter the results by a specified time period. noteThis refers only to transfers done for **confirmed tokens** not coins./note

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Ethereum Classic, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 923

def list_confirmed_tokens_transfers_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_confirmed_tokens_transfers_by_address_and_time_range ...'
  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_confirmed_tokens_transfers_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain"]
  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_confirmed_tokens_transfers_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["mainnet", "ropsten", "mordor", "testnet"]
  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_confirmed_tokens_transfers_by_address_and_time_range"
  end
  # verify the required parameter 'from_timestamp' is set
  if @api_client.config.client_side_validation && from_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'from_timestamp' when calling UnifiedEndpointsApi.list_confirmed_tokens_transfers_by_address_and_time_range"
  end
  # verify the required parameter 'to_timestamp' is set
  if @api_client.config.client_side_validation && to_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'to_timestamp' when calling UnifiedEndpointsApi.list_confirmed_tokens_transfers_by_address_and_time_range"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers-by-time-range'.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[:'fromTimestamp'] = from_timestamp
  query_params[:'toTimestamp'] = to_timestamp
  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] || 'ListConfirmedTokensTransfersByAddressAndTimeRangeR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_confirmed_tokens_transfers_by_address_and_time_range",
    :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_confirmed_tokens_transfers_by_address_and_time_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_confirmed_transactions_by_address(blockchain, network, address, opts = {}) ⇒ ListConfirmedTransactionsByAddressR

List Confirmed 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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1012
1013
1014
1015
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1012

def list_confirmed_transactions_by_address(blockchain, network, address, opts = {})
  data, _status_code, _headers = list_confirmed_transactions_by_address_with_http_info(blockchain, network, address, opts)
  data
end

#list_confirmed_transactions_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ ListConfirmedTransactionsByAddressAndTimeRangeR

List Confirmed Transactions By Address And Time Range This endpoint will list confirmed transactions by the attribute ‘address` and the query parameters `fromTimestamp` and `toTimestamp` which gives customers the opportunity to filter the results by a specified time period.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1108
1109
1110
1111
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1108

def list_confirmed_transactions_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  data, _status_code, _headers = list_confirmed_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts)
  data
end

#list_confirmed_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ Array<(ListConfirmedTransactionsByAddressAndTimeRangeR, Integer, Hash)>

List Confirmed Transactions By Address And Time Range This endpoint will list confirmed transactions by the attribute &#x60;address&#x60; and the query parameters &#x60;fromTimestamp&#x60; and &#x60;toTimestamp&#x60; which gives customers the opportunity to filter the results by a specified time period.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1125

def list_confirmed_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_confirmed_transactions_by_address_and_time_range ...'
  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_confirmed_transactions_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum-classic", "ethereum", "binance-smart-chain", "zcash"]
  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_confirmed_transactions_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "mordor", "ropsten"]
  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_confirmed_transactions_by_address_and_time_range"
  end
  # verify the required parameter 'from_timestamp' is set
  if @api_client.config.client_side_validation && from_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'from_timestamp' when calling UnifiedEndpointsApi.list_confirmed_transactions_by_address_and_time_range"
  end
  # verify the required parameter 'to_timestamp' is set
  if @api_client.config.client_side_validation && to_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'to_timestamp' when calling UnifiedEndpointsApi.list_confirmed_transactions_by_address_and_time_range"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/transactions-by-time-range'.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[:'fromTimestamp'] = from_timestamp
  query_params[:'toTimestamp'] = to_timestamp
  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] || 'ListConfirmedTransactionsByAddressAndTimeRangeR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_confirmed_transactions_by_address_and_time_range",
    :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_confirmed_transactions_by_address_and_time_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_confirmed_transactions_by_address_with_http_info(blockchain, network, address, opts = {}) ⇒ Array<(ListConfirmedTransactionsByAddressR, Integer, Hash)>

List Confirmed 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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1027

def list_confirmed_transactions_by_address_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_confirmed_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_confirmed_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum-classic", "ethereum", "binance-smart-chain", "zcash"]
  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_confirmed_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "mordor", "ropsten"]
  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_confirmed_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] || 'ListConfirmedTransactionsByAddressR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_confirmed_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_confirmed_transactions_by_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_internal_transactions_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ ListInternalTransactionsByAddressAndTimeRangeR

List Internal Transactions By Address And Time Range Through this endpoint customers can list internal transactions by the ‘address` attribute and the query parameters `fromTimestamp` and `toTimestamp` which gives customers the opportunity to filter the results by a specified time period.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    String identifier of the address document represented in CryptoAPIs

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1216
1217
1218
1219
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1216

def list_internal_transactions_by_address_and_time_range(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  data, _status_code, _headers = list_internal_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts)
  data
end

#list_internal_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {}) ⇒ Array<(ListInternalTransactionsByAddressAndTimeRangeR, Integer, Hash)>

List Internal Transactions By Address And Time Range Through this endpoint customers can list internal transactions by the &#x60;address&#x60; attribute and the query parameters &#x60;fromTimestamp&#x60; and &#x60;toTimestamp&#x60; which gives customers the opportunity to filter the results by a specified time period.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    String identifier of the address document represented in CryptoAPIs

  • from_timestamp (Integer)

    Defines the specific time/date from which the results will start being listed.

  • to_timestamp (Integer)

    Defines the specific time/date to which the results will be listed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1233

def list_internal_transactions_by_address_and_time_range_with_http_info(blockchain, network, address, from_timestamp, to_timestamp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_internal_transactions_by_address_and_time_range ...'
  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_internal_transactions_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain"]
  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_internal_transactions_by_address_and_time_range"
  end
  # verify enum value
  allowable_values = ["mainnet", "ropsten", "mordor", "testnet"]
  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_internal_transactions_by_address_and_time_range"
  end
  # verify the required parameter 'from_timestamp' is set
  if @api_client.config.client_side_validation && from_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'from_timestamp' when calling UnifiedEndpointsApi.list_internal_transactions_by_address_and_time_range"
  end
  # verify the required parameter 'to_timestamp' is set
  if @api_client.config.client_side_validation && to_timestamp.nil?
    fail ArgumentError, "Missing the required parameter 'to_timestamp' when calling UnifiedEndpointsApi.list_internal_transactions_by_address_and_time_range"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/internal-by-time-range'.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[:'fromTimestamp'] = from_timestamp
  query_params[:'toTimestamp'] = to_timestamp
  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] || 'ListInternalTransactionsByAddressAndTimeRangeR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_internal_transactions_by_address_and_time_range",
    :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_internal_transactions_by_address_and_time_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_latest_mined_blocks(network, blockchain, count, opts = {}) ⇒ ListLatestMinedBlocksR

List Latest Mined Blocks Through this endpoint customers can list **up to 50** from the latest blocks that were mined.

Parameters:

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • count (Integer)

    Specifies how many records were requested.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:



1320
1321
1322
1323
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1320

def list_latest_mined_blocks(network, blockchain, count, opts = {})
  data, _status_code, _headers = list_latest_mined_blocks_with_http_info(network, blockchain, count, opts)
  data
end

#list_latest_mined_blocks_with_http_info(network, blockchain, count, opts = {}) ⇒ Array<(ListLatestMinedBlocksR, Integer, Hash)>

List Latest Mined Blocks Through this endpoint customers can list **up to 50** from the latest blocks that were mined.

Parameters:

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • count (Integer)

    Specifies how many records were requested.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

Returns:

  • (Array<(ListLatestMinedBlocksR, Integer, Hash)>)

    ListLatestMinedBlocksR data, response status code and response headers



1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1333

def list_latest_mined_blocks_with_http_info(network, blockchain, count, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_latest_mined_blocks ...'
  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_latest_mined_blocks"
  end
  # verify enum value
  allowable_values = ["testnet", "mordor", "mainnet", "ropsten"]
  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 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_latest_mined_blocks"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "ethereum-classic", "ethereum", "litecoin", "dash", "dogecoin", "binance-smart-chain", "zilliqa", "zcash", "xrp"]
  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 'count' is set
  if @api_client.config.client_side_validation && count.nil?
    fail ArgumentError, "Missing the required parameter 'count' when calling UnifiedEndpointsApi.list_latest_mined_blocks"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/blocks/last/{count}'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'count' + '}', CGI.escape(count.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] || 'ListLatestMinedBlocksR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_latest_mined_blocks",
    :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_latest_mined_blocks\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 = {}) ⇒ ListTransactionsByBlockHashR

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1410
1411
1412
1413
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1410

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 = {}) ⇒ Array<(ListTransactionsByBlockHashR, Integer, Hash)>

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1425

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", "binance-smart-chain", "zcash"]
  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", "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 = {}) ⇒ ListTransactionsByBlockHeightR

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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 &quot;Genesis block&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1504
1505
1506
1507
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1504

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 = {}) ⇒ Array<(ListTransactionsByBlockHeightR, Integer, Hash)>

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.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • 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 &quot;Genesis block&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1519

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", "binance-smart-chain", "zcash"]
  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", "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

#list_unconfirmed_transactions_by_address(blockchain, network, address, opts = {}) ⇒ ListUnconfirmedTransactionsByAddressR

List Unconfirmed Transactions by Address Through this endpoint customers can list transactions by ‘address` that are unconfirmed.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1598
1599
1600
1601
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1598

def list_unconfirmed_transactions_by_address(blockchain, network, address, opts = {})
  data, _status_code, _headers = list_unconfirmed_transactions_by_address_with_http_info(blockchain, network, address, opts)
  data
end

#list_unconfirmed_transactions_by_address_with_http_info(blockchain, network, address, opts = {}) ⇒ Array<(ListUnconfirmedTransactionsByAddressR, Integer, Hash)>

List Unconfirmed Transactions by Address Through this endpoint customers can list transactions by &#x60;address&#x60; that are unconfirmed.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the public address, which is a compressed and shortened form of a public key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1613

def list_unconfirmed_transactions_by_address_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_unconfirmed_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_unconfirmed_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "zcash", "binance-smart-chain"]
  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_unconfirmed_transactions_by_address"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet", "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
  # 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_unconfirmed_transactions_by_address"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/address-transactions-unconfirmed/{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?
  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] || 'ListUnconfirmedTransactionsByAddressR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_unconfirmed_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_unconfirmed_transactions_by_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_unspent_transaction_outputs_by_address(blockchain, network, address, opts = {}) ⇒ ListUnspentTransactionOutputsByAddressR

List Unspent Transaction Outputs By Address Through this endpoint customers can list their transactions’ unspent outputs by ‘address`.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the address that has unspend funds per which the result is returned.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1692
1693
1694
1695
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1692

def list_unspent_transaction_outputs_by_address(blockchain, network, address, opts = {})
  data, _status_code, _headers = list_unspent_transaction_outputs_by_address_with_http_info(blockchain, network, address, opts)
  data
end

#list_unspent_transaction_outputs_by_address_with_http_info(blockchain, network, address, opts = {}) ⇒ Array<(ListUnspentTransactionOutputsByAddressR, Integer, Hash)>

List Unspent Transaction Outputs By Address Through this endpoint customers can list their transactions&#39; unspent outputs by &#x60;address&#x60;.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • 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. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • address (String)

    Represents the address that has unspend funds per which the result is returned.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    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.

  • :limit (Integer)

    Defines how many items should be returned in the response per page basis. (default to 50)

  • :offset (Integer)

    The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)

Returns:



1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
# File 'lib/crypto_apis/api/unified_endpoints_api.rb', line 1707

def list_unspent_transaction_outputs_by_address_with_http_info(blockchain, network, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.list_unspent_transaction_outputs_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_unspent_transaction_outputs_by_address"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dash", "dogecoin", "zcash"]
  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_unspent_transaction_outputs_by_address"
  end
  # verify enum value
  allowable_values = ["testnet", "mainnet"]
  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_unspent_transaction_outputs_by_address"
  end
  # resource path
  local_var_path = '/blockchain-data/{blockchain}/{network}/addresses/{address}/unspent-outputs'.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] || 'ListUnspentTransactionOutputsByAddressR'

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

  new_options = opts.merge(
    :operation => :"UnifiedEndpointsApi.list_unspent_transaction_outputs_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_unspent_transaction_outputs_by_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end