# Binance Public Spot API
#
# OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en)
#
# The version of the OpenAPI document: 1.0
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title OrderResponseFull
#'
#' @description OrderResponseFull Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field symbol character
#'
#' @field orderId integer
#'
#' @field orderListId integer
#'
#' @field clientOrderId character
#'
#' @field transactTime integer
#'
#' @field price character
#'
#' @field origQty character
#'
#' @field executedQty character
#'
#' @field cummulativeQuoteQty character
#'
#' @field status character
#'
#' @field timeInForce character
#'
#' @field type character
#'
#' @field side character
#'
#' @field fills list( \link{OrderResponseFullFills} )
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
OrderResponseFull <- R6::R6Class(
'OrderResponseFull',
public = list(
`symbol` = NULL,
`orderId` = NULL,
`orderListId` = NULL,
`clientOrderId` = NULL,
`transactTime` = NULL,
`price` = NULL,
`origQty` = NULL,
`executedQty` = NULL,
`cummulativeQuoteQty` = NULL,
`status` = NULL,
`timeInForce` = NULL,
`type` = NULL,
`side` = NULL,
`fills` = NULL,
initialize = function(
`symbol`, `orderId`, `orderListId`, `clientOrderId`, `transactTime`, `price`, `origQty`, `executedQty`, `cummulativeQuoteQty`, `status`, `timeInForce`, `type`, `side`, `fills`, ...
) {
local.optional.var <- list(...)
if (!missing(`symbol`)) {
stopifnot(is.character(`symbol`), length(`symbol`) == 1)
self$`symbol` <- `symbol`
}
if (!missing(`orderId`)) {
stopifnot(is.numeric(`orderId`), length(`orderId`) == 1)
self$`orderId` <- `orderId`
}
if (!missing(`orderListId`)) {
stopifnot(is.numeric(`orderListId`), length(`orderListId`) == 1)
self$`orderListId` <- `orderListId`
}
if (!missing(`clientOrderId`)) {
stopifnot(is.character(`clientOrderId`), length(`clientOrderId`) == 1)
self$`clientOrderId` <- `clientOrderId`
}
if (!missing(`transactTime`)) {
stopifnot(is.numeric(`transactTime`), length(`transactTime`) == 1)
self$`transactTime` <- `transactTime`
}
if (!missing(`price`)) {
stopifnot(is.character(`price`), length(`price`) == 1)
self$`price` <- `price`
}
if (!missing(`origQty`)) {
stopifnot(is.character(`origQty`), length(`origQty`) == 1)
self$`origQty` <- `origQty`
}
if (!missing(`executedQty`)) {
stopifnot(is.character(`executedQty`), length(`executedQty`) == 1)
self$`executedQty` <- `executedQty`
}
if (!missing(`cummulativeQuoteQty`)) {
stopifnot(is.character(`cummulativeQuoteQty`), length(`cummulativeQuoteQty`) == 1)
self$`cummulativeQuoteQty` <- `cummulativeQuoteQty`
}
if (!missing(`status`)) {
stopifnot(is.character(`status`), length(`status`) == 1)
self$`status` <- `status`
}
if (!missing(`timeInForce`)) {
stopifnot(is.character(`timeInForce`), length(`timeInForce`) == 1)
self$`timeInForce` <- `timeInForce`
}
if (!missing(`type`)) {
stopifnot(is.character(`type`), length(`type`) == 1)
self$`type` <- `type`
}
if (!missing(`side`)) {
stopifnot(is.character(`side`), length(`side`) == 1)
self$`side` <- `side`
}
if (!missing(`fills`)) {
stopifnot(is.vector(`fills`), length(`fills`) != 0)
sapply(`fills`, function(x) stopifnot(R6::is.R6(x)))
self$`fills` <- `fills`
}
},
toJSON = function() {
OrderResponseFullObject <- list()
if (!is.null(self$`symbol`)) {
OrderResponseFullObject[['symbol']] <-
self$`symbol`
}
if (!is.null(self$`orderId`)) {
OrderResponseFullObject[['orderId']] <-
self$`orderId`
}
if (!is.null(self$`orderListId`)) {
OrderResponseFullObject[['orderListId']] <-
self$`orderListId`
}
if (!is.null(self$`clientOrderId`)) {
OrderResponseFullObject[['clientOrderId']] <-
self$`clientOrderId`
}
if (!is.null(self$`transactTime`)) {
OrderResponseFullObject[['transactTime']] <-
self$`transactTime`
}
if (!is.null(self$`price`)) {
OrderResponseFullObject[['price']] <-
self$`price`
}
if (!is.null(self$`origQty`)) {
OrderResponseFullObject[['origQty']] <-
self$`origQty`
}
if (!is.null(self$`executedQty`)) {
OrderResponseFullObject[['executedQty']] <-
self$`executedQty`
}
if (!is.null(self$`cummulativeQuoteQty`)) {
OrderResponseFullObject[['cummulativeQuoteQty']] <-
self$`cummulativeQuoteQty`
}
if (!is.null(self$`status`)) {
OrderResponseFullObject[['status']] <-
self$`status`
}
if (!is.null(self$`timeInForce`)) {
OrderResponseFullObject[['timeInForce']] <-
self$`timeInForce`
}
if (!is.null(self$`type`)) {
OrderResponseFullObject[['type']] <-
self$`type`
}
if (!is.null(self$`side`)) {
OrderResponseFullObject[['side']] <-
self$`side`
}
if (!is.null(self$`fills`)) {
OrderResponseFullObject[['fills']] <-
lapply(self$`fills`, function(x) x$toJSON())
}
OrderResponseFullObject
},
fromJSON = function(OrderResponseFullJson) {
OrderResponseFullObject <- jsonlite::fromJSON(OrderResponseFullJson)
if (!is.null(OrderResponseFullObject$`symbol`)) {
self$`symbol` <- OrderResponseFullObject$`symbol`
}
if (!is.null(OrderResponseFullObject$`orderId`)) {
self$`orderId` <- OrderResponseFullObject$`orderId`
}
if (!is.null(OrderResponseFullObject$`orderListId`)) {
self$`orderListId` <- OrderResponseFullObject$`orderListId`
}
if (!is.null(OrderResponseFullObject$`clientOrderId`)) {
self$`clientOrderId` <- OrderResponseFullObject$`clientOrderId`
}
if (!is.null(OrderResponseFullObject$`transactTime`)) {
self$`transactTime` <- OrderResponseFullObject$`transactTime`
}
if (!is.null(OrderResponseFullObject$`price`)) {
self$`price` <- OrderResponseFullObject$`price`
}
if (!is.null(OrderResponseFullObject$`origQty`)) {
self$`origQty` <- OrderResponseFullObject$`origQty`
}
if (!is.null(OrderResponseFullObject$`executedQty`)) {
self$`executedQty` <- OrderResponseFullObject$`executedQty`
}
if (!is.null(OrderResponseFullObject$`cummulativeQuoteQty`)) {
self$`cummulativeQuoteQty` <- OrderResponseFullObject$`cummulativeQuoteQty`
}
if (!is.null(OrderResponseFullObject$`status`)) {
self$`status` <- OrderResponseFullObject$`status`
}
if (!is.null(OrderResponseFullObject$`timeInForce`)) {
self$`timeInForce` <- OrderResponseFullObject$`timeInForce`
}
if (!is.null(OrderResponseFullObject$`type`)) {
self$`type` <- OrderResponseFullObject$`type`
}
if (!is.null(OrderResponseFullObject$`side`)) {
self$`side` <- OrderResponseFullObject$`side`
}
if (!is.null(OrderResponseFullObject$`fills`)) {
self$`fills` <- ApiClient$new()$deserializeObj(OrderResponseFullObject$`fills`, "array[OrderResponseFullFills]", loadNamespace("binanceRapi"))
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`symbol`)) {
sprintf(
'"symbol":
"%s"
',
self$`symbol`
)},
if (!is.null(self$`orderId`)) {
sprintf(
'"orderId":
%d
',
self$`orderId`
)},
if (!is.null(self$`orderListId`)) {
sprintf(
'"orderListId":
%d
',
self$`orderListId`
)},
if (!is.null(self$`clientOrderId`)) {
sprintf(
'"clientOrderId":
"%s"
',
self$`clientOrderId`
)},
if (!is.null(self$`transactTime`)) {
sprintf(
'"transactTime":
%d
',
self$`transactTime`
)},
if (!is.null(self$`price`)) {
sprintf(
'"price":
"%s"
',
self$`price`
)},
if (!is.null(self$`origQty`)) {
sprintf(
'"origQty":
"%s"
',
self$`origQty`
)},
if (!is.null(self$`executedQty`)) {
sprintf(
'"executedQty":
"%s"
',
self$`executedQty`
)},
if (!is.null(self$`cummulativeQuoteQty`)) {
sprintf(
'"cummulativeQuoteQty":
"%s"
',
self$`cummulativeQuoteQty`
)},
if (!is.null(self$`status`)) {
sprintf(
'"status":
"%s"
',
self$`status`
)},
if (!is.null(self$`timeInForce`)) {
sprintf(
'"timeInForce":
"%s"
',
self$`timeInForce`
)},
if (!is.null(self$`type`)) {
sprintf(
'"type":
"%s"
',
self$`type`
)},
if (!is.null(self$`side`)) {
sprintf(
'"side":
"%s"
',
self$`side`
)},
if (!is.null(self$`fills`)) {
sprintf(
'"fills":
[%s]
',
paste(sapply(self$`fills`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(OrderResponseFullJson) {
OrderResponseFullObject <- jsonlite::fromJSON(OrderResponseFullJson)
self$`symbol` <- OrderResponseFullObject$`symbol`
self$`orderId` <- OrderResponseFullObject$`orderId`
self$`orderListId` <- OrderResponseFullObject$`orderListId`
self$`clientOrderId` <- OrderResponseFullObject$`clientOrderId`
self$`transactTime` <- OrderResponseFullObject$`transactTime`
self$`price` <- OrderResponseFullObject$`price`
self$`origQty` <- OrderResponseFullObject$`origQty`
self$`executedQty` <- OrderResponseFullObject$`executedQty`
self$`cummulativeQuoteQty` <- OrderResponseFullObject$`cummulativeQuoteQty`
self$`status` <- OrderResponseFullObject$`status`
self$`timeInForce` <- OrderResponseFullObject$`timeInForce`
self$`type` <- OrderResponseFullObject$`type`
self$`side` <- OrderResponseFullObject$`side`
self$`fills` <- ApiClient$new()$deserializeObj(OrderResponseFullObject$`fills`, "array[OrderResponseFullFills]", loadNamespace("binanceRapi"))
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.