aga-money 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +122 -0
- data/lib/money/autoloader.rb +41 -0
- data/lib/money/base.rb +11 -0
- data/lib/money/resources/arbitrage.rb +53 -0
- data/lib/money/resources/common.rb +34 -0
- data/lib/money/resources/helpers/controls/gain.rb +68 -0
- data/lib/money/resources/helpers/controls/validator.rb +82 -0
- data/lib/money/resources/helpers/format.rb +23 -0
- data/lib/money/resources/helpers/http_request.rb +44 -0
- data/lib/money/resources/new.rb +24 -0
- data/lib/money/resources/top.rb +26 -0
- data/lib/money/version.rb +5 -0
- data/lib/money.rb +34 -0
- metadata +266 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 985d910b923d6d96300ef35356028e1a5314c76c65103adba8a9cf76953331fa
|
4
|
+
data.tar.gz: e21714d8f50f0411e2ea79f3eb9bd993ff560962b88e6a2f0069d9d30fb17cd0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4f6d89ee5eb55ae2489bee5906bfe55022e418f927e9c24a455526550db1e13fd9b84e82b508161b80d9bbb2746b7b71385055f5823b774c8ed4bb08ad0dd71a
|
7
|
+
data.tar.gz: 35b4fd8ac2cfe1379e40d534b5ec4ccb7b6b5717589d6044a663a52f6df852ee0f534f01888f3b11bbf8e58d0de5f128ae2a534a5c865eee1560b980b42f10dc
|
data/README.md
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
# Aga-money
|
2
|
+
|
3
|
+
Aga-money is a Ruby gem that provides powerful functionalities for discovering new listed cryptocurrencies, identifying top gainers for trading opportunities, and finding cryptocurrencies suitable for arbitrage operations. It offers a comprehensive set of tools and data analysis capabilities to help cryptocurrency traders and enthusiasts stay ahead in the market.
|
4
|
+
|
5
|
+
|
6
|
+
## Features
|
7
|
+
|
8
|
+
- Discover newly listed cryptocurrencies on various exchanges, providing real-time updates on the latest additions to the market.
|
9
|
+
- Identify top gainers by analyzing price movements and percentage changes over specific time intervals, enabling traders to capitalize on profitable opportunities.
|
10
|
+
- Perform in-depth analysis on market data, including historical price trends, trading volumes, and market capitalization of cryptocurrencies.
|
11
|
+
- Evaluate arbitrage opportunities by comparing prices across different exchanges and identifying price disparities that can be exploited for profit.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Install the gem and add to the application's Gemfile by executing:
|
16
|
+
|
17
|
+
$ bundle add aga-money
|
18
|
+
|
19
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
20
|
+
|
21
|
+
$ gem install aga-money
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
To use Aga-money in your application, require the gem and start making requests. Here's a basic example:
|
26
|
+
|
27
|
+
```
|
28
|
+
require 'money'
|
29
|
+
|
30
|
+
Money::Arbitrage.new(start: 1, service: :arbitrage).run
|
31
|
+
|
32
|
+
# Output:
|
33
|
+
|
34
|
+
[
|
35
|
+
{
|
36
|
+
:id=>1,
|
37
|
+
:date_added=>"2010-07-13T00:00:00.000Z",
|
38
|
+
:name=>"Bitcoin",
|
39
|
+
:slug=>"bitcoin",
|
40
|
+
:symbol=>"BTC",
|
41
|
+
:exchanges=> [
|
42
|
+
{:exchange=>"Bittrex", :price=>26475.60011232},
|
43
|
+
{:exchange=>"BitMart", :price=>26561.02548245}
|
44
|
+
]
|
45
|
+
}
|
46
|
+
]
|
47
|
+
|
48
|
+
Money::New.new(start: 1, service: :new).run
|
49
|
+
|
50
|
+
# Output: nil
|
51
|
+
|
52
|
+
|
53
|
+
Money::Top.new(start: 1, service: :top).run
|
54
|
+
|
55
|
+
[
|
56
|
+
{
|
57
|
+
:id=>23449,
|
58
|
+
:date_added=>"2023-02-08T09:59:11.000Z",
|
59
|
+
:name=>"hiRENGA",
|
60
|
+
:slug=>"hirenga",
|
61
|
+
:symbol=>"HIRENGA",
|
62
|
+
:exchanges=> [
|
63
|
+
{
|
64
|
+
:exchange=>"Binance",
|
65
|
+
:pair=>"BTC/USDT",
|
66
|
+
:price=>26539.26978533,
|
67
|
+
:liquidity=>1005.0
|
68
|
+
},
|
69
|
+
{
|
70
|
+
:exchange=>"KuCoin",
|
71
|
+
:pair=>"BTC/USDT",
|
72
|
+
:price=>26530.44747505,
|
73
|
+
:liquidity=>650.0
|
74
|
+
},
|
75
|
+
{
|
76
|
+
:exchange=>"Coinbase Exchange",
|
77
|
+
:pair=>"BTC/USDT",
|
78
|
+
:price=>26536.33901786,
|
79
|
+
:liquidity=>676.0
|
80
|
+
},
|
81
|
+
]
|
82
|
+
}
|
83
|
+
]
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
## Contributing
|
88
|
+
|
89
|
+
Contributions to Aga-money are welcome! If you encounter any issues or have suggestions for improvements, please submit an issue on the repository. Pull requests are also encouraged.
|
90
|
+
|
91
|
+
|
92
|
+
## Private License
|
93
|
+
|
94
|
+
Version 0.0.1, 01/06/2023
|
95
|
+
|
96
|
+
By obtaining a copy of this software and associated documentation files (the "Software"), you agree that the Software is proprietary to AIGreenAnt and is protected under intellectual property laws. This license grants you limited rights to use the Software solely for internal purposes within your organization.
|
97
|
+
|
98
|
+
1. License Grant
|
99
|
+
|
100
|
+
1.1 You are granted a non-exclusive, non-transferable license to use the Software for internal purposes only.
|
101
|
+
|
102
|
+
1.2 You may not distribute, sublicense, sell, or transfer the Software to any third party without prior written permission from AIGreenAnt.
|
103
|
+
|
104
|
+
2. Intellectual Property
|
105
|
+
|
106
|
+
2.1 The Software and any associated intellectual property rights, including but not limited to copyrights, patents, trademarks, trade secrets, and any other proprietary rights, are and shall remain the exclusive property of AIGreenAnt.
|
107
|
+
|
108
|
+
2.2 You may not remove, alter, or obscure any proprietary notices or labels on the Software.
|
109
|
+
|
110
|
+
3. Limitation of Liability
|
111
|
+
|
112
|
+
3.1 In no event shall AIGreenAnt be liable for any direct, indirect, incidental, special, or consequential damages arising out of the use or inability to use the Software, even if AIGreenAnt has been advised of the possibility of such damages.
|
113
|
+
|
114
|
+
4. Termination
|
115
|
+
|
116
|
+
4.1 This license is effective until terminated. AIGreenAnt may terminate this license at any time if you fail to comply with the terms and conditions of this agreement.
|
117
|
+
|
118
|
+
4.2 Upon termination, you must immediately cease all use of the Software and destroy all copies in your possession or control.
|
119
|
+
|
120
|
+
5. Governing Law
|
121
|
+
|
122
|
+
5.1 This license shall be governed by and construed in accordance with the laws of Italy, without regard to its conflict of laws principles.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'zeitwerk'
|
4
|
+
|
5
|
+
module Money
|
6
|
+
class Autoloader
|
7
|
+
class Inflector < ::Zeitwerk::Inflector
|
8
|
+
INFLECTIONS_MAP = {
|
9
|
+
version: 'VERSION'
|
10
|
+
}.freeze
|
11
|
+
|
12
|
+
def camelize(basename, _abspath)
|
13
|
+
INFLECTIONS_MAP[basename.to_sym] || super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class << self
|
18
|
+
LIB_PATH = ::File.dirname(__dir__).freeze
|
19
|
+
|
20
|
+
def setup!
|
21
|
+
loader = ::Zeitwerk::Loader.new
|
22
|
+
loader.tag = 'money'
|
23
|
+
loader.inflector = Inflector.new
|
24
|
+
loader.push_dir(LIB_PATH)
|
25
|
+
loader.collapse(::File.join(LIB_PATH, 'money', 'resources'))
|
26
|
+
|
27
|
+
ignored_paths.each { |path| loader.ignore(path) }
|
28
|
+
|
29
|
+
loader.setup
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def ignored_paths
|
35
|
+
[
|
36
|
+
::File.join(LIB_PATH, 'money', 'patches')
|
37
|
+
].freeze
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/money/base.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
class Arbitrage < Common
|
5
|
+
DEFAULT = [
|
6
|
+
{ id: 1, date_added: '2010-07-13T00:00:00.000Z', name: 'Bitcoin', slug: 'bitcoin', symbol: 'BTC' },
|
7
|
+
{ id: 1027, date_added: '2015-08-07T00:00:00.000Z', name: 'Ethereum', slug: 'ethereum', symbol: 'ETH' },
|
8
|
+
{ id: 52, date_added: '2013-08-04T00:00:00.000Z', name: 'XRP', slug: 'xrp', symbol: 'XRP' },
|
9
|
+
{ id: 2, date_added: '2013-04-28T00:00:00.000Z', name: 'Litecoin', slug: 'litecoin', symbol: 'LTC' }
|
10
|
+
].freeze
|
11
|
+
|
12
|
+
RESTART_VALUE = -9
|
13
|
+
|
14
|
+
def run
|
15
|
+
data = cmc(joiner)
|
16
|
+
validate(data)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def binance_request
|
22
|
+
response = @http.bnb_request(start: @start)
|
23
|
+
return nil unless @http.correct_response?(response)
|
24
|
+
|
25
|
+
data = response.dig(:response, 'data', 'body', 'data')
|
26
|
+
response(data)
|
27
|
+
end
|
28
|
+
|
29
|
+
def joiner
|
30
|
+
bnb = binance_request
|
31
|
+
bnb ? (binance_request + DEFAULT).uniq : DEFAULT
|
32
|
+
end
|
33
|
+
|
34
|
+
def validate(data)
|
35
|
+
pairs = validator(data).pairs
|
36
|
+
|
37
|
+
liquidity = validator(pairs).liquidity
|
38
|
+
|
39
|
+
validator(liquidity).gain
|
40
|
+
end
|
41
|
+
|
42
|
+
def response(data)
|
43
|
+
if data.nil? || data&.empty?
|
44
|
+
payload = nil
|
45
|
+
@start = RESTART_VALUE
|
46
|
+
else
|
47
|
+
payload = @form.payload_crypto(data)
|
48
|
+
end
|
49
|
+
|
50
|
+
payload
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
class Common
|
5
|
+
attr_reader :http
|
6
|
+
|
7
|
+
def initialize(start:, service:)
|
8
|
+
@start = start || 1
|
9
|
+
@service = service.to_s
|
10
|
+
|
11
|
+
@http = Money::Helpers::HttpRequest.new(service: @service)
|
12
|
+
@form = Money::Helpers::Format.new
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def cmc(payload)
|
18
|
+
payload&.each do |c|
|
19
|
+
response = @http.cmc_request(c[:slug])
|
20
|
+
next unless @http.correct_response?(response)
|
21
|
+
|
22
|
+
c[:exchanges] = @form.keep_data(response)
|
23
|
+
end
|
24
|
+
|
25
|
+
payload
|
26
|
+
end
|
27
|
+
|
28
|
+
def validator(data)
|
29
|
+
Money::Helpers::Controls::Validator.new(data: data)
|
30
|
+
end
|
31
|
+
|
32
|
+
attr_accessor :start
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
module Helpers
|
5
|
+
module Controls
|
6
|
+
class Gain
|
7
|
+
MAX_NUMBER = 100_000
|
8
|
+
MIN_PERC = 0.2
|
9
|
+
|
10
|
+
MIN_NUMBER = 0.0000000001
|
11
|
+
MAX_PERC = 0.1
|
12
|
+
|
13
|
+
def initialize(pairs)
|
14
|
+
@pairs = pairs
|
15
|
+
end
|
16
|
+
|
17
|
+
def greater_difference
|
18
|
+
discriminate_pairs
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def compare(detection)
|
24
|
+
return {} if detection.nil? || detection&.empty?
|
25
|
+
|
26
|
+
price = detection.dig(:payload, :price)
|
27
|
+
return {} if price.nil?
|
28
|
+
|
29
|
+
percentage(detection).round(3) >= computation_percentage(price).round(3)
|
30
|
+
end
|
31
|
+
|
32
|
+
# rubocop: disable Metrics/CyclomaticComplexity, Lint/MissingCopEnableDirective
|
33
|
+
def discriminate_pairs
|
34
|
+
return nil if @pairs.nil?
|
35
|
+
|
36
|
+
max = @pairs&.map { |pair| pair[:price] }&.max
|
37
|
+
min = @pairs&.map { |pair| pair[:price] }&.min
|
38
|
+
|
39
|
+
detection = select_max_pairs(max: max, min: min)
|
40
|
+
gain = compare(detection)
|
41
|
+
|
42
|
+
detection[:gain] = gain
|
43
|
+
detection
|
44
|
+
end
|
45
|
+
|
46
|
+
def computation_percentage(price)
|
47
|
+
((price - MIN_NUMBER) / (MAX_NUMBER - MIN_NUMBER)) * (MAX_PERC - MIN_PERC) + MIN_PERC
|
48
|
+
end
|
49
|
+
|
50
|
+
def percentage(detection)
|
51
|
+
(detection.dig(:payload, :max_diff).to_f / detection.dig(:payload, :price)) * 100
|
52
|
+
end
|
53
|
+
|
54
|
+
def select_exchange_names(data)
|
55
|
+
data&.map { |pair| { exchange: pair[:exchange], price: pair[:price] } }&.sort_by { |pair| pair[:price] }
|
56
|
+
end
|
57
|
+
|
58
|
+
def select_max_pairs(max:, min:)
|
59
|
+
data = @pairs&.select { |pair| pair[:price] == max || pair[:price] == min }
|
60
|
+
exchanges = select_exchange_names(data)
|
61
|
+
diff = max - min
|
62
|
+
|
63
|
+
{ payload: { max_diff: diff, exchanges: exchanges, price: min } }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
module Helpers
|
5
|
+
module Controls
|
6
|
+
class Validator
|
7
|
+
EXCHANGES = ['Binance', 'CoinEx', 'Coinbase Exchange', 'Bitfinex', 'Bittrex', 'Gemini', 'Bybit',
|
8
|
+
'Crypto.com Exchange', 'KuCoin', 'BitMart', 'MEXC', 'Houbi'].freeze
|
9
|
+
|
10
|
+
LIQUIDITY = 200
|
11
|
+
LR = 20
|
12
|
+
MINUTES = 15
|
13
|
+
HR = 30
|
14
|
+
|
15
|
+
def initialize(data:)
|
16
|
+
@data = data
|
17
|
+
end
|
18
|
+
|
19
|
+
def gain
|
20
|
+
@data&.map do |item|
|
21
|
+
exchanges = item[:exchanges]
|
22
|
+
@gainer = Money::Helpers::Controls::Gain.new(exchanges)
|
23
|
+
|
24
|
+
potential = @gainer.greater_difference
|
25
|
+
next if potential[:gain] == false
|
26
|
+
|
27
|
+
item[:exchanges] = potential.dig(:payload, :exchanges)
|
28
|
+
item.each { |i| i.delete(:price) }
|
29
|
+
|
30
|
+
item
|
31
|
+
end&.compact
|
32
|
+
|
33
|
+
@data
|
34
|
+
end
|
35
|
+
|
36
|
+
def liquidity
|
37
|
+
@data&.reject do |es|
|
38
|
+
es[:exchanges].reject! { |exchange| exchange[:liquidity] < LIQUIDITY }
|
39
|
+
es[:exchanges].empty?
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def pairs
|
44
|
+
@data&.map do |item|
|
45
|
+
filtered = item[:exchanges].select { |cmc_item| EXCHANGES.include?(cmc_item[:exchange]) }
|
46
|
+
item.merge(exchanges: filtered) unless filtered.empty?
|
47
|
+
end&.compact
|
48
|
+
end
|
49
|
+
|
50
|
+
def positive
|
51
|
+
quotes = @data&.dig('data', 'body', 'data')
|
52
|
+
quotes&.select! { |item| (positive_hour?(item) && positive_day?(item)) }
|
53
|
+
end
|
54
|
+
|
55
|
+
def positive_hour?(item)
|
56
|
+
item&.dig('quote', 'USD', 'percent_change_1h')&.positive?
|
57
|
+
end
|
58
|
+
|
59
|
+
def positive_day?(item)
|
60
|
+
item&.dig('quote', 'USD', 'percent_change_24h')&.between?(LR, HR)
|
61
|
+
end
|
62
|
+
|
63
|
+
def junior
|
64
|
+
timezone = Money.configuration
|
65
|
+
partial = @data&.dig('data', 'body', 'data')
|
66
|
+
partial&.reject! { |c| convert_local_time(date: c['date_added'], timezone: timezone) > difference_time }
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def convert_local_time(date:, timezone:)
|
72
|
+
time_utc = Time.parse(date).utc
|
73
|
+
timezone.utc_to_local(time_utc)
|
74
|
+
end
|
75
|
+
|
76
|
+
def difference_time
|
77
|
+
Time.now - (MINUTES * 60)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
module Helpers
|
5
|
+
class Format
|
6
|
+
def payload_crypto(response)
|
7
|
+
response&.map do |c|
|
8
|
+
{ id: c['id'], date_added: c['date_added'], name: c['name'],
|
9
|
+
slug: c['slug'], symbol: c['symbol'] }
|
10
|
+
end&.compact
|
11
|
+
end
|
12
|
+
|
13
|
+
def keep_data(response)
|
14
|
+
response&.dig(:response, 'data', 'marketPairs')&.map do |c|
|
15
|
+
{
|
16
|
+
exchange: c['exchangeName'], pair: c['marketPair'],
|
17
|
+
price: c['price'], liquidity: c['effectiveLiquidity']
|
18
|
+
}
|
19
|
+
end&.compact
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bnb'
|
4
|
+
require 'cmc'
|
5
|
+
|
6
|
+
module Money
|
7
|
+
module Helpers
|
8
|
+
class HttpRequest
|
9
|
+
def initialize(service:)
|
10
|
+
@service = service.capitalize
|
11
|
+
end
|
12
|
+
|
13
|
+
def bnb_request(start = 1)
|
14
|
+
params = { :start => start } # rubocop: disable Style/HashSyntax
|
15
|
+
Object.const_get(service_class).new(params).list
|
16
|
+
end
|
17
|
+
|
18
|
+
def cmc_request(slug)
|
19
|
+
params = { :slug => slug } # rubocop: disable Style/HashSyntax
|
20
|
+
Cmc::Exchange.new(params).list
|
21
|
+
end
|
22
|
+
|
23
|
+
def couples
|
24
|
+
corresponding[@service]
|
25
|
+
end
|
26
|
+
|
27
|
+
def correct_response?(response)
|
28
|
+
response[:status] == true
|
29
|
+
end
|
30
|
+
|
31
|
+
def corresponding
|
32
|
+
{
|
33
|
+
'Arbitrage' => 'All',
|
34
|
+
'Top' => 'Gainer',
|
35
|
+
'New' => 'New'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def service_class
|
40
|
+
"Bnb::#{couples}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
class New < Common
|
5
|
+
def run
|
6
|
+
data = cmc(binance_request)
|
7
|
+
validate(data)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def binance_request
|
13
|
+
response = @http.bnb_request[:response]
|
14
|
+
|
15
|
+
data = validator(response).junior
|
16
|
+
|
17
|
+
@form.payload_crypto(data)
|
18
|
+
end
|
19
|
+
|
20
|
+
def validate(data)
|
21
|
+
validator(data).pairs
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Money
|
4
|
+
class Top < Common
|
5
|
+
def run
|
6
|
+
data = cmc(binance_request)
|
7
|
+
validate(data)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def binance_request
|
13
|
+
response = @http.bnb_request[:response]
|
14
|
+
|
15
|
+
data = validator(response).positive
|
16
|
+
|
17
|
+
@form.payload_crypto(data)
|
18
|
+
end
|
19
|
+
|
20
|
+
def validate(data)
|
21
|
+
pairs = validator(data).pairs
|
22
|
+
|
23
|
+
validator(pairs).liquidity
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/money.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tzinfo'
|
4
|
+
require_relative './money/autoloader'
|
5
|
+
|
6
|
+
module Money
|
7
|
+
NAME = 'Money Ruby'
|
8
|
+
|
9
|
+
@mutex = ::Mutex.new
|
10
|
+
|
11
|
+
class << self
|
12
|
+
def app_info=(value)
|
13
|
+
::Money::Base.app_info = value
|
14
|
+
end
|
15
|
+
|
16
|
+
def configuration
|
17
|
+
TZInfo::Timezone.get('Europe/Rome')
|
18
|
+
end
|
19
|
+
|
20
|
+
def configuration=(value)
|
21
|
+
TZInfo::Timezone.get(value)
|
22
|
+
end
|
23
|
+
|
24
|
+
def ping
|
25
|
+
{ status: 200 }
|
26
|
+
end
|
27
|
+
|
28
|
+
def version
|
29
|
+
VERSION
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
::Money::Autoloader.setup!
|
metadata
ADDED
@@ -0,0 +1,266 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aga-money
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stefano Baldazzi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: zeitwerk
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.4'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bump
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: digest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.1.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.8'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.16'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.16'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: webmock
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.14'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.14'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: aga-bnb
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.0.0
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.0.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: aga-cmc
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.0.0
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.0.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: aga-request
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.0.2
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.0.2
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: activesupport
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 7.0.5
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 7.0.5
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: faraday
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '2.7'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '2.7'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: tzinfo
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 2.0.6
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 2.0.6
|
223
|
+
description: Money Ruby is a lightweight gem for make money with cryptos services.
|
224
|
+
email:
|
225
|
+
- stefanobaldazzi40@gmail.com
|
226
|
+
executables: []
|
227
|
+
extensions: []
|
228
|
+
extra_rdoc_files: []
|
229
|
+
files:
|
230
|
+
- README.md
|
231
|
+
- lib/money.rb
|
232
|
+
- lib/money/autoloader.rb
|
233
|
+
- lib/money/base.rb
|
234
|
+
- lib/money/resources/arbitrage.rb
|
235
|
+
- lib/money/resources/common.rb
|
236
|
+
- lib/money/resources/helpers/controls/gain.rb
|
237
|
+
- lib/money/resources/helpers/controls/validator.rb
|
238
|
+
- lib/money/resources/helpers/format.rb
|
239
|
+
- lib/money/resources/helpers/http_request.rb
|
240
|
+
- lib/money/resources/new.rb
|
241
|
+
- lib/money/resources/top.rb
|
242
|
+
- lib/money/version.rb
|
243
|
+
homepage: https://github.com/Baldaz02/aga-money-ruby
|
244
|
+
licenses:
|
245
|
+
- MIT
|
246
|
+
metadata: {}
|
247
|
+
post_install_message:
|
248
|
+
rdoc_options: []
|
249
|
+
require_paths:
|
250
|
+
- lib
|
251
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - ">="
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '2.7'
|
256
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
|
+
requirements:
|
258
|
+
- - ">="
|
259
|
+
- !ruby/object:Gem::Version
|
260
|
+
version: '0'
|
261
|
+
requirements: []
|
262
|
+
rubygems_version: 3.3.24
|
263
|
+
signing_key:
|
264
|
+
specification_version: 4
|
265
|
+
summary: aga-money0.0.1
|
266
|
+
test_files: []
|