MCPcopy Create free account
hub / github.com/cryptocj520/meteora2 / closePosition

Method closePosition

web/public/js/api.js:544–554  ·  view source on GitHub ↗

* 关闭头寸 (统一方法,使用PositionManager) * @param {string} positionAddress - 头寸地址 * @param {string} password - 钱包密码 (可选)

(positionAddress, password = null)

Source from the content-addressed store, hash-verified

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代币头寸 (委托给统一方法)

Callers 2

closeYPositionMethod · 0.95
closeXPositionMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected