trade-o-matic 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trade-o-matic/adapters/base/raw_account_order.rb +7 -0
  3. data/lib/trade-o-matic/adapters/base/raw_balance.rb +7 -0
  4. data/lib/trade-o-matic/adapters/base/raw_resource.rb +31 -0
  5. data/lib/trade-o-matic/adapters/bitstamp_backend.rb +166 -0
  6. data/lib/trade-o-matic/adapters/fake_backend.rb +235 -0
  7. data/lib/trade-o-matic/adapters/itbit_backend.rb +57 -0
  8. data/lib/trade-o-matic/adapters/surbtc_backend.rb +149 -0
  9. data/lib/trade-o-matic/cli.rb +6 -22
  10. data/lib/trade-o-matic/converters/compound_converter.rb +13 -0
  11. data/lib/trade-o-matic/converters/fixed_converter.rb +0 -7
  12. data/lib/trade-o-matic/converters/inverse_converter.rb +13 -0
  13. data/lib/trade-o-matic/converters/json_api_converter.rb +20 -0
  14. data/lib/trade-o-matic/converters/sync_converter.rb +1 -11
  15. data/lib/trade-o-matic/core/account.rb +75 -0
  16. data/lib/trade-o-matic/core/account_order.rb +99 -0
  17. data/lib/trade-o-matic/core/account_proxy.rb +48 -0
  18. data/lib/trade-o-matic/core/balance.rb +57 -0
  19. data/lib/trade-o-matic/core/exchange.rb +19 -0
  20. data/lib/trade-o-matic/core/market.rb +29 -0
  21. data/lib/trade-o-matic/core/market_loader.rb +29 -0
  22. data/lib/trade-o-matic/services/backend_factory.rb +46 -0
  23. data/lib/trade-o-matic/structs/ask_slope.rb +4 -1
  24. data/lib/trade-o-matic/structs/bid_slope.rb +4 -1
  25. data/lib/trade-o-matic/structs/book.rb +52 -0
  26. data/lib/trade-o-matic/structs/converter.rb +2 -3
  27. data/lib/trade-o-matic/structs/currency.rb +126 -21
  28. data/lib/trade-o-matic/structs/currency_pair.rb +31 -5
  29. data/lib/trade-o-matic/structs/order.rb +53 -1
  30. data/lib/trade-o-matic/structs/price.rb +9 -8
  31. data/lib/trade-o-matic/structs/slope.rb +11 -34
  32. data/lib/trade-o-matic/support/converter_configurator.rb +35 -0
  33. data/lib/trade-o-matic/version.rb +1 -1
  34. data/lib/trade-o-matic.rb +29 -1
  35. metadata +59 -43
  36. data/lib/trade-o-matic/adapters/bitstamp_account.rb +0 -63
  37. data/lib/trade-o-matic/flows/ask_replicator_flow.rb +0 -50
  38. data/lib/trade-o-matic/generators/linear_generator.rb +0 -37
  39. data/lib/trade-o-matic/structs/market.rb +0 -28
@@ -1,21 +1,63 @@
1
1
  module Trader
2
2
  class Currency
3
-
4
- def self.register_conversion(_to, _from, _converter=nil, &_block)
5
- _to = _to.code if _to.is_a? Currency
6
- _from = _from.code if _from.is_a? Currency
7
-
3
+ def self.register_conversion(_from, _to, _converter=nil, &_block)
8
4
  if !_block.nil?
9
- _converter = SyncConverter.new(300, &_block)
5
+ _converter = SyncConverter.new(60, &_block)
10
6
  elsif _converter.is_a? Integer or _converter.is_a? Float
11
7
  _converter = FixedConverter.new(_converter)
12
8
  end
13
9
 
