Class: DhanHQ::Events::PositionOpened

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

Overview

Position opened 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

#quantityObject



156
157
158
# File 'lib/DhanHQ/events/base.rb', line 156

def quantity
  data[:quantity]
end

#security_idObject



152
153
154
# File 'lib/DhanHQ/events/base.rb', line 152

def security_id
  data[:security_id]
end

#sideObject



160
161
162
# File 'lib/DhanHQ/events/base.rb', line 160

def side
  data[:side]
end

#to_sObject



164
165
166
# File 'lib/DhanHQ/events/base.rb', line 164

def to_s
  "PositionOpened(#{security_id}, #{side} #{quantity})"
end