Class: DhanHQ::Events::TPHit

Inherits:
Base
  • Object
show all
Defined in:
lib/DhanHQ/events/base.rb

Overview

Take profit hit event.

Instance Attribute Summary

Attributes inherited from Base

#data, #timestamp

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_h, #to_prompt

Constructor Details

This class inherits a constructor from DhanHQ::Events::Base

Instance Method Details

#order_idObject



118
119
120
# File 'lib/DhanHQ/events/base.rb', line 118

def order_id
  data[:order_id]
end

#target_priceObject



122
123
124
# File 'lib/DhanHQ/events/base.rb', line 122

def target_price
  data[:target_price]
end

#to_sObject



126
127
128
# File 'lib/DhanHQ/events/base.rb', line 126

def to_s
  "TPHit(#{order_id}, target=#{target_price})"
end