Class: DhanHQ::Events::OrderFilled

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

Overview

Order filled 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

#filled_priceObject



58
59
60
# File 'lib/DhanHQ/events/base.rb', line 58

def filled_price
  data[:filled_price]
end

#filled_quantityObject



54
55
56
# File 'lib/DhanHQ/events/base.rb', line 54

def filled_quantity
  data[:filled_quantity]
end

#order_idObject



50
51
52
# File 'lib/DhanHQ/events/base.rb', line 50

def order_id
  data[:order_id]
end

#to_sObject



62
63
64
# File 'lib/DhanHQ/events/base.rb', line 62

def to_s
  "OrderFilled(#{order_id}, #{filled_quantity}@#{filled_price})"
end