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