Class: CryptoApis::CreateSubscriptionsForApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CreateSubscriptionsForApi

Returns a new instance of CreateSubscriptionsForApi.



19
20
21
# File 'lib/crypto_apis/api/create_subscriptions_for_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/create_subscriptions_for_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#mined_transaction(blockchain, network, opts = {}) ⇒ MinedTransactionR

Mined transaction Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a specific transaction is mined. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified ‘transactionId`. A transaction is mined when it is included in a new block in the blockchain. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" 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. `context` is specified by the user.

  • :mined_transaction_rb (MinedTransactionRB)

Returns:



30
31
32
33
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 30

def mined_transaction(blockchain, network, opts = {})
  data, _status_code, _headers = mined_transaction_with_http_info(blockchain, network, opts)
  data
end

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

Mined transaction Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a specific transaction is mined. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified &#x60;transactionId&#x60;. A transaction is mined when it is included in a new block in the blockchain. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :mined_transaction_rb (MinedTransactionRB)

Returns:

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

    MinedTransactionR data, response status code and response headers



43
44
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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 43

def mined_transaction_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.mined_transaction ...'
  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 CreateSubscriptionsForApi.mined_transaction"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "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 CreateSubscriptionsForApi.mined_transaction"
  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-events/{blockchain}/{network}/subscriptions/transaction-mined'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mined_transaction_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.mined_transaction",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#mined_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_block(blockchain, network, opts = {}) ⇒ NewBlockR

New Block Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a new block is mined in the specific blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. A new block is mined when it is added to the chain once a consensus is reached by the majority of the miners, which is when the block gets validated and added to the blockchain. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_block_rb (NewBlockRB)

Returns:



119
120
121
122
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 119

def new_block(blockchain, network, opts = {})
  data, _status_code, _headers = new_block_with_http_info(blockchain, network, opts)
  data
end

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

New Block Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a new block is mined in the specific blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. A new block is mined when it is added to the chain once a consensus is reached by the majority of the miners, which is when the block gets validated and added to the blockchain. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_block_rb (NewBlockRB)

Returns:

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

    NewBlockR data, response status code and response headers



132
133
134
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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 132

def new_block_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_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 CreateSubscriptionsForApi.new_block"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "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 CreateSubscriptionsForApi.new_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-events/{blockchain}/{network}/subscriptions/block-mined'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_block_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_coins_transactions(blockchain, network, opts = {}) ⇒ NewConfirmedCoinsTransactionsR

New confirmed coins transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer’s address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_coins_transactions_rb (NewConfirmedCoinsTransactionsRB)

Returns:



208
209
210
211
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 208

def new_confirmed_coins_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_coins_transactions_with_http_info(blockchain, network, opts)
  data
end

#new_confirmed_coins_transactions_and_each_confirmation(blockchain, network, opts = {}) ⇒ NewConfirmedCoinsTransactionsAndEachConfirmationR

New confirmed coins transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer’s address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **coins transactions only, not tokens**. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_coins_transactions_and_each_confirmation_rb (NewConfirmedCoinsTransactionsAndEachConfirmationRB)

Returns:



297
298
299
300
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 297

def new_confirmed_coins_transactions_and_each_confirmation(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_coins_transactions_and_each_confirmation_with_http_info(blockchain, network, opts)
  data
end

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

New confirmed coins transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer&#39;s address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **coins transactions only, not tokens**. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_coins_transactions_and_each_confirmation_rb (NewConfirmedCoinsTransactionsAndEachConfirmationRB)

Returns:



310
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/create_subscriptions_for_api.rb', line 310

def new_confirmed_coins_transactions_and_each_confirmation_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_coins_transactions_and_each_confirmation ...'
  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 CreateSubscriptionsForApi.new_confirmed_coins_transactions_and_each_confirmation"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "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 CreateSubscriptionsForApi.new_confirmed_coins_transactions_and_each_confirmation"
  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-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed-each-confirmation'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_coins_transactions_and_each_confirmation_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_coins_transactions_and_each_confirmation",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_coins_transactions_and_each_confirmation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_coins_transactions_for_specific_amount(blockchain, network, opts = {}) ⇒ NewConfirmedCoinsTransactionsForSpecificAmountR

New Confirmed Coins Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and "amountHigherThan" value. In this case the event is when there are new incoming or outgoing confirmed coins transactions for the specified blockchain and the amount is equal or higher than the value specified. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs filtered for the specified amount. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block.

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.

  • :new_confirmed_coins_transactions_for_specific_amount_rb (NewConfirmedCoinsTransactionsForSpecificAmountRB)

Returns:



386
387
388
389
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 386

def new_confirmed_coins_transactions_for_specific_amount(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_coins_transactions_for_specific_amount_with_http_info(blockchain, network, opts)
  data
end

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

New Confirmed Coins Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and &quot;amountHigherThan&quot; value. In this case the event is when there are new incoming or outgoing confirmed coins transactions for the specified blockchain and the amount is equal or higher than the value specified. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs filtered for the specified amount. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block.

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.

  • :new_confirmed_coins_transactions_for_specific_amount_rb (NewConfirmedCoinsTransactionsForSpecificAmountRB)

Returns:



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
459
460
461
462
463
464
465
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 399

def new_confirmed_coins_transactions_for_specific_amount_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_coins_transactions_for_specific_amount ...'
  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 CreateSubscriptionsForApi.new_confirmed_coins_transactions_for_specific_amount"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "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 CreateSubscriptionsForApi.new_confirmed_coins_transactions_for_specific_amount"
  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-events/{blockchain}/{network}/subscriptions/coins-transactions-for-specific-amount'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_coins_transactions_for_specific_amount_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_coins_transactions_for_specific_amount",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_coins_transactions_for_specific_amount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

New confirmed coins transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer&#39;s address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_coins_transactions_rb (NewConfirmedCoinsTransactionsRB)

Returns:



221
222
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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 221

def new_confirmed_coins_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_coins_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 CreateSubscriptionsForApi.new_confirmed_coins_transactions"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "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 CreateSubscriptionsForApi.new_confirmed_coins_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-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_coins_transactions_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_coins_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_coins_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_internal_transactions(blockchain, network, opts = {}) ⇒ NewConfirmedInternalTransactionsR

New confirmed internal transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. Being confirmed means that the transactions are verified by miners and added to the next block. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_internal_transactions_rb (NewConfirmedInternalTransactionsRB)

Returns:



475
476
477
478
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 475

def new_confirmed_internal_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_internal_transactions_with_http_info(blockchain, network, opts)
  data
end

#new_confirmed_internal_transactions_and_each_confirmation(blockchain, network, opts = {}) ⇒ NewConfirmedInternalTransactionsAndEachConfirmationR

New confirmed internal transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. Includes also a response at each confirmation the transaction receives until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. Being confirmed means that the transactions are verified by miners and added to the next block. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_internal_transactions_and_each_confirmation_rb (NewConfirmedInternalTransactionsAndEachConfirmationRB)

Returns:



564
565
566
567
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 564

def new_confirmed_internal_transactions_and_each_confirmation(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_internal_transactions_and_each_confirmation_with_http_info(blockchain, network, opts)
  data
end

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

New confirmed internal transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. Includes also a response at each confirmation the transaction receives until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. Being confirmed means that the transactions are verified by miners and added to the next block. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_internal_transactions_and_each_confirmation_rb (NewConfirmedInternalTransactionsAndEachConfirmationRB)

Returns:



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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 577

def new_confirmed_internal_transactions_and_each_confirmation_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_internal_transactions_and_each_confirmation ...'
  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 CreateSubscriptionsForApi.new_confirmed_internal_transactions_and_each_confirmation"
  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 CreateSubscriptionsForApi.new_confirmed_internal_transactions_and_each_confirmation"
  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-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed-each-confirmation'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_internal_transactions_and_each_confirmation_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_internal_transactions_and_each_confirmation",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_internal_transactions_and_each_confirmation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_internal_transactions_for_specific_amount(blockchain, network, opts = {}) ⇒ NewConfirmedInternalTransactionsForSpecificAmountR

New Confirmed Internal Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and "amountHigherThan" value. In this case the event is when there are new confirmed internal transactions and the amount is equal or higher than a value, specified by the customer. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs, filtered for the specified amount. Being confirmed means that the transactions are verified by miners and added to the next block

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.

  • :new_confirmed_internal_transactions_for_specific_amount_rb (NewConfirmedInternalTransactionsForSpecificAmountRB)

Returns:



653
654
655
656
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 653

def new_confirmed_internal_transactions_for_specific_amount(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_internal_transactions_for_specific_amount_with_http_info(blockchain, network, opts)
  data
end

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

New Confirmed Internal Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and &quot;amountHigherThan&quot; value. In this case the event is when there are new confirmed internal transactions and the amount is equal or higher than a value, specified by the customer. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs, filtered for the specified amount. Being confirmed means that the transactions are verified by miners and added to the next block

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.

  • :new_confirmed_internal_transactions_for_specific_amount_rb (NewConfirmedInternalTransactionsForSpecificAmountRB)

Returns:



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
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 666

def new_confirmed_internal_transactions_for_specific_amount_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_internal_transactions_for_specific_amount ...'
  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 CreateSubscriptionsForApi.new_confirmed_internal_transactions_for_specific_amount"
  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 CreateSubscriptionsForApi.new_confirmed_internal_transactions_for_specific_amount"
  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-events/{blockchain}/{network}/subscriptions/internal-transactions-for-specific-amount'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_internal_transactions_for_specific_amount_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_internal_transactions_for_specific_amount",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_internal_transactions_for_specific_amount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

New confirmed internal transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. Being confirmed means that the transactions are verified by miners and added to the next block. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_internal_transactions_rb (NewConfirmedInternalTransactionsRB)

Returns:



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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 488

def new_confirmed_internal_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_internal_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 CreateSubscriptionsForApi.new_confirmed_internal_transactions"
  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 CreateSubscriptionsForApi.new_confirmed_internal_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-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_internal_transactions_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_internal_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_internal_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_token_transactions_for_specific_amount(blockchain, network, opts = {}) ⇒ NewConfirmedTokenTransactionsForSpecificAmountR

New Confirmed Token Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and "amountHigherThan" value. In this case the event is when there are new incoming or outgoing confirmed token transactions for the specified blockchain and the amount is equal or higher than the value specified. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs, filtered for the specified amount. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to tokens transactions only, not 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.

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

  • :new_confirmed_token_transactions_for_specific_amount_rb (NewConfirmedTokenTransactionsForSpecificAmountRB)

Returns:



742
743
744
745
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 742

def new_confirmed_token_transactions_for_specific_amount(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_token_transactions_for_specific_amount_with_http_info(blockchain, network, opts)
  data
end

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

New Confirmed Token Transactions For Specific Amount Through this endpoint customers can create callback subscriptions for a specific event and &quot;amountHigherThan&quot; value. In this case the event is when there are new incoming or outgoing confirmed token transactions for the specified blockchain and the amount is equal or higher than the value specified. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs, filtered for the specified amount. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to tokens transactions only, not 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.

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

  • :new_confirmed_token_transactions_for_specific_amount_rb (NewConfirmedTokenTransactionsForSpecificAmountRB)

Returns:



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
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 755

def new_confirmed_token_transactions_for_specific_amount_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_token_transactions_for_specific_amount ...'
  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 CreateSubscriptionsForApi.new_confirmed_token_transactions_for_specific_amount"
  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 CreateSubscriptionsForApi.new_confirmed_token_transactions_for_specific_amount"
  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-events/{blockchain}/{network}/subscriptions/tokens-transfers-for-specific-amount'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_token_transactions_for_specific_amount_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_token_transactions_for_specific_amount",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_token_transactions_for_specific_amount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_confirmed_tokens_transactions(blockchain, network, opts = {}) ⇒ NewConfirmedTokensTransactionsR

New confirmed tokens transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer’s address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_tokens_transactions_rb (NewConfirmedTokensTransactionsRB)

Returns:



831
832
833
834
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 831

def new_confirmed_tokens_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_tokens_transactions_with_http_info(blockchain, network, opts)
  data
end

#new_confirmed_tokens_transactions_and_each_confirmation(blockchain, network, opts = {}) ⇒ NewConfirmedTokensTransactionsAndEachConfirmationR

New confirmed tokens transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer’s address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_tokens_transactions_and_each_confirmation_rb (NewConfirmedTokensTransactionsAndEachConfirmationRB)

Returns:



920
921
922
923
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 920

def new_confirmed_tokens_transactions_and_each_confirmation(blockchain, network, opts = {})
  data, _status_code, _headers = new_confirmed_tokens_transactions_and_each_confirmation_with_http_info(blockchain, network, opts)
  data
end

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

New confirmed tokens transactions and each confirmation Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer&#39;s address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_tokens_transactions_and_each_confirmation_rb (NewConfirmedTokensTransactionsAndEachConfirmationRB)

Returns:



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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 933

def new_confirmed_tokens_transactions_and_each_confirmation_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_tokens_transactions_and_each_confirmation ...'
  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 CreateSubscriptionsForApi.new_confirmed_tokens_transactions_and_each_confirmation"
  end
  # verify enum value
  allowable_values = ["bitcoin", "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 CreateSubscriptionsForApi.new_confirmed_tokens_transactions_and_each_confirmation"
  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-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed-each-confirmation'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_tokens_transactions_and_each_confirmation_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_tokens_transactions_and_each_confirmation",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_tokens_transactions_and_each_confirmation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

New confirmed tokens transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer&#39;s address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_confirmed_tokens_transactions_rb (NewConfirmedTokensTransactionsRB)

Returns:



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
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 844

def new_confirmed_tokens_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_confirmed_tokens_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 CreateSubscriptionsForApi.new_confirmed_tokens_transactions"
  end
  # verify enum value
  allowable_values = ["bitcoin", "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 CreateSubscriptionsForApi.new_confirmed_tokens_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-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_confirmed_tokens_transactions_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_confirmed_tokens_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_confirmed_tokens_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_unconfirmed_coins_transactions(blockchain, network, opts = {}) ⇒ NewUnconfirmedCoinsTransactionsR

New unconfirmed coins transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed coins transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Unconfirmed coins transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note warningWe cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets./warning noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note noteIt is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn’t necessarily** mean they will get confirmed./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_unconfirmed_coins_transactions_rb (NewUnconfirmedCoinsTransactionsRB)

Returns:



1009
1010
1011
1012
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 1009

def new_unconfirmed_coins_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = new_unconfirmed_coins_transactions_with_http_info(blockchain, network, opts)
  data
end

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

New unconfirmed coins transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed coins transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Unconfirmed coins transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations. noteFor UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that./note warningWe cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets./warning noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note noteIt is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn&#39;t necessarily** mean they will get confirmed./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_unconfirmed_coins_transactions_rb (NewUnconfirmedCoinsTransactionsRB)

Returns:



1022
1023
1024
1025
1026
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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 1022

def new_unconfirmed_coins_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_unconfirmed_coins_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 CreateSubscriptionsForApi.new_unconfirmed_coins_transactions"
  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 CreateSubscriptionsForApi.new_unconfirmed_coins_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-events/{blockchain}/{network}/subscriptions/address-coins-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?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_unconfirmed_coins_transactions_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_unconfirmed_coins_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_unconfirmed_coins_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_unconfirmed_tokens_transactions(blockchain, network, opts = {}) ⇒ NewUnconfirmedTokensTransactionsR

New unconfirmed tokens transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed tokens transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Unconfirmed tokens transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations. warningWe cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets./warning noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note noteIt is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn’t necessarily** mean they will get confirmed./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_unconfirmed_tokens_transactions_rb (NewUnconfirmedTokensTransactionsRB)

Returns:



1098
1099
1100
1101
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 1098

def new_unconfirmed_tokens_transactions(blockchain, network, opts = {})
  data, _status_code, _headers = new_unconfirmed_tokens_transactions_with_http_info(blockchain, network, opts)
  data
end

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

New unconfirmed tokens transactions Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed tokens transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. Unconfirmed tokens transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations. warningWe cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets./warning noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note noteIt is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn&#39;t necessarily** mean they will get confirmed./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

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.

  • :new_unconfirmed_tokens_transactions_rb (NewUnconfirmedTokensTransactionsRB)

Returns:



1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
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
# File 'lib/crypto_apis/api/create_subscriptions_for_api.rb', line 1111

def new_unconfirmed_tokens_transactions_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CreateSubscriptionsForApi.new_unconfirmed_tokens_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 CreateSubscriptionsForApi.new_unconfirmed_tokens_transactions"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum", "ethereum-classic"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling CreateSubscriptionsForApi.new_unconfirmed_tokens_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-events/{blockchain}/{network}/subscriptions/address-tokens-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?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'new_unconfirmed_tokens_transactions_rb'])

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

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

  new_options = opts.merge(
    :operation => :"CreateSubscriptionsForApi.new_unconfirmed_tokens_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreateSubscriptionsForApi#new_unconfirmed_tokens_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end