gera 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +674 -0
  3. data/README.md +67 -0
  4. data/Rakefile +43 -0
  5. data/app/assets/config/gera_manifest.js +2 -0
  6. data/app/assets/javascripts/gera/application.js +14 -0
  7. data/app/assets/stylesheets/gera/application.css +15 -0
  8. data/app/authorizers/gera/application_authorizer.rb +6 -0
  9. data/app/authorizers/gera/currency_rate_authorizer.rb +9 -0
  10. data/app/authorizers/gera/currency_rate_mode_authorizer.rb +7 -0
  11. data/app/authorizers/gera/direction_rate_authorizer.rb +8 -0
  12. data/app/authorizers/gera/exchange_rate_authorizer.rb +8 -0
  13. data/app/authorizers/gera/payment_system_authorizer.rb +13 -0
  14. data/app/authorizers/gera/rate_source_authorizer.rb +7 -0
  15. data/app/controllers/gera/application_controller.rb +30 -0
  16. data/app/controllers/gera/currencies_controller.rb +8 -0
  17. data/app/controllers/gera/currency_rate_history_intervals_controller.rb +53 -0
  18. data/app/controllers/gera/currency_rate_mode_snapshots_controller.rb +83 -0
  19. data/app/controllers/gera/currency_rate_modes_controller.rb +60 -0
  20. data/app/controllers/gera/currency_rates_controller.rb +70 -0
  21. data/app/controllers/gera/direction_rate_history_intervals_controller.rb +62 -0
  22. data/app/controllers/gera/direction_rates_controller.rb +28 -0
  23. data/app/controllers/gera/exchange_rates_controller.rb +25 -0
  24. data/app/controllers/gera/external_rate_snapshots_controller.rb +35 -0
  25. data/app/controllers/gera/external_rates_controller.rb +28 -0
  26. data/app/controllers/gera/payment_systems_controller.rb +78 -0
  27. data/app/controllers/gera/rate_sources_controller.rb +8 -0
  28. data/app/decorators/gera/currency_rate_decorator.rb +148 -0
  29. data/app/decorators/gera/direction_rate_decorator.rb +47 -0
  30. data/app/decorators/gera/payment_system_decorator.rb +19 -0
  31. data/app/helpers/gera/application_helper.rb +110 -0
  32. data/app/helpers/gera/currency_rate_helper.rb +19 -0
  33. data/app/helpers/gera/currency_rate_modes_helper.rb +73 -0
  34. data/app/helpers/gera/direction_rate_helper.rb +36 -0
  35. data/app/helpers/gera/exchange_rates_helper.rb +21 -0
  36. data/app/jobs/gera/application_job.rb +6 -0
  37. data/app/models/concerns/gera/currency_pair_generator.rb +14 -0
  38. data/app/models/concerns/gera/currency_pair_support.rb +42 -0
  39. data/app/models/concerns/gera/currency_rate_mode_builder_support.rb +35 -0
  40. data/app/models/concerns/gera/direction_support.rb +14 -0
  41. data/app/models/concerns/gera/history_interval_concern.rb +46 -0
  42. data/app/models/gera/application_record.rb +8 -0
  43. data/app/models/gera/cbr_external_rate.rb +13 -0
  44. data/app/models/gera/cross_rate_mode.rb +13 -0
  45. data/app/models/gera/currency_rate.rb +78 -0
  46. data/app/models/gera/currency_rate_history_interval.rb +25 -0
  47. data/app/models/gera/currency_rate_history_interval_filter.rb +30 -0
  48. data/app/models/gera/currency_rate_mode.rb +20 -0
  49. data/app/models/gera/currency_rate_mode_snapshot.rb +26 -0
  50. data/app/models/gera/currency_rate_snapshot.rb +12 -0
  51. data/app/models/gera/direction.rb +44 -0
  52. data/app/models/gera/direction_rate.rb +136 -0
  53. data/app/models/gera/direction_rate_history_interval.rb +33 -0
  54. data/app/models/gera/direction_rate_history_interval_filter.rb +30 -0
  55. data/app/models/gera/direction_rate_snapshot.rb +7 -0
  56. data/app/models/gera/exchange_rate.rb +130 -0
  57. data/app/models/gera/external_rate.rb +38 -0
  58. data/app/models/gera/external_rate_snapshot.rb +20 -0
  59. data/app/models/gera/payment_system.rb +98 -0
  60. data/app/models/gera/rate_source.rb +77 -0
  61. data/app/models/gera/rate_source_auto.rb +25 -0
  62. data/app/models/gera/rate_source_bitfinex.rb +9 -0
  63. data/app/models/gera/rate_source_cbr.rb +13 -0
  64. data/app/models/gera/rate_source_cbr_avg.rb +6 -0
  65. data/app/models/gera/rate_source_exmo.rb +9 -0
  66. data/app/models/gera/rate_source_manual.rb +13 -0
  67. data/app/views/application/_exchange_rate_monitor.slim +1 -0
  68. data/app/views/gera/application/_attributes_table.slim +5 -0
  69. data/app/views/gera/application/_currencies_table.slim +18 -0
  70. data/app/views/gera/application/_currency_rate_mode_snapshots.slim +6 -0
  71. data/app/views/gera/application/_direction_rate.slim +6 -0
  72. data/app/views/gera/application/_directions_submenu.slim +11 -0
  73. data/app/views/gera/application/_directions_table.slim +15 -0
  74. data/app/views/gera/application/_exchange_rate.slim +6 -0
  75. data/app/views/gera/application/_external_rate.slim +6 -0
  76. data/app/views/gera/application/_header.slim +12 -0
  77. data/app/views/gera/application/_table.slim +28 -0
  78. data/app/views/gera/application/_topnav.slim +21 -0
  79. data/app/views/gera/application/direction_details.slim +75 -0
  80. data/app/views/gera/application/page.html.slim +1 -0
  81. data/app/views/gera/currencies/index.html.slim +20 -0
  82. data/app/views/gera/currency_rate_history_intervals/_filter.slim +11 -0
  83. data/app/views/gera/currency_rate_history_intervals/index.slim +39 -0
  84. data/app/views/gera/currency_rate_mode_snapshots/_snapshot.slim +20 -0
  85. data/app/views/gera/currency_rate_mode_snapshots/edit.html.slim +30 -0
  86. data/app/views/gera/currency_rate_modes/_cross_rate_mode_fields.slim +21 -0
  87. data/app/views/gera/currency_rate_modes/_currency_rate_mode.slim +7 -0
  88. data/app/views/gera/currency_rate_modes/_form.slim +29 -0
  89. data/app/views/gera/currency_rate_modes/edit.slim +11 -0
  90. data/app/views/gera/currency_rate_modes/index.html.slim +12 -0
  91. data/app/views/gera/currency_rates/_currency_rate.slim +22 -0
  92. data/app/views/gera/currency_rates/_currency_rate_humanized.slim +35 -0
  93. data/app/views/gera/currency_rates/diff.slim +12 -0
  94. data/app/views/gera/currency_rates/index.slim +27 -0
  95. data/app/views/gera/currency_rates/modes.slim +14 -0
  96. data/app/views/gera/currency_rates/show.slim +4 -0
  97. data/app/views/gera/direction_rate_history_intervals/_filter.slim +11 -0
  98. data/app/views/gera/direction_rate_history_intervals/index.slim +41 -0
  99. data/app/views/gera/direction_rates/_direction_rate_example_calculator.slim +28 -0
  100. data/app/views/gera/direction_rates/diff.slim +19 -0
  101. data/app/views/gera/direction_rates/index.slim +26 -0
  102. data/app/views/gera/direction_rates/legacy.html.slim +5 -0
  103. data/app/views/gera/direction_rates/minimals.slim +5 -0
  104. data/app/views/gera/direction_rates/show.slim +14 -0
  105. data/app/views/gera/external_rate_snapshots/index.slim +25 -0
  106. data/app/views/gera/external_rate_snapshots/show.slim +22 -0
  107. data/app/views/gera/external_rates/_flat_list.slim +22 -0
  108. data/app/views/gera/external_rates/index.html.slim +28 -0
  109. data/app/views/gera/external_rates/show.slim +1 -0
  110. data/app/views/gera/payment_systems/_fields.slim +4 -0
  111. data/app/views/gera/payment_systems/_fields_table.slim +18 -0
  112. data/app/views/gera/payment_systems/_form.slim +9 -0
  113. data/app/views/gera/payment_systems/edit.slim +7 -0
  114. data/app/views/gera/payment_systems/index.slim +3 -0
  115. data/app/views/gera/payment_systems/new.slim +9 -0
  116. data/app/views/gera/payment_systems/show.slim +1 -0
  117. data/app/views/gera/rate_sources/_list.slim +13 -0
  118. data/app/views/gera/rate_sources/_rate_source.slim +23 -0
  119. data/app/views/gera/rate_sources/index.html.slim +6 -0
  120. data/app/views/layouts/application.html.slim +15 -0
  121. data/app/views/layouts/gera/blank.html.slim +10 -0
  122. data/app/workers/concerns/gera/rates_worker.rb +87 -0
  123. data/app/workers/gera/bitfinex_rates_worker.rb +65 -0
  124. data/app/workers/gera/cbr_avg_rates_worker.rb +42 -0
  125. data/app/workers/gera/cbr_rates_worker.rb +192 -0
  126. data/app/workers/gera/create_history_intervals_worker.rb +38 -0
  127. data/app/workers/gera/currency_rates_worker.rb +64 -0
  128. data/app/workers/gera/directions_rates_worker.rb +51 -0
  129. data/app/workers/gera/exmo_rates_worker.rb +62 -0
  130. data/app/workers/gera/purge_currency_rates_worker.rb +21 -0
  131. data/app/workers/gera/purge_direction_rates_worker.rb +30 -0
  132. data/config/currencies.yml +559 -0
  133. data/config/routes.rb +30 -0
  134. data/db/migrate/20180912130000_setup.rb +228 -0
  135. data/db/migrate/20190314114844_add_is_available_to_payment_systems.rb +7 -0
  136. data/db/migrate/20190315113046_add_icon_url_to_payment_systems.rb +7 -0
  137. data/db/migrate/20190315132137_add_commission_to_payment_systems.rb +7 -0
  138. data/lib/banks/currency_exchange.rb +12 -0
  139. data/lib/builders/currency_rate_auto_builder.rb +38 -0
  140. data/lib/builders/currency_rate_builder.rb +60 -0
  141. data/lib/builders/currency_rate_cross_builder.rb +70 -0
  142. data/lib/builders/currency_rate_direct_builder.rb +26 -0
  143. data/lib/gera.rb +32 -0
  144. data/lib/gera/bitfinex_fetcher.rb +36 -0
  145. data/lib/gera/configuration.rb +47 -0
  146. data/lib/gera/currencies_purger.rb +28 -0
  147. data/lib/gera/currency_pair.rb +93 -0
  148. data/lib/gera/engine.rb +14 -0
  149. data/lib/gera/mathematic.rb +156 -0
  150. data/lib/gera/money_support.rb +89 -0
  151. data/lib/gera/numeric.rb +25 -0
  152. data/lib/gera/railtie.rb +8 -0
  153. data/lib/gera/rate.rb +22 -0
  154. data/lib/gera/rate_from_multiplicator.rb +54 -0
  155. data/lib/gera/repositories/currency_rate_modes_repository.rb +37 -0
  156. data/lib/gera/repositories/currency_rates_repository.rb +25 -0
  157. data/lib/gera/repositories/direction_rates_repository.rb +46 -0
  158. data/lib/gera/repositories/exchange_rates_repository.rb +23 -0
  159. data/lib/gera/repositories/payment_systems_repository.rb +21 -0
  160. data/lib/gera/repositories/universe.rb +47 -0
  161. data/lib/gera/version.rb +3 -0
  162. data/lib/tasks/auto_generate_diagram.rake +6 -0
  163. data/lib/tasks/gera_tasks.rake +4 -0
  164. metadata +765 -0
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ class CreateHistoryIntervalsWorker
5
+ include Sidekiq::Worker
6
+ include AutoLogger
7
+
8
+ MAXIMAL_DATE = 30.minutes
9
+ MINIMAL_DATE = Time.parse('13-07-2018 18:00')
10
+
11
+ def perform
12
+ save_direction_rate_history_intervals if DirectionRateHistoryInterval.table_exists?
13
+ save_currency_rate_history_intervals if CurrencyRateHistoryInterval.table_exists?
14
+ end
15
+
16
+ private
17
+
18
+ def lock_timeout
19
+ 1.hours * 1000
20
+ end
21
+
22
+ def save_direction_rate_history_intervals
23
+ last_saved_interval = DirectionRateHistoryInterval.maximum(:interval_to)
24
+
25
+ from = last_saved_interval || MINIMAL_DATE
26
+ logger.info "start save_direction_rate_history_intervals from #{from}"
27
+ DirectionRateHistoryInterval.create_multiple_intervals_from! from, MAXIMAL_DATE.ago
28
+ end
29
+
30
+ def save_currency_rate_history_intervals
31
+ last_saved_interval = CurrencyRateHistoryInterval.maximum(:interval_to)
32
+
33
+ from = last_saved_interval || MINIMAL_DATE
34
+ logger.info "start save_currency_rate_history_intervals from #{from}"
35
+ CurrencyRateHistoryInterval.create_multiple_intervals_from! from, MAXIMAL_DATE.ago
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ #
5
+ # Build currency rates on base of imported rates and calculation modes
6
+ #
7
+ class CurrencyRatesWorker
8
+ include Sidekiq::Worker
9
+ include AutoLogger
10
+
11
+ Error = Class.new StandardError
12
+
13
+ def perform
14
+ logger.info 'start'
15
+
16
+ CurrencyRate.transaction do
17
+ @snapshot = create_snapshot
18
+
19
+ Gera::CurrencyPair.all.each do |pair|
20
+ create_rate pair
21
+ end
22
+ end
23
+
24
+ logger.info 'finish'
25
+
26
+ DirectionsRatesWorker.perform_async
27
+
28
+ true
29
+ end
30
+
31
+ private
32
+
33
+ attr_reader :snapshot
34
+
35
+ def create_snapshot
36
+ CurrencyRateSnapshot.create! currency_rate_mode_snapshot: Universe.currency_rate_modes_repository.snapshot
37
+ end
38
+
39
+ def create_rate(pair)
40
+ crm = Universe.currency_rate_modes_repository.find_currency_rate_mode_by_pair pair
41
+
42
+ logger.debug "build_rate(#{pair}, #{crm || :default})"
43
+
44
+ crm ||= CurrencyRateMode.new(currency_pair: pair, mode: :auto).freeze
45
+
46
+ cr = crm.build_currency_rate
47
+
48
+ raise Error, "Can not calculate rate of #{pair} for mode '#{crm.try :mode}'" unless cr.present?
49
+
50
+ cr.snapshot = snapshot
51
+ cr.save!
52
+ rescue StandardError => err
53
+ raise err if !err.is_a?(Error) && Rails.env.test?
54
+
55
+ logger.error err
56
+ Rails.logger.error err if Rails.env.development?
57
+ if defined? Bugsnag
58
+ Bugsnag.notify err do |b|
59
+ b.meta_data = { pair: pair }
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ class DirectionsRatesWorker
5
+ include ActiveSupport::Callbacks
6
+ include Sidekiq::Worker
7
+ include AutoLogger
8
+
9
+ Error = Class.new StandardError
10
+
11
+ sidekiq_options queue: :critical
12
+ define_callbacks :perform
13
+
14
+ # exchange_rate_id - ID of changes exchange_rate
15
+ #
16
+ def perform(*_args) # exchange_rate_id: nil)
17
+ logger.info 'start'
18
+
19
+
20
+ run_callbacks :perform do
21
+ DirectionRate.transaction do
22
+ ExchangeRate.includes(:payment_system_from, :payment_system_to).find_each do |exchange_rate|
23
+ safe_create(exchange_rate)
24
+ end
25
+ end
26
+ end
27
+ logger.info 'finish'
28
+ end
29
+
30
+ private
31
+
32
+ delegate :direction_rates, to: :snapshot
33
+
34
+ def snapshot
35
+ @snapshot ||= DirectionRateSnapshot.create!
36
+ end
37
+
38
+ def safe_create(exchange_rate)
39
+ direction_rates.create!(
40
+ snapshot: snapshot,
41
+ exchange_rate: exchange_rate,
42
+ currency_rate: Universe.currency_rates_repository.find_currency_rate_by_pair(exchange_rate.currency_pair)
43
+ )
44
+ rescue DirectionRate::UnknownExchangeRate, ActiveRecord::RecordInvalid, CurrencyRatesRepository::UnknownPair => err
45
+ logger.error err
46
+ Bugsnag.notify err do |b|
47
+ b.meta_data = { exchange_rate_id: exchange_rate.id, currency_rate_id: currency_rate.try(:id) }
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ # Import rates from EXMO
5
+ #
6
+ class EXMORatesWorker
7
+ include Sidekiq::Worker
8
+ include AutoLogger
9
+
10
+ prepend RatesWorker
11
+
12
+ URL1 = 'https://api.exmo.com/v1/ticker/'
13
+ URL2 = 'https://api.exmo.me/v1/ticker/'
14
+ URL = URL2
15
+
16
+ private
17
+
18
+ def rate_source
19
+ @rate_source ||= RateSourceEXMO.get!
20
+ end
21
+
22
+ # data contains
23
+ # {"buy_price"=>"8734.99986728",
24
+ # "sell_price"=>"8802.299431",
25
+ # "last_trade"=>"8789.71226599",
26
+ # "high"=>"9367.055011",
27
+ # "low"=>"8700.00000001",
28
+ # "avg"=>"8963.41293922",
29
+ # "vol"=>"330.70358291",
30
+ # "vol_curr"=>"2906789.33918745",
31
+ # "updated"=>1520415288},
32
+
33
+ def save_rate(raw_pair, data)
34
+ # TODO: Best way to move this into ExmoRatesWorker
35
+ #
36
+ cf, ct = raw_pair.split('_') .map { |c| c == 'DASH' ? 'DSH' : c }
37
+
38
+ cur_from = Money::Currency.find cf
39
+ unless cur_from
40
+ logger.warn "Not supported currency #{cf}"
41
+ return
42
+ end
43
+
44
+ cur_to = Money::Currency.find ct
45
+ unless cur_to
46
+ logger.warn "Not supported currency #{ct}"
47
+ return
48
+ end
49
+
50
+ currency_pair = CurrencyPair.new cur_from, cur_to
51
+ create_external_rates currency_pair, data, sell_price: data['sell_price'], buy_price: data['buy_price']
52
+ end
53
+
54
+ def load_rates
55
+ result = JSON.parse open(URI.parse(URL)).read
56
+ raise Error, 'Result is not a hash' unless result.is_a? Hash
57
+ raise Error, result['error'] if result['error'].present?
58
+
59
+ result
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ class PurgeCurrencyRatesWorker
5
+ include Sidekiq::Worker
6
+
7
+ sidekiq_options queue: :purgers, retry: false
8
+
9
+ KEEP_PERIOD = 3.hours
10
+
11
+ def perform
12
+ currency_rate_snapshots.batch_purge batch_size: 100
13
+ end
14
+
15
+ private
16
+
17
+ def currency_rate_snapshots
18
+ CurrencyRateSnapshot.where.not(id: CurrencyRateSnapshot.last).where('created_at < ?', KEEP_PERIOD.ago)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gera
4
+ class PurgeDirectionRatesWorker
5
+ include Sidekiq::Worker
6
+
7
+ sidekiq_options queue: :purgers, retry: false
8
+
9
+ KEEP_PERIOD = 3.hours
10
+
11
+ def perform
12
+ direction_rate_snapshots.batch_purge
13
+ direction_rates.batch_purge
14
+ end
15
+
16
+ private
17
+
18
+ def lock_timeout
19
+ 7.days * 1000
20
+ end
21
+
22
+ def direction_rate_snapshots
23
+ DirectionRateSnapshot.where.not(id: DirectionRateSnapshot.last).where('created_at < ?', KEEP_PERIOD.ago)
24
+ end
25
+
26
+ def direction_rates
27
+ DirectionRate.where.not(id: DirectionRateSnapshot.last.direction_rates.pluck(:id)).where('created_at < ?', KEEP_PERIOD.ago)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,559 @@
1
+ ---
2
+ rub:
3
+ priority: 1
4
+ iso_code: RUB
5
+ name: Russian Ruble
6
+ symbol: "₽"
7
+ alternate_symbols:
8
+ - руб.
9
+ - р.
10
+ subunit: Kopeck
11
+ subunit_to_unit: 100
12
+ symbol_first: false
13
+ html_entity: "&#x20BD;"
14
+ decimal_mark: ","
15
+ thousands_separator: "."
16
+ iso_numeric: '643'
17
+ smallest_denomination: 1
18
+ is_crypto: false
19
+
20
+ # Местные настройки
21
+ #
22
+ # Идентфикатор в type_cy
23
+ local_id: 1
24
+
25
+ # минимальная сумма валюты на прием (из minGetSum)
26
+ minimal_input_value: 150
27
+
28
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
29
+ minimal_output_value: 150
30
+
31
+ usd:
32
+ priority: 2
33
+ iso_code: USD
34
+ name: Американский Доллар
35
+ symbol: "$"
36
+ disambiguate_symbol: US$
37
+ alternate_symbols:
38
+ - US$
39
+ subunit: Cent
40
+ subunit_to_unit: 100
41
+ symbol_first: true
42
+ html_entity: "$"
43
+ decimal_mark: "."
44
+ thousands_separator: ","
45
+ iso_numeric: '840'
46
+ smallest_denomination: 1
47
+ is_crypto: false
48
+
49
+ # Местные настройки
50
+ #
51
+ # Идентфикатор в type_cy
52
+ local_id: 2
53
+
54
+ # минимальная сумма валюты на прием (из minGetSum)
55
+ minimal_input_value: 3
56
+
57
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
58
+ minimal_output_value: 3
59
+
60
+ btc:
61
+ priority: 3
62
+ iso_code: BTC
63
+ name: Bitcoin
64
+ symbol: B⃦
65
+ alternate_symbols: []
66
+ subunit: Satoshi
67
+ subunit_to_unit: 100000000
68
+ symbol_first: false
69
+ html_entity: "&#x20bf;"
70
+ decimal_mark: "."
71
+ thousands_separator: ","
72
+ iso_numeric: ''
73
+ smallest_denomination: 1
74
+ is_crypto: true
75
+
76
+ # Местные настройки
77
+ #
78
+ # Идентфикатор в type_cy
79
+ local_id: 3
80
+
81
+ # минимальная сумма валюты на прием (из minGetSum) 0.001
82
+ minimal_input_value: 0.001
83
+
84
+ # минимальная сумма валюты на выдачу (из minGetSumOut) 0.004
85
+ minimal_output_value: 0.004
86
+
87
+ # Курс 126_000 рублей
88
+ ltc:
89
+ priority: 4
90
+ iso_code: LTC
91
+ name: Litecoin
92
+ symbol: Ł
93
+ alternate_symbols: []
94
+ subunit: litoshis
95
+ # Source: https://en.wikipedia.org/wiki/Litecoin
96
+ subunit_to_unit: 100000000
97
+ symbol_first: false
98
+ html_entity: ''
99
+ decimal_mark: "."
100
+ thousands_separator: ","
101
+ iso_numeric: ''
102
+ smallest_denomination: 1
103
+ is_crypto: true
104
+ authorized_round: 5
105
+
106
+ local_id: 4
107
+ minimal_input_value: 0.05
108
+ minimal_output_value: 0.1
109
+
110
+ eth:
111
+ priority: 5
112
+ iso_code: ETH
113
+ name: Ethereum
114
+ symbol: Ξ
115
+ alternate_symbols: []
116
+ subunit: Gwei
117
+ # может быть 10−18 степени, но мы останавливаемся на Gwey
118
+ # https://en.wikipedia.org/wiki/Ethereum
119
+ subunit_to_unit: 1000000000
120
+ symbol_first: false
121
+ html_entity: ''
122
+ decimal_mark: "."
123
+ thousands_separator: ","
124
+ iso_numeric: ''
125
+ smallest_denomination: 1
126
+ authorized_round: 6
127
+ is_crypto: true
128
+
129
+ local_id: 5
130
+ minimal_input_value: 0.01
131
+ minimal_output_value: 0.01
132
+
133
+ # Darkcoin Dash was originally released as XCoin (XCO
134
+ dsh:
135
+ priority: 6
136
+ iso_code: DSH
137
+ name: Dash
138
+ symbol:
139
+ alternate_symbols: []
140
+ subunit:
141
+ # Как у BTC, потому что это форл BTC
142
+ subunit_to_unit: 100000000
143
+ symbol_first: false
144
+ html_entity: ''
145
+ decimal_mark: "."
146
+ thousands_separator: ","
147
+ iso_numeric: ''
148
+ smallest_denomination: 1
149
+ authorized_round: 6
150
+ is_crypto: true
151
+
152
+ local_id: 6
153
+ minimal_input_value: 0.01
154
+ minimal_output_value: 0.02
155
+
156
+ kzt:
157
+ priority: 7
158
+ iso_code: KZT
159
+ name: Казахстанский Тэнге
160
+ symbol: "₸"
161
+ alternate_symbols: []
162
+ subunit: Tiyn
163
+ subunit_to_unit: 100
164
+ symbol_first: false
165
+ html_entity: ''
166
+ decimal_mark: "."
167
+ thousands_separator: ","
168
+ iso_numeric: '398'
169
+ is_crypto: false
170
+ smallest_denomination: 1
171
+
172
+ local_id: 8
173
+ minimal_input_value: 2000
174
+ minimal_output_value: 2000
175
+
176
+ xrp:
177
+ priority: 8
178
+ iso_code: XRP
179
+ name: Ripple
180
+ symbol:
181
+ alternate_symbols: []
182
+ subunit: drop
183
+ # 1/миллионная- https://en.wikipedia.org/wiki/Ripple_(payment_protocol)
184
+ subunit_to_unit: 1000000
185
+ symbol_first: false
186
+ html_entity: ''
187
+ decimal_mark: "."
188
+ thousands_separator: ","
189
+ iso_numeric: ''
190
+ smallest_denomination: 1
191
+ authorized_round: 6
192
+ is_crypto: true
193
+
194
+ local_id: 9
195
+ minimal_input_value: 10
196
+ minimal_output_value: 20
197
+
198
+ etc:
199
+ priority: 9
200
+ iso_code: ETC
201
+ name: Ethereum Classic
202
+ symbol:
203
+ alternate_symbols: []
204
+ subunit:
205
+ # Как у Эфира, потому что это форк эфира
206
+ subunit_to_unit: 1000000000
207
+ symbol_first: false
208
+ html_entity: ''
209
+ decimal_mark: "."
210
+ thousands_separator: ","
211
+ iso_numeric: ''
212
+ smallest_denomination: 1
213
+ authorized_round: 6
214
+ is_crypto: true
215
+
216
+ local_id: 10
217
+ minimal_input_value: 0.5
218
+ minimal_output_value: 0.5
219
+
220
+ xmr:
221
+ priority: 10
222
+ iso_code: XMR
223
+ name: Monero
224
+ symbol: ɱ
225
+ alternate_symbols: []
226
+ subunit: piconero
227
+ subunit_to_unit: 1000000000000
228
+ symbol_first: false
229
+ html_entity: ''
230
+ decimal_mark: "."
231
+ thousands_separator: ","
232
+ iso_numeric: ''
233
+ smallest_denomination: 1
234
+ authorized_round: 6
235
+ is_crypto: true
236
+
237
+ local_id: 11
238
+ minimal_input_value: 0.2
239
+ minimal_output_value: 0.2
240
+
241
+ bch:
242
+ priority: 11
243
+ iso_code: BCH
244
+ name: Bitcoin Cash
245
+ symbol:
246
+ alternate_symbols: []
247
+ subunit:
248
+ # Как биткойн, потому что это форк
249
+ subunit_to_unit: 100000000
250
+ symbol_first: false
251
+ html_entity: ''
252
+ decimal_mark: "."
253
+ thousands_separator: ","
254
+ iso_numeric: ''
255
+ smallest_denomination: 1
256
+ authorized_round: 8
257
+ is_crypto: true
258
+
259
+ local_id: 12
260
+ minimal_input_value: 0.005
261
+ minimal_output_value: 0.005
262
+
263
+ eur:
264
+ priority: 12
265
+ iso_code: EUR
266
+ name: Euro
267
+ symbol: €
268
+ alternate_symbols: []
269
+ subunit: Cent
270
+ subunit_to_unit: 100
271
+ symbol_first: true
272
+ html_entity: "$"
273
+ decimal_mark: "."
274
+ thousands_separator: ","
275
+ iso_numeric: '978'
276
+ smallest_denomination: 1
277
+ is_crypto: false
278
+
279
+ # Местные настройки
280
+ #
281
+ # Идентфикатор в type_cy
282
+ local_id: 13
283
+
284
+ # минимальная сумма валюты на прием (из minGetSum)
285
+ minimal_input_value: 3
286
+
287
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
288
+ minimal_output_value: 3
289
+
290
+ neo:
291
+ priority: 13
292
+ iso_code: NEO
293
+ name: Neo
294
+ symbol: N
295
+ alternate_symbols: []
296
+ subunit: Neo
297
+ subunit_to_unit: 1
298
+ symbol_first: true
299
+ html_entity: "$"
300
+ decimal_mark: "."
301
+ thousands_separator: ","
302
+ iso_numeric: ''
303
+ smallest_denomination: 1
304
+ is_crypto: true
305
+
306
+ # Местные настройки
307
+ #
308
+ # Идентфикатор в type_cy
309
+ local_id: 14
310
+
311
+ # минимальная сумма валюты на прием (из minGetSum)
312
+ minimal_input_value: 1
313
+
314
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
315
+ minimal_output_value: 1
316
+
317
+ zec:
318
+ priority: 14
319
+ iso_code: ZEC
320
+ name: Zcash
321
+ symbol: Z
322
+ alternate_symbols: []
323
+ subunit: Zcash Cent
324
+ subunit_to_unit: 100000000
325
+ symbol_first: true
326
+ html_entity: "$"
327
+ decimal_mark: "."
328
+ thousands_separator: ","
329
+ iso_numeric: ''
330
+ smallest_denomination: 1
331
+ is_crypto: true
332
+
333
+ # Местные настройки
334
+ #
335
+ # Идентфикатор в type_cy
336
+ local_id: 15
337
+
338
+ # минимальная сумма валюты на прием (из minGetSum)
339
+ minimal_input_value: 0.001
340
+
341
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
342
+ minimal_output_value: 0.004
343
+
344
+ usdt:
345
+ priority: 15
346
+ iso_code: USDT
347
+ name: Tether
348
+ symbol: T
349
+ alternate_symbols: []
350
+ subunit: USDT Cent
351
+ subunit_to_unit: 100
352
+ symbol_first: true
353
+ html_entity: "$"
354
+ decimal_mark: "."
355
+ thousands_separator: ","
356
+ iso_numeric: ''
357
+ smallest_denomination: 1
358
+ is_crypto: true
359
+
360
+ # Местные настройки
361
+ #
362
+ # Идентфикатор в type_cy
363
+ local_id: 16
364
+
365
+ # минимальная сумма валюты на прием (из minGetSum)
366
+ minimal_input_value: 3
367
+
368
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
369
+ minimal_output_value: 3
370
+
371
+ uah:
372
+ priority: 16
373
+ iso_code: UAH
374
+ name: Ukrainian hryvnia
375
+ symbol: "₴"
376
+ alternate_symbols:
377
+ - грн.
378
+ subunit: Kopiyka
379
+ subunit_to_unit: 100
380
+ symbol_first: false
381
+ html_entity: "&#x20B4;"
382
+ decimal_mark: ","
383
+ thousands_separator: "."
384
+ iso_numeric: '4217'
385
+ smallest_denomination: 1
386
+ is_crypto: false
387
+
388
+ # Местные настройки
389
+ #
390
+ # Идентфикатор в type_cy
391
+ local_id: 17
392
+
393
+ # минимальная сумма валюты на прием (из minGetSum)
394
+ minimal_input_value: 100
395
+
396
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
397
+ minimal_output_value: 100
398
+
399
+ eos:
400
+ priority: 17
401
+ iso_code: EOS
402
+ name: Eos
403
+ symbol:
404
+ alternate_symbols: []
405
+ subunit: Larimer
406
+ subunit_to_unit: 10000
407
+ symbol_first: true
408
+ html_entity: ''
409
+ decimal_mark: "."
410
+ thousands_separator: ","
411
+ iso_numeric: ''
412
+ smallest_denomination: 1
413
+ is_crypto: true
414
+
415
+ # Местные настройки
416
+ #
417
+ # Идентфикатор в type_cy
418
+ local_id: 18
419
+
420
+ # минимальная сумма валюты на прием (из minGetSum)
421
+ minimal_input_value: 0.01
422
+
423
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
424
+ minimal_output_value: 1
425
+
426
+ ada:
427
+ priority: 18
428
+ iso_code: ADA
429
+ name: Cardano
430
+ symbol:
431
+ alternate_symbols: []
432
+ subunit: lovelaces
433
+ subunit_to_unit: 1000000
434
+ symbol_first: true
435
+ html_entity: ''
436
+ decimal_mark: "."
437
+ thousands_separator: ","
438
+ iso_numeric: ''
439
+ smallest_denomination: 1
440
+ is_crypto: true
441
+
442
+ # Местные настройки
443
+ #
444
+ # Идентфикатор в type_cy
445
+ local_id: 19
446
+
447
+ # минимальная сумма валюты на прием (из minGetSum)
448
+ minimal_input_value: 5
449
+
450
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
451
+ minimal_output_value: 10
452
+
453
+ xem:
454
+ priority: 19
455
+ iso_code: XEM
456
+ name: XEM
457
+ symbol:
458
+ alternate_symbols: []
459
+ subunit: microXEM
460
+ subunit_to_unit: 1000000
461
+ symbol_first: true
462
+ html_entity: ''
463
+ decimal_mark: "."
464
+ thousands_separator: ","
465
+ iso_numeric: ''
466
+ smallest_denomination: 1
467
+ is_crypto: true
468
+
469
+ # Местные настройки
470
+ #
471
+ # Идентфикатор в type_cy
472
+ local_id: 20
473
+
474
+ # минимальная сумма валюты на прием (из minGetSum)
475
+ minimal_input_value: 10
476
+
477
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
478
+ minimal_output_value: 15
479
+
480
+ waves:
481
+ priority: 20
482
+ iso_code: WAVES
483
+ name: Waves
484
+ symbol:
485
+ alternate_symbols: []
486
+ subunit: Wavelet
487
+ subunit_to_unit: 100000000
488
+ symbol_first: true
489
+ html_entity: ''
490
+ decimal_mark: "."
491
+ thousands_separator: ","
492
+ iso_numeric: ''
493
+ smallest_denomination: 1
494
+ is_crypto: true
495
+
496
+ # Местные настройки
497
+ #
498
+ # Идентфикатор в type_cy
499
+ local_id: 21
500
+
501
+ # минимальная сумма валюты на прием (из minGetSum)
502
+ minimal_input_value: 0.01
503
+
504
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
505
+ minimal_output_value: 0.01
506
+
507
+ trx:
508
+ priority: 21
509
+ iso_code: TRX
510
+ name: Tron
511
+ symbol:
512
+ alternate_symbols: []
513
+ subunit: Sun
514
+ subunit_to_unit: 1000000
515
+ symbol_first: true
516
+ html_entity: ''
517
+ decimal_mark: "."
518
+ thousands_separator: ","
519
+ iso_numeric: ''
520
+ smallest_denomination: 1
521
+ is_crypto: true
522
+
523
+ # Местные настройки
524
+ #
525
+ # Идентфикатор в type_cy
526
+ local_id: 22
527
+
528
+ # минимальная сумма валюты на прием (из minGetSum)
529
+ minimal_input_value: 1
530
+
531
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
532
+ minimal_output_value: 10
533
+
534
+ doge:
535
+ priority: 21
536
+ iso_code: DOGE
537
+ name: Dogecoin
538
+ symbol: Ð
539
+ alternate_symbols: []
540
+ subunit: Microdoge
541
+ subunit_to_unit: 1000000
542
+ symbol_first: true
543
+ html_entity: ''
544
+ decimal_mark: "."
545
+ thousands_separator: ","
546
+ iso_numeric: ''
547
+ smallest_denomination: 1
548
+ is_crypto: true
549
+
550
+ # Местные настройки
551
+ #
552
+ # Идентфикатор в type_cy
553
+ local_id: 23
554
+
555
+ # минимальная сумма валюты на прием (из minGetSum)
556
+ minimal_input_value: 10
557
+
558
+ # минимальная сумма валюты на выдачу (из minGetSumOut)
559
+ minimal_output_value: 100