API документація

Close Position

post/api/v1/Trade/positions/close

Closes an open position with a market order for the full position quantity. The order goes through the same account and risk checks as any other order on the account.

Trade

Параметри

version

path · string

Обов'язковий

Текст запиту

{
  "accountId": 1001,
  "instrument": "EURUSD"
}

Відповіді

  • 202Close order accepted; {orderId} is the closing order.application/json
    {
      "status": "accepted",
      "message": "Close position accepted.",
      "orderId": -46
    }
  • 400Validation failed, no open position for the instrument, or the order was rejected (for example the account may not trade); the message gives the reason.application/json
    {
      "status": "rejected",
      "message": "Instrument is required."
    }
Alipay
Stripe
Eurex
AWS
Azure
Google Cloud
Currenex
Velocity Trade
Bitcoin
CME
Interactive Brokers
Kraken
FIX API
XTX
Bloomberg
Binance

Запустіть свою платформу.