Class: Tastytrade::Models::Fill
- Defined in:
- lib/tastytrade/models/live_order.rb
Overview
Represents a fill execution
Instance Attribute Summary collapse
-
#destination_venue ⇒ Object
readonly
Returns the value of attribute destination_venue.
-
#ext_exec_id ⇒ Object
readonly
Returns the value of attribute ext_exec_id.
-
#ext_group_fill_id ⇒ Object
readonly
Returns the value of attribute ext_group_fill_id.
-
#fill_id ⇒ Object
readonly
Returns the value of attribute fill_id.
-
#fill_price ⇒ Object
readonly
Returns the value of attribute fill_price.
-
#filled_at ⇒ Object
readonly
Returns the value of attribute filled_at.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
Attributes inherited from Base
Instance Method Summary collapse
-
#to_h ⇒ Object
Convert to hash for JSON serialization.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Tastytrade::Models::Base
Instance Attribute Details
#destination_venue ⇒ Object (readonly)
Returns the value of attribute destination_venue.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def destination_venue @destination_venue end |
#ext_exec_id ⇒ Object (readonly)
Returns the value of attribute ext_exec_id.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def ext_exec_id @ext_exec_id end |
#ext_group_fill_id ⇒ Object (readonly)
Returns the value of attribute ext_group_fill_id.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def ext_group_fill_id @ext_group_fill_id end |
#fill_id ⇒ Object (readonly)
Returns the value of attribute fill_id.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def fill_id @fill_id end |
#fill_price ⇒ Object (readonly)
Returns the value of attribute fill_price.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def fill_price @fill_price end |
#filled_at ⇒ Object (readonly)
Returns the value of attribute filled_at.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def filled_at @filled_at end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
238 239 240 |
# File 'lib/tastytrade/models/live_order.rb', line 238 def quantity @quantity end |
Instance Method Details
#to_h ⇒ Object
Convert to hash for JSON serialization
242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/tastytrade/models/live_order.rb', line 242 def to_h { ext_exec_id: @ext_exec_id, ext_group_fill_id: @ext_group_fill_id, fill_id: @fill_id, quantity: @quantity, fill_price: @fill_price&.to_s("F"), filled_at: @filled_at&.iso8601, destination_venue: @destination_venue }.compact end |