一、仓位(Positions)
平仓(closePosition)
平仓(close position)是指期货交易者买入或者卖出其所持期货合约的品种、数量及交割月份相同但交易方向相反的期货合约,了结期货交易的行为,简单的说就是“原先买入的就卖出,原先是卖出(沽空)的就买入。”
调用closePosition将执行以下步骤:
-
Query the oracle to obtain the most recent price and funding fee.
查询oracle以获取最新的价格和资金费用。 -
Execute funding payments on the existing position and then update the existing position state.
对现有头寸执行资金支付,然后更新现有头寸状态。 -
Check that the existing position (referenced by positionID) is valid and can be closed.
检查现有position(由positionID引用)是否有效并可以关闭。 -
Create the Makers’ Posit