14
- converters["#{_to}-#{_from}"] = _converter
10
+ converters[_from.to_sym][_to.to_sym] = _converter
11
+ reset_comp_cache
12
+ end
13
+
14
+ def self.register_resolution(*_chain)
15
+ converters[_chain.first][_chain.last] = build_compound_converter _chain
16
+ end
17
+
18
+ def self.reset_converters
19
+ converters.clear
20
+ reset_comp_cache
21
+ end
22
+
23
+ def self.isolate_conversions
24
+ old_converters = @@converters
25
+ old_cache = @@comp_cache
26
+
27
+ begin
28
+ @@converters = clone_converter_hash @@converters
29
+ @@comp_cache = clone_converter_hash @@comp_cache
30
+ yield
31
+ ensure
32
+ @@converters = old_converters
33
+ @@comp_cache = old_cache
34
+ end
35
+ end
36
+
37
+ def self.converter_for(_from, _to)
38
+ converter_for!(_from, _to) rescue nil
39
+ end
40
+
41
+ def self.converter_for!(_from, _to)
42
+ _from = _from.code if _from.is_a? Currency
43
+ _to = _to.code if _to.is_a? Currency
44
+
45
+ cv = converters[_from][_to] || comp_cache[_from][_to]
46
+
47
+ if cv.nil?
48
+ chains = []
49
+ resolve_converter(_from, _to, [_from], chains)
50
+ raise ArgumentError, "No converter registered for #{_from}/#{_to}" if chains.count == 0
51
+ raise ArgumentError, "Ambiguous conversion path for #{_from}/#{_to}" if chains.count > 1
52
+ comp_cache[_from][_to] = cv = build_compound_converter chains.first
53
+ end
54
+
55
+ cv
15
56
  end
16
57
 
17
58
  def self.for_code(_code)
18
- registry[_code]
59
+ return _code if _code.is_a? Currency
60
+ registry[_code.to_sym]
19
61
  end
20
62
 
21
63
  attr_reader :code
@@ -24,40 +66,103 @@ module Trader
24
66
  @code = _code
25
67
  end
26
68
 
27
- def convert(_value, _currency)
28
- _currency = _currency.code if _currency.is_a? Currency
29
- converter_for(code, _currency).convert(_value, code, _currency)
69
+ def convertible_to?(_currency)
70
+ _currency = klass.for_code _currency
71
+ return true if self == _currency
72
+ !klass.converter_for(code, _currency.to_sym).nil?
73
+ end
74
+
75
+ def compatible_with?(_currency)
76
+ _currency = klass.for_code _currency
77
+ convertible_to? _currency and _currency.convertible_to? self
78
+ end
79
+
80
+ def convert(_value, _to)
81
+ klass.converter_for!(code, _to.to_sym).rate * _value
82
+ end
83
+
84
+ def pack(_value)
85
+ if _value.is_a? Price
86
+ raise StandardError, "Invalid value currency" if _value.currency != self
87
+ return _value
88
+ end
89
+
90
+ Price.new self, _value
30
91
  end
31
92
 
32
93
  def unpack(_value, _options={})
33
94
  _options = { default: _options } unless _options.is_a? Hash
34
95
 
35
96
  if _value.is_a? Price
36
- raise StandardError, "Expected value currency to be #{code} (was #{_value.currency.code})" if _value.currency != self
37
- _value.amount
97
+ if _value.currency != self
98
+ _value.currency.convert _value.amount, self
99
+ else
100
+ _value.amount
101
+ end
38
102
  elsif _value.nil?
39
103
  _options[:default]
40
104
  elsif _options.fetch(:strict, true)
41
- raise StandardError, "Must provide a currency bound price"
105
+ raise ArgumentError, "Must provide a currency bound price"
42
106
  else
43
107
  _value
44
108
  end
45
109
  end
46
110
 
47
- private
111
+ def to_s
112
+ code.to_s
113
+ end
114
+
115
+ def to_sym
116
+ code
117
+ end
118
+
119
+ private
120
+
121
+ def self.clone_converter_hash(_hash)
122
+ return nil if _hash.nil?
123
+ h = Hash[_hash.map { |k,v| [k, v.clone] }]
124
+ h.default_proc = proc { |h,k| h[k] = {} }
125
+ h
126
+ end
48
127
 
49
128
  def self.registry
50
- @@registry ||= Hash.new { |h,k| h[k] = self.new(k.to_sym) }
129
+ @@registry ||= Hash.new { |h,k| h[k] = self.new(k) }
51
130
  end
