Class: Darwinex::Product
- Inherits:
-
Object
- Object
- Darwinex::Product
- Defined in:
- lib/darwinex/product.rb
Instance Attribute Summary collapse
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
Instance Method Summary collapse
- #badges ⇒ Object
- #candles(resolution: nil, from:, to:) ⇒ Object
- #capacity ⇒ Object
- #close_strategy ⇒ Object
- #duration_consistency ⇒ Object
- #dxscore ⇒ Object
- #experience ⇒ Object
-
#initialize(product_name:, info_api:) ⇒ Product
constructor
A new instance of Product.
- #losing_consistency ⇒ Object
- #market_correlation ⇒ Object
- #monthly_divergence ⇒ Object
- #open_strategy ⇒ Object
- #order_divergence ⇒ Object
- #performance ⇒ Object
- #quotes(from: nil, to: nil) ⇒ Object
- #return_divergence ⇒ Object
- #risk_adjustment ⇒ Object
- #risk_stability ⇒ Object
- #scores(badge: nil) ⇒ Object
- #status ⇒ Object
- #winning_consistency ⇒ Object
Constructor Details
#initialize(product_name:, info_api:) ⇒ Product
Returns a new instance of Product.
7 8 9 10 |
# File 'lib/darwinex/product.rb', line 7 def initialize(product_name:, info_api:) @product_name = product_name @info_api = info_api end |
Instance Attribute Details
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
5 6 7 |
# File 'lib/darwinex/product.rb', line 5 def product_name @product_name end |
Instance Method Details
#badges ⇒ Object
25 26 27 |
# File 'lib/darwinex/product.rb', line 25 def badges info_api.get_badges(product_name) end |
#candles(resolution: nil, from:, to:) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/darwinex/product.rb', line 12 def candles(resolution: nil, from:, to:) info_api.get_candles( product_name, resolution: resolution, from: from, to: to ) end |
#capacity ⇒ Object
57 58 59 |
# File 'lib/darwinex/product.rb', line 57 def capacity info_api.get_capacity(product_name) end |
#close_strategy ⇒ Object
29 30 31 |
# File 'lib/darwinex/product.rb', line 29 def close_strategy info_api.get_close_strategy(product_name) end |
#duration_consistency ⇒ Object
33 34 35 |
# File 'lib/darwinex/product.rb', line 33 def duration_consistency info_api.get_duration_consistency(product_name) end |
#dxscore ⇒ Object
21 22 23 |
# File 'lib/darwinex/product.rb', line 21 def dxscore info_api.get_dxscore(product_name) end |
#experience ⇒ Object
37 38 39 |
# File 'lib/darwinex/product.rb', line 37 def experience info_api.get_experience(product_name) end |
#losing_consistency ⇒ Object
41 42 43 |
# File 'lib/darwinex/product.rb', line 41 def losing_consistency info_api.get_losing_consistency(product_name) end |
#market_correlation ⇒ Object
45 46 47 |
# File 'lib/darwinex/product.rb', line 45 def market_correlation info_api.get_market_correlation(product_name) end |
#monthly_divergence ⇒ Object
85 86 87 |
# File 'lib/darwinex/product.rb', line 85 def monthly_divergence info_api.get_monthly_divergence(product_name) end |
#open_strategy ⇒ Object
53 54 55 |
# File 'lib/darwinex/product.rb', line 53 def open_strategy info_api.get_open_strategy(product_name) end |
#order_divergence ⇒ Object
77 78 79 |
# File 'lib/darwinex/product.rb', line 77 def order_divergence info_api.get_order_divergence(product_name) end |
#performance ⇒ Object
49 50 51 |
# File 'lib/darwinex/product.rb', line 49 def performance info_api.get_performance(product_name) end |
#quotes(from: nil, to: nil) ⇒ Object
61 62 63 |
# File 'lib/darwinex/product.rb', line 61 def quotes(from: nil, to: nil) info_api.get_quotes(product_name, from: from, to: to) end |
#return_divergence ⇒ Object
81 82 83 |
# File 'lib/darwinex/product.rb', line 81 def return_divergence info_api.get_return_divergence(product_name) end |
#risk_adjustment ⇒ Object
65 66 67 |
# File 'lib/darwinex/product.rb', line 65 def risk_adjustment info_api.get_risk_adjustment(product_name) end |
#risk_stability ⇒ Object
69 70 71 |
# File 'lib/darwinex/product.rb', line 69 def risk_stability info_api.get_risk_stability(product_name) end |
#scores(badge: nil) ⇒ Object
93 94 95 96 97 98 99 |
# File 'lib/darwinex/product.rb', line 93 def scores(badge: nil) if badge.nil? info_api.get_product_scores(product_name) else info_api.get_product_scores_badge(product_name, badge) end end |
#status ⇒ Object
89 90 91 |
# File 'lib/darwinex/product.rb', line 89 def status info_api.get_product_status(product_name) end |
#winning_consistency ⇒ Object
73 74 75 |
# File 'lib/darwinex/product.rb', line 73 def winning_consistency info_api.get_winning_consistency(product_name) end |