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

Direct Known Subclasses

Defined in:

binance/client/rest/responses/order.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def average_price #

[View source]
def client_order_id : String #

[View source]
def cummulative_quote_quantity : Float64 #

[View source]
def effective_fill_price #

[View source]
def executed_quantity : Float64 #

[View source]
def fills : Array(OrderFill) #

[View source]
def order_id : Int64 #

[View source]
def order_list_id : Int64 #

[View source]
def order_type : String #

[View source]
def orig_client_order_id : String #

[View source]
def original_quantity : Float64 #

[View source]
def price : Float64 #

[View source]
def side : String #

[View source]
def status : String #

[View source]
def stop_price : Float64 #

[View source]
def symbol : String #

[View source]
def time : Time #

[View source]
def time_in_force : String #

[View source]
def transaction_time : Time #

[View source]
def update_time : Time #

[View source]