52
131
 
53
132
  def self.converters
54
- @@converters ||= Hash.new
133
+ @@converters ||= Hash.new { |h,k| h[k] = {} }
55
134
  end
56
135
 
57
- def converter_for(_from, _to)
58
- cv = self.class.converters["#{_from}-#{_to}"]
59
- raise StandardError, "No converter registered for #{_from}/#{_to}" if cv.nil?
60
- cv
136
+ def self.comp_cache
137
+ @@comp_cache ||= Hash.new { |h,k| h[k] = {} }
138
+ end
139
+
140
+ def self.reset_comp_cache
141
+ @@comp_cache = nil
142
+ end
143
+
144
+ def self.resolve_converter(_from, _to, _path, _result)
145
+ converters[_from].keys.each do |key|
146
+ next if _path.include? key
147
+ child_path = _path + [key]
148
+ if key == _to
149
+ _result << child_path
150
+ else
151
+ resolve_converter(key, _to, child_path, _result)
152
+ end
153
+ end
154
+ end
155
+
156
+ def self.build_compound_converter(_chain)
157
+ CompoundConverter.new((_chain.count-1).times.map do |i|
158
+ conv = converters[_chain[i]][_chain[i+1]]
159
+ raise ArgumentError, "No converter registered for #{_chain[i]}/#{_chain[i+1]}" if conv.nil?
160
+ conv
161
+ end)
162
+ end
163
+
164
+ def klass
165
+ self.class
61
166
  end
62
167
  end
63
168
  end
@@ -1,14 +1,40 @@
1
1
  module Trader
2
2
  class CurrencyPair
3
-
4
3
  attr_reader :base, :quote
5
4
 
5
+ def self.for_code(_pair, _quote=nil)
6
+ return _pair if _pair.is_a? self
7
+ self.new _pair, _quote
8
+ end
9
+
6
10
  def initialize(_base, _quote)
7
- _base = Currency.for_code _base unless _base.is_a? Currency
8
- _quote = Currency.for_code _quote unless _quote.is_a? Currency
11
+ @base = Currency.for_code _base
12
+ @quote = Currency.for_code _quote
13
+ end
14
+
15
+ def ==(_other)
16
+ return false unless _other.is_a? CurrencyPair
17
+ base == _other.base and quote == _other.quote
18
+ end
19
+
20
+ def convertible_to?(_pair, _quote=nil)
21
+ _pair = for_code _pair, _quote
22
+ base.convertible_to?(_pair.base) and quote.convertible_to?(_pair.quote)
23
+ end
24
+
25
+ def compatible_with?(_pair, _quote=nil)
26
+ _pair = for_code _pair, _quote
27
+ base.compatible_with?(_pair.base) and quote.compatible_with?(_pair.quote)
28
+ end
29
+
30
+ def to_s
31
+ "#{base}/#{quote}"
32
+ end
33
+
34
+ private
9
35
 
10
- @base = _base
11
- @quote = _quote
36
+ def for_code(_pair, _quote=nil)
37
+ self.class.for_code _pair, _quote
12
38
  end
13
39
  end
14
40
  end
@@ -1,3 +1,55 @@
1
1
  module Trader
2
- class Order < Struct.new(:price, :volume); end
2
+ class Order
3
+ BID = :bid
4
+ ASK = :ask
5
+
6
+ def self.new_bid(_pair, _volume, _price = nil)
7
+ new _pair, BID, _volume, _price
8
+ end
9
+
10
+ def self.new_ask(_pair, _volume, _price = nil)
11
+ new _pair, ASK, _volume, _price
12
+ end
13
+
14
+ attr_accessor :pair, :instruction
15
+
16
+ def initialize(_pair, _instruction, _volume, _price)
17
+ @pair = _pair
18
+ @instruction = _instruction
19
+ self.volume = _volume
20
+ self.price = _price
21
+ end
22
+
23
+ def limit?
24
+ !@price.nil?
25
+ end
26
+
27
+ def market?
28
+ !limit?
29
+ end
30
+
31
+ def volume
32
+ pair.base.pack @volume
33
+ end
34
+
35
+ def volume=(_value)
36
+ @volume = pair.base.unpack(_value, strict: false)
37
+ end
38
+
39
+ def price
40
+ limit? ? pair.quote.pack(@price) : nil
41
+ end
42
+
43
+ def price=(_value)
44
+ @price = _value.nil? ? nil : pair.quote.unpack(_value, strict: false)
45
+ end
46
+
47
+ def convert_to(_pair, _quote = nil)
48
+ _pair = CurrencyPair.for_code _pair, _quote
49
+
50
+ return self if _pair == pair
51
+
52
+ self.class.new(_pair, instruction, volume, price)
53
+ end
54
+ end
3
55
  end
@@ -1,17 +1,18 @@
1
1
  module Trader
2
2
  class Price
3
-
4
3
  attr_reader :currency, :amount
5
4
 
6
5
  def initialize(_currency, _amount)
7
- _currency = Currency.for_code(_currency) unless _currency.is_a? Currency
8
-
9
- @currency = _currency
6
+ @currency = Currency.for_code _currency
10
7
  @amount = _amount
11
8
  end
12
9
 
13
- def convert(_other_currency)
14
- _other_currency = Currency.for _other_currency unless _other_currency.is_a? Currency
10
+ def pack(_amount)
11
+ currency.pack _amount
12
+ end
13
+
14
+ def convert_to(_other_currency)
15
+ _other_currency = Currency.for_code _other_currency
15
16
 
16
17
  return self if _other_currency == currency
17
18
 
@@ -25,14 +26,14 @@ module Trader
25
26
 
26
27
  [:<, :<=, :>=, :>, :==, '<=>'].each do |op|
27
28
  define_method(op) do |_other|
28
- _other = currency.unpack(_other)
29
+ _other = currency.unpack(_other, strict: false)
29
30
  amount.public_send(op, _other)
30
31
  end
31
32
  end
32
33
 
33
34
  [:+, :-, :*, :/].each do |op|
34
35
  define_method(op) do |_other|
35
- _other = currency.unpack(_other)
36
+ _other = currency.unpack(_other, strict: false)
36
37
  Price.new currency, amount.public_send(op, _other)
37
38
  end
38
39
  end
@@ -1,47 +1,23 @@
1
1
  module Trader
2
2
  class Slope
3
-
4
3
  attr_reader :pair
5
4
 
6
- def initialize(_pair, _ref_time=nil)
5
+ def initialize(_pair)
7
6
  @pair = _pair
7
+ reset
8
+ end
9
+
10
+ def reset
8
11
  @orders = []
9
- @transactions = []
10
12
  @orders_sorted = false
11
- @ref_time = _ref_time || Time.now
12
13
  end
13
14
 
14
15
  def add_order(_price, _volume)
15
16
  @orders_sorted = false
16
- @orders << Order.new(
17
- Price.new(pair.quote, _price),
18
- Price.new(pair.base, _volume),
19
- )
17
+ @orders << Order.new(pair, instruction, _volume, _price)
20
18
  nil
21
19
  end
22
20
 
23
- def add_transaction(_price, _volume, _time)
24
- @transactions << Transaction.new(
25
- Price.new(pair.quote, _price),
26
- Price.new(pair.base, _volume),
27
- _time
28
- )
29
- nil
30
- end
31
-
32
- def volume(_period_seconds)
33
- ref_time = @ref_time - _period_seconds
34
- amount = @transactions.inject(0.0) do |r, trx|
35
- if trx.time >= ref_time
36
- r + trx.volume.amount
37
- else
38
- r
39
- end
40
- end
41
-
42
- Price.new pair.base, amount
43
- end
44
-
45
21
  def price(_skip_volume=nil)
46
22
  _skip_volume = pair.base.unpack _skip_volume, 0.0
47
23
 
@@ -101,9 +77,7 @@ module Trader
101
77
  Price.new pair.base, total_volume
102
78
  end
103
79
 
104
- private
105
-
106
- attr_reader :transactions
80
+ private
107
81
 
108
82
  def orders
109
83
  unless @orders_sorted
