View source: R/wrappers_get_market.R
| get_public_convert_contract_coin | R Documentation |
Convert the crypto value to the number of contracts, or vice versa.
get_public_convert_contract_coin(
inst_id,
sz,
type = NULL,
px = NULL,
unit = NULL,
op_type = NULL,
config = NULL,
tz = .okx_default_tz
)
inst_id |
Character. Instrument ID. |
sz |
Character or numeric. Quantity to convert. |
type |
Character or 'NULL'. Convert type: '"1"' for currency to contract, '"2"' for contract to currency. |
px |
Character, numeric, or 'NULL'. Optional order price. |
unit |
Character or 'NULL'. Currency unit, '"coin"' or '"usds"'. |
op_type |
Character or 'NULL'. Order type for futures or swaps, such as '"open"' or '"close"'. |
config |
Optional list. Public endpoint request options, such as 'timeout'; credentials are not required. |
tz |
Character. Time zone for parsing timestamps. Default '"Asia/Hong_Kong"'. |
A 'data.frame' with conversion result fields 'type', 'instId', 'px', 'sz', and 'unit'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.