杠杆外汇
平仓
以市价平掉一个仓位。保证金连同盈亏一起返还。
curl --request POST \
--url "https://reirex.com/api/v1/margin/positions/LP-7K2M4QX3P9/close" \
--header "GX-API-KEY: $GX_API_KEY" \
--header "GX-API-TIMESTAMP: $TIMESTAMP" \
--header "GX-API-SIGN: $SIGNATURE"200 OKapplication/json
{
"reference": "LP-7K2M4QX3P9",
"symbol": "EURUSD",
"side": "long",
"units": "10000.00",
"leverage": 20,
"entryPrice": "1.17447",
"margin": "500.00",
"stopLoss": "1.16500",
"takeProfit": "1.18500",
"status": "closed",
"closePrice": "1.17712",
"pnl": "22.51",
"result": "22.51",
"financing": "0.00",
"fees": "20.00",
"closeReason": "owner",
"openedAt": "2026-10-14T16:14:15.412Z",
"closedAt": "2026-10-14T16:14:15.412Z",
"live": null,
"currency": "EUR"
}亏损绝不会超过你投入的保证金。只要外汇市场开放就可以平仓,即使你的账户已无法再开仓。
路径参数
referencestring必填仓位编号。
响应
referencestring仓位编号,例如
LP-7K2M4QX3P9。symbolstring货币对。
sidestringlong或short。unitsstring仓位规模,以货币对第一种货币计。
leverageinteger开仓时使用的杠杆。
entryPricestring开仓价。
marginstring为该仓位占用的欧元。
stopLossstring | null止损价(如已设置)。
takeProfitstring | null止盈价(如已设置)。
statusstringopen、closed,被强制平仓时为liquidated。closePricestring | null平仓价;持仓期间为
null。pnlstring | null扣除隔夜费后的盈亏,以欧元计;持仓期间为
null。resultstring | null仅由价格带来的盈亏,以欧元计;持仓期间为
null。financingstring已支付的隔夜费,以欧元计。
feesstring已支付的手续费,以欧元计。
closeReasonstring | null平仓原因:
owner、stop_loss、take_profit、liquidation或staff;持仓期间为null。openedAtstring开仓时间。
closedAtstring | null平仓时间;持仓期间为
null。liveobject | null持仓中仓位的当前状况;结束后为
null。currencystring欧元金额的货币:始终为
EUR。

