Convert units
Convert between the number of contracts and the amount of coins/quote currency for a derivatives instrument.
Query parameters
type
Conversion type: 1 (convert coin to contracts) or 2 (convert contracts to coin). The default is 1.
Allowed values:
instId
Instrument ID, only applicable to FUTURES/SWAP/OPTION.
sz
Quantity to convert. When converting a currency to contracts, it refers to the amount of coin; when converting contracts to a currency, it refers to the number of contracts.
px
Order price. Not required for SPOT; required for OPTION when unit is usds.
unit
The unit of currency: coin or usds (USDT/USDC). Only applicable to SPOT-margined contracts.
Allowed values:
Response
Successful response
code
Result code. 0 means success; any other value is an error code.
msg
Error message. Empty on success.
data