@@ -139,9 +113,12 @@ module Trader
139
113
  _orders.sort! { |a, b| compare a.price.amount, b.price.amount }
140
114
  end
141
115
 
142
- def compare(_price_a, _price_b)
116
+ def order_type
143
117
  # abstract
144
118
  end
145
119
 
120
+ def compare(_price_a, _price_b)
121
+ # abstract
122
+ end
146
123
  end
147
124
  end
@@ -0,0 +1,35 @@
1
+ module Trader
2
+ module ConverterConfigurator
3
+ extend self
4
+
5
+ def from_yaml(_yaml)
6
+ _yaml.each do |conv|
7
+ type = conv['type'] || detect_type(conv)
8
+ converter = send "configure_yaml_#{type}", conv
9
+
10
+ Currency.register_conversion conv['from'], conv['to'], converter
11
+ Currency.register_conversion conv['to'], conv['from'], invert(converter) if conv['symetric']
12
+ end
13
+ end
14
+
15
+ private
16
+
17
+ def configure_yaml_fixed(_params)
18
+ FixedConverter.new _params['rate']
19
+ end
20
+
21
+ def configure_yaml_json_api(_params)
22
+ require 'trade-o-matic/converters/json_api_converter'
23
+ JsonApiConverter.new(_params['url'], _params['path'].split('.'), _params['ttl'] || 30)
24
+ end
25
+
26
+ def invert(_converter)
27
+ InverseConverter.new _converter
28
+ end
29
+
30
+ def detect_type(_params)
31
+ return 'json_api' if _params['url']
32
+ return 'fixed'
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module Trader
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/trade-o-matic.rb CHANGED
@@ -6,14 +6,42 @@ require 'trade-o-matic/structs/converter'
6
6
  require 'trade-o-matic/structs/price'
7
7
  require 'trade-o-matic/structs/order'
8
8
  require 'trade-o-matic/structs/transaction'
9
- require 'trade-o-matic/structs/market'
10
9
  require 'trade-o-matic/structs/slope'
11
10
  require 'trade-o-matic/structs/ask_slope'
12
11
  require 'trade-o-matic/structs/bid_slope'
12
+ require 'trade-o-matic/structs/book'
13
+
14
+ require 'trade-o-matic/services/backend_factory'
15
+
16
+ require 'trade-o-matic/core/market_loader'
17
+ require 'trade-o-matic/core/exchange'
18
+ require 'trade-o-matic/core/market'
19
+ require 'trade-o-matic/core/account'
20
+ require 'trade-o-matic/core/account_proxy'
21
+ require 'trade-o-matic/core/account_order'
22
+ require 'trade-o-matic/core/balance'
13
23
 
14
24
  require 'trade-o-matic/converters/fixed_converter'
15
25
  require 'trade-o-matic/converters/sync_converter'
26
+ require 'trade-o-matic/converters/inverse_converter'
27
+ require 'trade-o-matic/converters/compound_converter'
16
28
 
17
29
  module Trader
18
30
 
31
+ # Default conversions
32
+ Currency.register_conversion :BTC, :SATOSHI, 100_000_000
33
+ Currency.register_conversion :SATOSHI, :BTC, 0.00000001
34
+
35
+ def self.exchange(_backend)
36
+ Exchange.new BackendFactory.build(_backend)
37
+ end
38
+
39
+ def self.market(_backend, _pair, _quote=nil)
40
+ exchange(_backend).market_for(_pair, _quote)
41
+ end
42
+
43
+ def self.account(_backend, _credentials)
44
+ exchange(_backend).login(_credentials)
45
+ end
46
+
19
47
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trade-o-matic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: gli
14
+ name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '2.12'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: '2.12'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: inquirer
28
+ name: gli
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0.2'
33
+ version: '2.12'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0.2'
40
+ version: '2.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rainbow
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,34 +52,6 @@ dependencies:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry-byebug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '3.2'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '3.2'
69
- - !ruby/object:Gem::Dependency
70
- name: rest-client
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: bundler
85
57
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +184,20 @@ dependencies:
212
184
  - - ~>
213
185
  - !ruby/object:Gem::Version
