# 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 MarginOcoOrderOrders
#'
#' @description MarginOcoOrderOrders Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field symbol character
#'
#' @field orderId integer
#'
#' @field clientOrderId character
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
MarginOcoOrderOrders <- R6::R6Class(
'MarginOcoOrderOrders',
public = list(
`symbol` = NULL,
`orderId` = NULL,
`clientOrderId` = NULL,
initialize = function(
`symbol`, `orderId`, `clientOrderId`, ...
) {
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(`clientOrderId`)) {
stopifnot(is.character(`clientOrderId`), length(`clientOrderId`) == 1)
self$`clientOrderId` <- `clientOrderId`
}
},
toJSON = function() {
MarginOcoOrderOrdersObject <- list()
if (!is.null(self$`symbol`)) {
MarginOcoOrderOrdersObject[['symbol']] <-
self$`symbol`
}
if (!is.null(self$`orderId`)) {
MarginOcoOrderOrdersObject[['orderId']] <-
self$`orderId`
}
if (!is.null(self$`clientOrderId`)) {
MarginOcoOrderOrdersObject[['clientOrderId']] <-
self$`clientOrderId`
}
MarginOcoOrderOrdersObject
},
fromJSON = function(MarginOcoOrderOrdersJson) {
MarginOcoOrderOrdersObject <- jsonlite::fromJSON(MarginOcoOrderOrdersJson)
if (!is.null(MarginOcoOrderOrdersObject$`symbol`)) {
self$`symbol` <- MarginOcoOrderOrdersObject$`symbol`
}
if (!is.null(MarginOcoOrderOrdersObject$`orderId`)) {
self$`orderId` <- MarginOcoOrderOrdersObject$`orderId`
}
if (!is.null(MarginOcoOrderOrdersObject$`clientOrderId`)) {
self$`clientOrderId` <- MarginOcoOrderOrdersObject$`clientOrderId`
}
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$`clientOrderId`)) {
sprintf(
'"clientOrderId":
"%s"
',
self$`clientOrderId`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(MarginOcoOrderOrdersJson) {
MarginOcoOrderOrdersObject <- jsonlite::fromJSON(MarginOcoOrderOrdersJson)
self$`symbol` <- MarginOcoOrderOrdersObject$`symbol`
self$`orderId` <- MarginOcoOrderOrdersObject$`orderId`
self$`clientOrderId` <- MarginOcoOrderOrdersObject$`clientOrderId`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.