Skip to content
Sign up

Leveraged forex

Open a position

Go long or short on a currency pair at the market, with up to 30 times leverage.

POST/api/v1/margin/positionsGet a key
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"
}

Leverage multiplies losses as well as gains. Before the first position, the account's owner confirms the risk once on the site. Until then this answers risk_ack_required, and no request can confirm it for you.

Size a position by the euro margin to put in, or by units of the pair's first currency: one or the other. The margin is held from your euro balance, and the taker fee is charged on the full size.

Bodyapplication/json

  • symbolstringrequired

    The currency pair.

  • sidestringrequired

    long to gain as it rises, short to gain as it falls.

    One oflongshort

  • leverageintegerrequired

    How many times the margin the position is worth.

    From 1 to 30

  • marginstring

    The euro to put in, as a decimal string.

  • unitsstring

    The size in the pair's first currency, instead of margin.

  • stopLossstring

    A price that closes the position to limit a loss.

  • takeProfitstring

    A price that closes the position to take a gain.

Response

  • referencestring

    The position's reference, such as LP-7K2M4QX3P9.

  • symbolstring

    The currency pair.

  • sidestring

    long or short.

  • unitsstring

    Its size, in the pair's first currency.

  • leverageinteger

    The leverage it was opened with.

  • entryPricestring

    The price it opened at.

  • marginstring

    The euro held for it.

  • stopLossstring | null

    Its stop-loss, if one is set.

  • takeProfitstring | null

    Its take-profit, if one is set.

  • statusstring

    open, closed, or liquidated when it was closed out.

  • closePricestring | null

    The price it closed at; null while open.

  • pnlstring | null

    Its result less financing, in euro; null while open.

  • resultstring | null

    Its price result alone, in euro; null while open.

  • financingstring

    The overnight financing it has paid, in euro.

  • feesstring

    The fees it has paid, in euro.

  • closeReasonstring | null

    Why it closed: owner, stop_loss, take_profit, liquidation or staff; null while open.

  • openedAtstring

    When it opened.

  • closedAtstring | null

    When it closed; null while open.

  • liveobject | null

    Where an open position stands now; null once it has ended.

  • currencystring

    The currency of the euro figures: always EUR.