class

Tradify::Trade

Inherits Reference < Object

Constructors

new(action : Tradify::Action, price : Int32, quantity : Int32 = 1)

Instance methods

action
buy?(*args, **options)
buy?(*args, **options, &)
close
closed?
open?
price
profit_and_loss(market_price)
quantity
sell?(*args, **options)
sell?(*args, **options, &)
short?(*args, **options)
short?(*args, **options, &)
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>