cryptum 0.0.405 → 0.0.406

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3595a65dddc3893c7a6aefd06d4328fe638bba31083d61ffcf93eab3a3eb79e9
4
- data.tar.gz: b383106d2c4e11d812382845281b8de12fe3d69fa122eb9661a3b7d32ff38b5f
3
+ metadata.gz: 05b55ff889f701b5b9251d5402e5035b85afea07941b6fbee8669ecd7f595cff
4
+ data.tar.gz: e30d334ab26991773b705344488954457e5ab7ac1a275267f77b4bc32b025938
5
5
  SHA512:
6
- metadata.gz: cc9b3b33cf3f9dc8facb3488373e2d899ebaf907d0c5b10d85200c10f4f1a7aed7ae11934f56ce673e04de76cd3ed648f6001c43a537bdfd4135715b26b87de0
7
- data.tar.gz: 56e157079d839a1821e2e4e0b1b310013212a8d8d9b9d21438f47a1b244867b2f2f3546756421e93997e5cba5261c2f415fa015690451a0088b21ae3b9d2f65c
6
+ metadata.gz: bf629833581fb93f5df8015080f211c999f920df965c1ca2704101d191f1eaac5e391d85ec6179f5e8a636764832c887da7e8802a0b99af1d8152bef84559519
7
+ data.tar.gz: d9278fc8041bd2376dd08eae0c6a255c8fb7e39e40ee8c12ebf21cf63af9b6a4589b2ebf59acbffda1213ba099e44916a0dc888679d997ead8f4cc7e1946100f
@@ -249,9 +249,19 @@ module Cryptum
249
249
 
250
250
  meta[:done_at] = Time.now.strftime('%Y-%m-%d %H:%M:%S.%N%z')
251
251
  meta[:color] = :green
252
+
253
+ # Obtain buy && sell order details from order history
254
+ # using buy && sell IDs from respective meta object
255
+ # and append to JSON log to allow for machine learning.
256
+ buy_order_id = meta[:buy_order_id]
257
+ learning = meta
258
+ order_history_buy_details = order_history.select {|oh| oh[:id] == buy_order_id }
259
+ order_history_sell_details = order_history.select {|oh| oh[:id] == sell_order_id }
260
+ learning[:buy_details] = order_history_buy_details.first
261
+ learning[:sell_details] = order_history_sell_details.first
252
262
  Cryptum::Log.append(
253
263
  level: :learning,
254
- msg: meta,
264
+ msg: learning,
255
265
  which_self: self,
256
266
  event_history: event_history
257
267
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.405'
4
+ VERSION = '0.0.406'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.405
4
+ version: 0.0.406
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.