214
186
  version: '0.1'
187
+ - !ruby/object:Gem::Dependency
188
+ name: pry-byebug
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ~>
192
+ - !ruby/object:Gem::Version
193
+ version: '3.2'
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ~>
199
+ - !ruby/object:Gem::Version
200
+ version: '3.2'
215
201
  - !ruby/object:Gem::Dependency
216
202
  name: pry-nav
217
203
  requirement: !ruby/object:Gem::Requirement
@@ -226,6 +212,20 @@ dependencies:
226
212
  - - ~>
227
213
  - !ruby/object:Gem::Version
228
214
  version: '0.2'
215
+ - !ruby/object:Gem::Dependency
216
+ name: webmock
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ~>
220
+ - !ruby/object:Gem::Version
221
+ version: '1.22'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ~>
227
+ - !ruby/object:Gem::Version
228
+ version: '1.22'
229
229
  description: Yep
230
230
  email:
231
231
  - ignacio@platan.us
@@ -236,22 +236,38 @@ extra_rdoc_files: []
236
236
  files:
237
237
  - bin/trader
238
238
  - lib/trade-o-matic.rb
239
- - lib/trade-o-matic/adapters/bitstamp_account.rb
239
+ - lib/trade-o-matic/adapters/base/raw_account_order.rb
240
+ - lib/trade-o-matic/adapters/base/raw_balance.rb
241
+ - lib/trade-o-matic/adapters/base/raw_resource.rb
242
+ - lib/trade-o-matic/adapters/bitstamp_backend.rb
243
+ - lib/trade-o-matic/adapters/fake_backend.rb
244
+ - lib/trade-o-matic/adapters/itbit_backend.rb
245
+ - lib/trade-o-matic/adapters/surbtc_backend.rb
240
246
  - lib/trade-o-matic/cli.rb
247
+ - lib/trade-o-matic/converters/compound_converter.rb
241
248
  - lib/trade-o-matic/converters/fixed_converter.rb
249
+ - lib/trade-o-matic/converters/inverse_converter.rb
250
+ - lib/trade-o-matic/converters/json_api_converter.rb
242
251
  - lib/trade-o-matic/converters/sync_converter.rb
243
- - lib/trade-o-matic/flows/ask_replicator_flow.rb
244
- - lib/trade-o-matic/generators/linear_generator.rb
252
+ - lib/trade-o-matic/core/account.rb
253
+ - lib/trade-o-matic/core/account_order.rb
254
+ - lib/trade-o-matic/core/account_proxy.rb
255
+ - lib/trade-o-matic/core/balance.rb
256
+ - lib/trade-o-matic/core/exchange.rb
257
+ - lib/trade-o-matic/core/market.rb
258
+ - lib/trade-o-matic/core/market_loader.rb
259
+ - lib/trade-o-matic/services/backend_factory.rb
245
260
  - lib/trade-o-matic/structs/ask_slope.rb
246
261
  - lib/trade-o-matic/structs/bid_slope.rb
262
+ - lib/trade-o-matic/structs/book.rb
247
263
  - lib/trade-o-matic/structs/converter.rb
248
264
  - lib/trade-o-matic/structs/currency.rb
249
265
  - lib/trade-o-matic/structs/currency_pair.rb
250
- - lib/trade-o-matic/structs/market.rb
251
266
  - lib/trade-o-matic/structs/order.rb
252
267
  - lib/trade-o-matic/structs/price.rb
253
268
  - lib/trade-o-matic/structs/slope.rb
254
269
  - lib/trade-o-matic/structs/transaction.rb
270
+ - lib/trade-o-matic/support/converter_configurator.rb
255
271
  - lib/trade-o-matic/version.rb
256
272
  homepage: https://github.com/surbtc/trade-o-matic
257
273
  licenses:
@@ -273,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
289
  version: '0'
274
290
  requirements: []
275
291
  rubyforge_project:
276
- rubygems_version: 2.4.8
292
+ rubygems_version: 2.6.1
277
293
  signing_key:
278
294
  specification_version: 4
279
295
  summary: Trade-O-Matic is a trade automation framework