跳到正文
注册

杠杆外汇

开仓

以市价在货币对上做多或做空,杠杆最高 30 倍。

POST/api/v1/margin/positions获取密钥
curl --request POST \
  --url "https://reirex.com/api/v1/margin/positions" \
  --header "GX-API-KEY: $GX_API_KEY" \
  --header "GX-API-TIMESTAMP: $TIMESTAMP" \
  --header "GX-API-SIGN: $SIGNATURE" \
  --header "Content-Type: application/json" \
  --data '{"symbol":"EURUSD","side":"long","leverage":20,"margin":"500","stopLoss":"1.16500"}'

201 Createdapplication/json

{
  "reference": "LP-7K2M4QX3P9",
  "symbol": "EURUSD",
  "side": "long",
  "units": "10000.00",
  "leverage": 20,
  "entryPrice": "1.17447",
  "margin": "500.00",
  "stopLoss": "1.16500",
  "takeProfit": null,
  "status": "open",
  "closePrice": null,
  "pnl": null,
  "result": null,
  "financing": "0.00",
  "fees": "10.00",
  "closeReason": null,
  "openedAt": "2026-10-14T16:14:15.412Z",
  "closedAt": null,
  "live": {
    "price": "1.17441",
    "pnl": "-0.51",
    "marginLevel": "0.9990",
    "liquidationPrice": "1.14530",
    "notional": "10000.00",
    "financingPerNight": "0.83"
  },
  "currency": "EUR"
}

杠杆会同时放大盈利和亏损。开立首个仓位前,账户所有者需在网站上确认一次风险。在此之前,此接口返回 risk_ack_required,任何请求都无法代你确认。

按投入的欧元 margin 或按货币对第一种货币的 units 设定仓位规模,二者选其一。保证金从你的欧元余额中占用,吃单手续费按仓位全额收取。

请求体application/json

  • symbolstring必填

    货币对。

  • sidestring必填

    long 在上涨时获利,short 在下跌时获利。

    可选值longshort

  • leverageinteger必填

    仓位价值是保证金的多少倍。

    1 至 30

  • marginstring

    投入的欧元,以十进制字符串表示。

  • unitsstring

    以货币对第一种货币计的仓位规模,代替 margin。

  • stopLossstring

    用于限制亏损的平仓价格。

  • takeProfitstring

    用于锁定盈利的平仓价格。

响应

  • referencestring

    仓位编号,例如 LP-7K2M4QX3P9。

  • symbolstring

    货币对。

  • sidestring

    long 或 short。

  • unitsstring

    仓位规模,以货币对第一种货币计。

  • leverageinteger

    开仓时使用的杠杆。

  • entryPricestring

    开仓价。

  • marginstring

    为该仓位占用的欧元。

  • stopLossstring | null

    止损价(如已设置)。

  • takeProfitstring | null

    止盈价(如已设置)。

  • statusstring

    open、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。