class Binance::Responses::Order

Overview

Typical Server Response:

{
  "symbol": "LTCBTC",
  "orderId": 28,
  "origClientOrderId": "myOrder1",
  "clientOrderId": "cancelMyOrder1",
  "transactTime": 1507725176595,
  "price": "1.00000000",
  "origQty": "10.00000000",
  "executedQty": "8.00000000",
  "cummulativeQuoteQty": "8.00000000",
  "status": "CANCELED",
  "timeInForce": "GTC",
  "type": "LIMIT",
  "side": "SELL"
}

price used to be filled, now it seems to always be 0.0

Change log 2018-07-18 states:

cummulativeQuoteQty field added to order responses and execution reports (as variable Z). Represents the cummulative amount of the quote that has been spent (with a BUY order) or received (with a SELL order). Historical orders will have a value < 0 in this field indicating the data is not available at this time.

cummulativeQuoteQty divided by cummulativeQty will give the average price for an order.

NOTE I am not sure exactly what this means, so there are two test specs The original spec in order_spec still has original cassette (signed, so not committed to repo) where price was conveyed, but cummulativeQuoteQty is zero New spec is in new_order_spec and it captures what is apparent current behavior

#average_price implements the above price calculation #effective_fill_price computes from all the fills on the order, but order must be placed with responseType = "FULL" to get that data on placing market orders.

Included Modules

Defined in:

binance/client/rest/responses/order.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

Instance Method Detail

def average_price #

def client_order_id : String #

def cummulative_quote_quantity : Float64 #

def effective_fill_price #

def executed_quantity : Float64 #

def fills : Array(OrderFill) #

def order_id : Int64 #

def order_type : String #

def orig_client_order_id : String #

def original_quantity : Float64 #

def price : Float64 #

def side : String #

def status : String #

def stop_price : Float64 #

def symbol : String #

def time_in_force : String #

def transaction_time : Time #