* 关闭头寸 (统一方法,使用PositionManager) * @param {string} positionAddress - 头寸地址 * @param {string} password - 钱包密码 (可选)
(positionAddress, password = null)
| 542 | * @param {string} password - 钱包密码 (可选) |
| 543 | */ |
| 544 | async closePosition(positionAddress, password = null) { |
| 545 | const body = {}; |
| 546 | if (password) { |
| 547 | body.password = password; |
| 548 | } |
| 549 | |
| 550 | return this.request(`/positions/${positionAddress}/close`, { |
| 551 | method: 'POST', |
| 552 | body: body |
| 553 | }); |
| 554 | } |
| 555 | |
| 556 | /** |
| 557 | * 关闭Y代币头寸 (委托给统一方法) |
no test coverage detected