okx_convert_contract_coin
Convert between contract units and coin amounts for OKX perpetual swaps. Calculate required size for opening or closing positions using specified unit type.
Instructions
[L:READ] CAT:[公共] | → 请先调用 agent_catalog
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instId": "<instId>",
"sz": "<sz>",
"unit": "<unit>",
"opType": "<opType>"
},
"name": "okx_convert_contract_coin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sz | Yes | 数量(张数或币数,取决于unit) | |
| unit | Yes | sz的单位:coin=币,contracts=张 | |
| instId | Yes | 产品ID,如 BTC-USDT-SWAP | |
| opType | Yes | 开仓或平仓 |