automation-test 1.16 → 1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -29
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/api_helper.rb +2 -2
- data/lib/apimatic_calculator_test/client.rb +35 -0
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/configuration.rb +4 -3
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/controllers/base_controller.rb +2 -2
- data/lib/apimatic_calculator_test/controllers/simple_calculator_controller.rb +53 -0
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/exceptions/api_exception.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/faraday_client.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/http_call_back.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/http_client.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/http_method_enum.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/http_request.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/http/http_response.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/models/base_model.rb +2 -2
- data/lib/apimatic_calculator_test/models/operation_type_enum.rb +23 -0
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/utilities/date_time_helper.rb +2 -2
- data/lib/{coin_gecko_apiv3 → apimatic_calculator_test}/utilities/file_wrapper.rb +2 -2
- data/lib/apimatic_calculator_test.rb +39 -0
- metadata +20 -85
- data/lib/coin_gecko_apiv3/client.rb +0 -125
- data/lib/coin_gecko_apiv3/controllers/asset_platforms_controller.rb +0 -29
- data/lib/coin_gecko_apiv3/controllers/categories_controller.rb +0 -52
- data/lib/coin_gecko_apiv3/controllers/coins_controller.rb +0 -389
- data/lib/coin_gecko_apiv3/controllers/companies_beta_controller.rb +0 -35
- data/lib/coin_gecko_apiv3/controllers/contract_controller.rb +0 -119
- data/lib/coin_gecko_apiv3/controllers/derivatives_controller.rb +0 -112
- data/lib/coin_gecko_apiv3/controllers/events_controller.rb +0 -89
- data/lib/coin_gecko_apiv3/controllers/exchange_rates_controller.rb +0 -29
- data/lib/coin_gecko_apiv3/controllers/exchanges_controller.rb +0 -192
- data/lib/coin_gecko_apiv3/controllers/finance_controller.rb +0 -71
- data/lib/coin_gecko_apiv3/controllers/global_controller.rb +0 -29
- data/lib/coin_gecko_apiv3/controllers/indexes_controller.rb +0 -79
- data/lib/coin_gecko_apiv3/controllers/ping_controller.rb +0 -29
- data/lib/coin_gecko_apiv3/controllers/simple_controller.rb +0 -126
- data/lib/coin_gecko_apiv3/controllers/status_updates_controller.rb +0 -48
- data/lib/coin_gecko_apiv3/controllers/trending_controller.rb +0 -30
- data/lib/coin_gecko_apiv3.rb +0 -52
- data/test/controllers/controller_test_base.rb +0 -21
- data/test/controllers/test_asset_platforms_controller.rb +0 -25
- data/test/controllers/test_categories_controller.rb +0 -37
- data/test/controllers/test_coins_controller.rb +0 -27
- data/test/controllers/test_derivatives_controller.rb +0 -51
- data/test/controllers/test_events_controller.rb +0 -55
- data/test/controllers/test_exchange_rates_controller.rb +0 -26
- data/test/controllers/test_exchanges_controller.rb +0 -38
- data/test/controllers/test_finance_controller.rb +0 -43
- data/test/controllers/test_global_controller.rb +0 -26
- data/test/controllers/test_indexes_controller.rb +0 -38
- data/test/controllers/test_ping_controller.rb +0 -26
- data/test/controllers/test_simple_controller.rb +0 -25
- data/test/controllers/test_status_updates_controller.rb +0 -31
- data/test/controllers/test_trending_controller.rb +0 -25
- data/test/http_response_catcher.rb +0 -19
- data/test/test_helper.rb +0 -94
@@ -1,119 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# ContractController
|
8
|
-
class ContractController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Get coin info from contract address
|
14
|
-
# @param [String] id Required parameter: Asset platform (See asset_platforms
|
15
|
-
# endpoint for list of options)
|
16
|
-
# @param [String] contract_address Required parameter: Token's contract
|
17
|
-
# address
|
18
|
-
# @return [void] response from the API call
|
19
|
-
def getcoininfofromcontractaddress(id,
|
20
|
-
contract_address)
|
21
|
-
# Prepare query url.
|
22
|
-
_query_builder = config.get_base_uri
|
23
|
-
_query_builder << '/coins/{id}/contract/{contract_address}'
|
24
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
25
|
-
_query_builder,
|
26
|
-
'id' => { 'value' => id, 'encode' => true },
|
27
|
-
'contract_address' => { 'value' => contract_address, 'encode' => true }
|
28
|
-
)
|
29
|
-
_query_url = APIHelper.clean_url _query_builder
|
30
|
-
|
31
|
-
# Prepare and execute HttpRequest.
|
32
|
-
_request = config.http_client.get(
|
33
|
-
_query_url
|
34
|
-
)
|
35
|
-
_response = execute_request(_request)
|
36
|
-
validate_response(_response)
|
37
|
-
end
|
38
|
-
|
39
|
-
# Get historical market data include price, market cap, and 24h volume
|
40
|
-
# (granularity auto)
|
41
|
-
# @param [String] id Required parameter: The id of the platform issuing
|
42
|
-
# tokens (See asset_platforms endpoint for list of options)
|
43
|
-
# @param [String] contract_address Required parameter: Token's contract
|
44
|
-
# address
|
45
|
-
# @param [String] vs_currency Required parameter: The target currency of
|
46
|
-
# market data (usd, eur, jpy, etc.)
|
47
|
-
# @param [String] days Required parameter: Data up to number of days ago
|
48
|
-
# (eg. 1,14,30,max)
|
49
|
-
# @return [void] response from the API call
|
50
|
-
def gethistoricalmarketdataincludeprice_marketcap_and24hvolume_granularityauto_fromacontractaddress(id,
|
51
|
-
contract_address,
|
52
|
-
vs_currency,
|
53
|
-
days)
|
54
|
-
# Prepare query url.
|
55
|
-
_query_builder = config.get_base_uri
|
56
|
-
_query_builder << '/coins/{id}/contract/{contract_address}/market_chart/'
|
57
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
58
|
-
_query_builder,
|
59
|
-
'id' => { 'value' => id, 'encode' => true },
|
60
|
-
'contract_address' => { 'value' => contract_address, 'encode' => true }
|
61
|
-
)
|
62
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
63
|
-
_query_builder,
|
64
|
-
'vs_currency' => vs_currency,
|
65
|
-
'days' => days
|
66
|
-
)
|
67
|
-
_query_url = APIHelper.clean_url _query_builder
|
68
|
-
|
69
|
-
# Prepare and execute HttpRequest.
|
70
|
-
_request = config.http_client.get(
|
71
|
-
_query_url
|
72
|
-
)
|
73
|
-
_response = execute_request(_request)
|
74
|
-
validate_response(_response)
|
75
|
-
end
|
76
|
-
|
77
|
-
# Get historical market data include price, market cap, and 24h volume
|
78
|
-
# within a range of timestamp (granularity auto)
|
79
|
-
# @param [String] id Required parameter: The id of the platform issuing
|
80
|
-
# tokens (See asset_platforms endpoint for list of options)
|
81
|
-
# @param [String] contract_address Required parameter: Token's contract
|
82
|
-
# address
|
83
|
-
# @param [String] vs_currency Required parameter: The target currency of
|
84
|
-
# market data (usd, eur, jpy, etc.)
|
85
|
-
# @param [String] from Required parameter: From date in UNIX Timestamp (eg.
|
86
|
-
# 1392577232)
|
87
|
-
# @param [String] to Required parameter: To date in UNIX Timestamp (eg.
|
88
|
-
# 1422577232)
|
89
|
-
# @return [void] response from the API call
|
90
|
-
def gethistoricalmarketdataincludeprice_marketcap_and24hvolumewithinarangeoftimestamp_granularityauto_fromacontractaddress(id,
|
91
|
-
contract_address,
|
92
|
-
vs_currency,
|
93
|
-
from,
|
94
|
-
to)
|
95
|
-
# Prepare query url.
|
96
|
-
_query_builder = config.get_base_uri
|
97
|
-
_query_builder << '/coins/{id}/contract/{contract_address}/market_chart/range'
|
98
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
99
|
-
_query_builder,
|
100
|
-
'id' => { 'value' => id, 'encode' => true },
|
101
|
-
'contract_address' => { 'value' => contract_address, 'encode' => true }
|
102
|
-
)
|
103
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
104
|
-
_query_builder,
|
105
|
-
'vs_currency' => vs_currency,
|
106
|
-
'from' => from,
|
107
|
-
'to' => to
|
108
|
-
)
|
109
|
-
_query_url = APIHelper.clean_url _query_builder
|
110
|
-
|
111
|
-
# Prepare and execute HttpRequest.
|
112
|
-
_request = config.http_client.get(
|
113
|
-
_query_url
|
114
|
-
)
|
115
|
-
_response = execute_request(_request)
|
116
|
-
validate_response(_response)
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
@@ -1,112 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# DerivativesController
|
8
|
-
class DerivativesController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# List all derivative tickers
|
14
|
-
# @param [String] include_tickers Optional parameter: ['all', 'unexpired'] -
|
15
|
-
# expired to show unexpired tickers, all to list all tickers, defaults to
|
16
|
-
# unexpired
|
17
|
-
# @return [void] response from the API call
|
18
|
-
def listallderivativetickers(include_tickers: nil)
|
19
|
-
# Prepare query url.
|
20
|
-
_query_builder = config.get_base_uri
|
21
|
-
_query_builder << '/derivatives'
|
22
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
23
|
-
_query_builder,
|
24
|
-
'include_tickers' => include_tickers
|
25
|
-
)
|
26
|
-
_query_url = APIHelper.clean_url _query_builder
|
27
|
-
|
28
|
-
# Prepare and execute HttpRequest.
|
29
|
-
_request = config.http_client.get(
|
30
|
-
_query_url
|
31
|
-
)
|
32
|
-
_response = execute_request(_request)
|
33
|
-
validate_response(_response)
|
34
|
-
end
|
35
|
-
|
36
|
-
# List all derivative exchanges
|
37
|
-
# @param [String] order Optional parameter: order results using following
|
38
|
-
# params
|
39
|
-
# name_asc,name_desc,open_interest_btc_asc,open_interest_btc_desc,trade_volu
|
40
|
-
# me_24h_btc_asc,trade_volume_24h_btc_desc
|
41
|
-
# @param [Integer] per_page Optional parameter: Total results per page
|
42
|
-
# @param [Integer] page Optional parameter: Page through results
|
43
|
-
# @return [void] response from the API call
|
44
|
-
def listallderivativeexchanges(order: nil,
|
45
|
-
per_page: nil,
|
46
|
-
page: nil)
|
47
|
-
# Prepare query url.
|
48
|
-
_query_builder = config.get_base_uri
|
49
|
-
_query_builder << '/derivatives/exchanges'
|
50
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
51
|
-
_query_builder,
|
52
|
-
'order' => order,
|
53
|
-
'per_page' => per_page,
|
54
|
-
'page' => page
|
55
|
-
)
|
56
|
-
_query_url = APIHelper.clean_url _query_builder
|
57
|
-
|
58
|
-
# Prepare and execute HttpRequest.
|
59
|
-
_request = config.http_client.get(
|
60
|
-
_query_url
|
61
|
-
)
|
62
|
-
_response = execute_request(_request)
|
63
|
-
validate_response(_response)
|
64
|
-
end
|
65
|
-
|
66
|
-
# show derivative exchange data
|
67
|
-
# @param [String] id Required parameter: pass the exchange id (can be
|
68
|
-
# obtained from derivatives/exchanges/list) eg. bitmex
|
69
|
-
# @param [String] include_tickers Optional parameter: ['all', 'unexpired'] -
|
70
|
-
# expired to show unexpired tickers, all to list all tickers, leave blank to
|
71
|
-
# omit tickers data in response
|
72
|
-
# @return [void] response from the API call
|
73
|
-
def showderivativeexchangedata(id,
|
74
|
-
include_tickers: nil)
|
75
|
-
# Prepare query url.
|
76
|
-
_query_builder = config.get_base_uri
|
77
|
-
_query_builder << '/derivatives/exchanges/{id}'
|
78
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
79
|
-
_query_builder,
|
80
|
-
'id' => { 'value' => id, 'encode' => true }
|
81
|
-
)
|
82
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
83
|
-
_query_builder,
|
84
|
-
'include_tickers' => include_tickers
|
85
|
-
)
|
86
|
-
_query_url = APIHelper.clean_url _query_builder
|
87
|
-
|
88
|
-
# Prepare and execute HttpRequest.
|
89
|
-
_request = config.http_client.get(
|
90
|
-
_query_url
|
91
|
-
)
|
92
|
-
_response = execute_request(_request)
|
93
|
-
validate_response(_response)
|
94
|
-
end
|
95
|
-
|
96
|
-
# List all derivative exchanges name and identifier
|
97
|
-
# @return [void] response from the API call
|
98
|
-
def listallderivativeexchangesnameandidentifier
|
99
|
-
# Prepare query url.
|
100
|
-
_query_builder = config.get_base_uri
|
101
|
-
_query_builder << '/derivatives/exchanges/list'
|
102
|
-
_query_url = APIHelper.clean_url _query_builder
|
103
|
-
|
104
|
-
# Prepare and execute HttpRequest.
|
105
|
-
_request = config.http_client.get(
|
106
|
-
_query_url
|
107
|
-
)
|
108
|
-
_response = execute_request(_request)
|
109
|
-
validate_response(_response)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# EventsController
|
8
|
-
class EventsController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Get events, paginated by 100
|
14
|
-
# @param [String] country_code Optional parameter: country_code of event
|
15
|
-
# (eg. 'US'). use <b>/api/v3/events/countries</b> for list of
|
16
|
-
# country_codes
|
17
|
-
# @param [String] type Optional parameter: type of event (eg. 'Conference').
|
18
|
-
# use <b>/api/v3/events/types</b> for list of types
|
19
|
-
# @param [String] page Optional parameter: page of results (paginated by
|
20
|
-
# 100)
|
21
|
-
# @param [String] upcoming_events_only Optional parameter: lists only
|
22
|
-
# upcoming events. <br>true, false</br> (defaults to true, set to false to
|
23
|
-
# list all events)
|
24
|
-
# @param [String] from_date Optional parameter: lists events after this date
|
25
|
-
# yyyy-mm-dd
|
26
|
-
# @param [String] to_date Optional parameter: lists events before this date
|
27
|
-
# yyyy-mm-dd (set upcoming_events_only to false if fetching past events)
|
28
|
-
# @return [void] response from the API call
|
29
|
-
def getevents_paginatedby100(country_code: nil,
|
30
|
-
type: nil,
|
31
|
-
page: nil,
|
32
|
-
upcoming_events_only: nil,
|
33
|
-
from_date: nil,
|
34
|
-
to_date: nil)
|
35
|
-
# Prepare query url.
|
36
|
-
_query_builder = config.get_base_uri
|
37
|
-
_query_builder << '/events'
|
38
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
39
|
-
_query_builder,
|
40
|
-
'country_code' => country_code,
|
41
|
-
'type' => type,
|
42
|
-
'page' => page,
|
43
|
-
'upcoming_events_only' => upcoming_events_only,
|
44
|
-
'from_date' => from_date,
|
45
|
-
'to_date' => to_date
|
46
|
-
)
|
47
|
-
_query_url = APIHelper.clean_url _query_builder
|
48
|
-
|
49
|
-
# Prepare and execute HttpRequest.
|
50
|
-
_request = config.http_client.get(
|
51
|
-
_query_url
|
52
|
-
)
|
53
|
-
_response = execute_request(_request)
|
54
|
-
validate_response(_response)
|
55
|
-
end
|
56
|
-
|
57
|
-
# Get list of event countries
|
58
|
-
# @return [void] response from the API call
|
59
|
-
def getlistofeventcountries
|
60
|
-
# Prepare query url.
|
61
|
-
_query_builder = config.get_base_uri
|
62
|
-
_query_builder << '/events/countries'
|
63
|
-
_query_url = APIHelper.clean_url _query_builder
|
64
|
-
|
65
|
-
# Prepare and execute HttpRequest.
|
66
|
-
_request = config.http_client.get(
|
67
|
-
_query_url
|
68
|
-
)
|
69
|
-
_response = execute_request(_request)
|
70
|
-
validate_response(_response)
|
71
|
-
end
|
72
|
-
|
73
|
-
# Get list of event types
|
74
|
-
# @return [void] response from the API call
|
75
|
-
def getlistofeventstypes
|
76
|
-
# Prepare query url.
|
77
|
-
_query_builder = config.get_base_uri
|
78
|
-
_query_builder << '/events/types'
|
79
|
-
_query_url = APIHelper.clean_url _query_builder
|
80
|
-
|
81
|
-
# Prepare and execute HttpRequest.
|
82
|
-
_request = config.http_client.get(
|
83
|
-
_query_url
|
84
|
-
)
|
85
|
-
_response = execute_request(_request)
|
86
|
-
validate_response(_response)
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# ExchangeRatesController
|
8
|
-
class ExchangeRatesController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Get BTC-to-Currency exchange rates
|
14
|
-
# @return [void] response from the API call
|
15
|
-
def get_btc_to_currencyexchangerates
|
16
|
-
# Prepare query url.
|
17
|
-
_query_builder = config.get_base_uri
|
18
|
-
_query_builder << '/exchange_rates'
|
19
|
-
_query_url = APIHelper.clean_url _query_builder
|
20
|
-
|
21
|
-
# Prepare and execute HttpRequest.
|
22
|
-
_request = config.http_client.get(
|
23
|
-
_query_url
|
24
|
-
)
|
25
|
-
_response = execute_request(_request)
|
26
|
-
validate_response(_response)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,192 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# ExchangesController
|
8
|
-
class ExchangesController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# List all exchanges
|
14
|
-
# @param [Integer] per_page Optional parameter: Valid values: 1...250 Total
|
15
|
-
# results per page Default value:: 100
|
16
|
-
# @param [String] page Optional parameter: page through results
|
17
|
-
# @return [void] response from the API call
|
18
|
-
def listallexchanges(per_page: nil,
|
19
|
-
page: nil)
|
20
|
-
# Prepare query url.
|
21
|
-
_query_builder = config.get_base_uri
|
22
|
-
_query_builder << '/exchanges'
|
23
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
24
|
-
_query_builder,
|
25
|
-
'per_page' => per_page,
|
26
|
-
'page' => page
|
27
|
-
)
|
28
|
-
_query_url = APIHelper.clean_url _query_builder
|
29
|
-
|
30
|
-
# Prepare and execute HttpRequest.
|
31
|
-
_request = config.http_client.get(
|
32
|
-
_query_url
|
33
|
-
)
|
34
|
-
_response = execute_request(_request)
|
35
|
-
validate_response(_response)
|
36
|
-
end
|
37
|
-
|
38
|
-
# Use this to obtain all the markets' id in order to make API calls
|
39
|
-
# @return [void] response from the API call
|
40
|
-
def listallsupportedmarketsidandname_nopaginationrequired
|
41
|
-
# Prepare query url.
|
42
|
-
_query_builder = config.get_base_uri
|
43
|
-
_query_builder << '/exchanges/list'
|
44
|
-
_query_url = APIHelper.clean_url _query_builder
|
45
|
-
|
46
|
-
# Prepare and execute HttpRequest.
|
47
|
-
_request = config.http_client.get(
|
48
|
-
_query_url
|
49
|
-
)
|
50
|
-
_response = execute_request(_request)
|
51
|
-
validate_response(_response)
|
52
|
-
end
|
53
|
-
|
54
|
-
# Get exchange volume in BTC and tickers<br><br> **IMPORTANT**:
|
55
|
-
# Ticker object is limited to 100 items, to get more tickers, use
|
56
|
-
# `/exchanges/{id}/tickers`
|
57
|
-
# Ticker `is_stale` is true when ticker that has not been updated/unchanged
|
58
|
-
# from the exchange for a while.
|
59
|
-
# Ticker `is_anomaly` is true if ticker's price is outliered by our system.
|
60
|
-
# You are responsible for managing how you want to display these
|
61
|
-
# information (e.g. footnote, different background, change opacity, hide)
|
62
|
-
# @param [String] id Required parameter: pass the exchange id (can be
|
63
|
-
# obtained from /exchanges/list) eg. binance
|
64
|
-
# @return [void] response from the API call
|
65
|
-
def getexchangevolumein_bt_candtop100tickersonly(id)
|
66
|
-
# Prepare query url.
|
67
|
-
_query_builder = config.get_base_uri
|
68
|
-
_query_builder << '/exchanges/{id}'
|
69
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
70
|
-
_query_builder,
|
71
|
-
'id' => { 'value' => id, 'encode' => true }
|
72
|
-
)
|
73
|
-
_query_url = APIHelper.clean_url _query_builder
|
74
|
-
|
75
|
-
# Prepare and execute HttpRequest.
|
76
|
-
_request = config.http_client.get(
|
77
|
-
_query_url
|
78
|
-
)
|
79
|
-
_response = execute_request(_request)
|
80
|
-
validate_response(_response)
|
81
|
-
end
|
82
|
-
|
83
|
-
# Get exchange tickers (paginated)<br><br> **IMPORTANT**:
|
84
|
-
# Ticker `is_stale` is true when ticker that has not been updated/unchanged
|
85
|
-
# from the exchange for a while.
|
86
|
-
# Ticker `is_anomaly` is true if ticker's price is outliered by our system.
|
87
|
-
# You are responsible for managing how you want to display these
|
88
|
-
# information (e.g. footnote, different background, change opacity, hide)
|
89
|
-
# @param [String] id Required parameter: pass the exchange id (can be
|
90
|
-
# obtained from /exchanges/list) eg. binance
|
91
|
-
# @param [String] coin_ids Optional parameter: filter tickers by coin_ids
|
92
|
-
# (ref: v3/coins/list)
|
93
|
-
# @param [String] include_exchange_logo Optional parameter: flag to show
|
94
|
-
# exchange_logo
|
95
|
-
# @param [Integer] page Optional parameter: Page through results
|
96
|
-
# @param [String] depth Optional parameter: flag to show 2% orderbook depth
|
97
|
-
# i.e., cost_to_move_up_usd and cost_to_move_down_usd
|
98
|
-
# @param [String] order Optional parameter: valid values:
|
99
|
-
# <b>trust_score_desc (default), trust_score_asc and volume_desc</b>
|
100
|
-
# @return [void] response from the API call
|
101
|
-
def getexchangetickers_paginated_100tickersperpage(id,
|
102
|
-
coin_ids: nil,
|
103
|
-
include_exchange_logo: nil,
|
104
|
-
page: nil,
|
105
|
-
depth: nil,
|
106
|
-
order: nil)
|
107
|
-
# Prepare query url.
|
108
|
-
_query_builder = config.get_base_uri
|
109
|
-
_query_builder << '/exchanges/{id}/tickers'
|
110
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
111
|
-
_query_builder,
|
112
|
-
'id' => { 'value' => id, 'encode' => true }
|
113
|
-
)
|
114
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
115
|
-
_query_builder,
|
116
|
-
'coin_ids' => coin_ids,
|
117
|
-
'include_exchange_logo' => include_exchange_logo,
|
118
|
-
'page' => page,
|
119
|
-
'depth' => depth,
|
120
|
-
'order' => order
|
121
|
-
)
|
122
|
-
_query_url = APIHelper.clean_url _query_builder
|
123
|
-
|
124
|
-
# Prepare and execute HttpRequest.
|
125
|
-
_request = config.http_client.get(
|
126
|
-
_query_url
|
127
|
-
)
|
128
|
-
_response = execute_request(_request)
|
129
|
-
validate_response(_response)
|
130
|
-
end
|
131
|
-
|
132
|
-
# Get status updates for a given exchange
|
133
|
-
# @param [String] id Required parameter: pass the exchange id (can be
|
134
|
-
# obtained from /exchanges/list) eg. binance
|
135
|
-
# @param [Integer] per_page Optional parameter: Total results per page
|
136
|
-
# @param [Integer] page Optional parameter: Page through results
|
137
|
-
# @return [void] response from the API call
|
138
|
-
def getstatusupdatesforagivenexchange(id,
|
139
|
-
per_page: nil,
|
140
|
-
page: nil)
|
141
|
-
# Prepare query url.
|
142
|
-
_query_builder = config.get_base_uri
|
143
|
-
_query_builder << '/exchanges/{id}/status_updates'
|
144
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
145
|
-
_query_builder,
|
146
|
-
'id' => { 'value' => id, 'encode' => true }
|
147
|
-
)
|
148
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
149
|
-
_query_builder,
|
150
|
-
'per_page' => per_page,
|
151
|
-
'page' => page
|
152
|
-
)
|
153
|
-
_query_url = APIHelper.clean_url _query_builder
|
154
|
-
|
155
|
-
# Prepare and execute HttpRequest.
|
156
|
-
_request = config.http_client.get(
|
157
|
-
_query_url
|
158
|
-
)
|
159
|
-
_response = execute_request(_request)
|
160
|
-
validate_response(_response)
|
161
|
-
end
|
162
|
-
|
163
|
-
# Get volume_chart data for a given exchange
|
164
|
-
# @param [String] id Required parameter: pass the exchange id (can be
|
165
|
-
# obtained from /exchanges/list) eg. binance
|
166
|
-
# @param [Integer] days Required parameter: Data up to number of days ago
|
167
|
-
# (eg. 1,14,30)
|
168
|
-
# @return [void] response from the API call
|
169
|
-
def getvolume_chartdataforagivenexchange(id,
|
170
|
-
days)
|
171
|
-
# Prepare query url.
|
172
|
-
_query_builder = config.get_base_uri
|
173
|
-
_query_builder << '/exchanges/{id}/volume_chart'
|
174
|
-
_query_builder = APIHelper.append_url_with_template_parameters(
|
175
|
-
_query_builder,
|
176
|
-
'id' => { 'value' => id, 'encode' => true }
|
177
|
-
)
|
178
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
179
|
-
_query_builder,
|
180
|
-
'days' => days
|
181
|
-
)
|
182
|
-
_query_url = APIHelper.clean_url _query_builder
|
183
|
-
|
184
|
-
# Prepare and execute HttpRequest.
|
185
|
-
_request = config.http_client.get(
|
186
|
-
_query_url
|
187
|
-
)
|
188
|
-
_response = execute_request(_request)
|
189
|
-
validate_response(_response)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# FinanceController
|
8
|
-
class FinanceController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# List all finance platforms
|
14
|
-
# @param [Integer] per_page Optional parameter: Total results per page
|
15
|
-
# @param [String] page Optional parameter: page of results (paginated to 100
|
16
|
-
# by default)
|
17
|
-
# @return [void] response from the API call
|
18
|
-
def listallfinanceplatforms(per_page: nil,
|
19
|
-
page: nil)
|
20
|
-
# Prepare query url.
|
21
|
-
_query_builder = config.get_base_uri
|
22
|
-
_query_builder << '/finance_platforms'
|
23
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
24
|
-
_query_builder,
|
25
|
-
'per_page' => per_page,
|
26
|
-
'page' => page
|
27
|
-
)
|
28
|
-
_query_url = APIHelper.clean_url _query_builder
|
29
|
-
|
30
|
-
# Prepare and execute HttpRequest.
|
31
|
-
_request = config.http_client.get(
|
32
|
-
_query_url
|
33
|
-
)
|
34
|
-
_response = execute_request(_request)
|
35
|
-
validate_response(_response)
|
36
|
-
end
|
37
|
-
|
38
|
-
# List all finance products
|
39
|
-
# @param [Integer] per_page Optional parameter: Total results per page
|
40
|
-
# @param [String] page Optional parameter: page of results (paginated to 100
|
41
|
-
# by default)
|
42
|
-
# @param [String] start_at Optional parameter: start date of the financial
|
43
|
-
# products
|
44
|
-
# @param [String] end_at Optional parameter: end date of the financial
|
45
|
-
# products
|
46
|
-
# @return [void] response from the API call
|
47
|
-
def listallfinanceproducts(per_page: nil,
|
48
|
-
page: nil,
|
49
|
-
start_at: nil,
|
50
|
-
end_at: nil)
|
51
|
-
# Prepare query url.
|
52
|
-
_query_builder = config.get_base_uri
|
53
|
-
_query_builder << '/finance_products'
|
54
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
55
|
-
_query_builder,
|
56
|
-
'per_page' => per_page,
|
57
|
-
'page' => page,
|
58
|
-
'start_at' => start_at,
|
59
|
-
'end_at' => end_at
|
60
|
-
)
|
61
|
-
_query_url = APIHelper.clean_url _query_builder
|
62
|
-
|
63
|
-
# Prepare and execute HttpRequest.
|
64
|
-
_request = config.http_client.get(
|
65
|
-
_query_url
|
66
|
-
)
|
67
|
-
_response = execute_request(_request)
|
68
|
-
validate_response(_response)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# coin_gecko_apiv3
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module CoinGeckoApiv3
|
7
|
-
# GlobalController
|
8
|
-
class GlobalController < BaseController
|
9
|
-
def initialize(config, http_call_back: nil)
|
10
|
-
super(config, http_call_back: http_call_back)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Get cryptocurrency global data
|
14
|
-
# @return [void] response from the API call
|
15
|
-
def getcryptocurrencyglobaldata
|
16
|
-
# Prepare query url.
|
17
|
-
_query_builder = config.get_base_uri
|
18
|
-
_query_builder << '/global'
|
19
|
-
_query_url = APIHelper.clean_url _query_builder
|
20
|
-
|
21
|
-
# Prepare and execute HttpRequest.
|
22
|
-
_request = config.http_client.get(
|
23
|
-
_query_url
|
24
|
-
)
|
25
|
-
_response = execute_request(_request)
|
26
|
-
validate_response(_response)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|