if (FALSE) {
# for [Get currencies](https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies)
# you can define the class like this
myRestAPI <- R6::R6Class(
inherit = restAPI,
public = list(
get_currencies = function(ccy, process = "identity") {
self$get_result(
api = "/api/v5/asset/currencies", method = "GET", process = process,
ccy = ccy
)
}
)
)
# And call it like this
tmp <- myRestAPI$new(api_key, secret_key, passphrase)
tmp$get_currencies("BTC")
}
Run the code above in your browser using DataLab