Skip to main content

Pause / Unpause Account

API URL: POST https://userapi-demo.s2f.projectx.com/TradingAccount/setPaused

API Reference: /TradingAccount/setPaused

Description


Sets a Trading Account’s status to Paused. Paused states are useful for making adjustments to Trading Accounts (i.e. cash adjustments). When a Trading Account is paused, all open positions are liquidated and all working orders are canceled. The Trading Account will then be locked, preventing all trading until the account is unpaused.

Parameters


NameTypeDescriptionRequiredNullable
accountIdintegerThe Trading Account's account id.Requiredfalse
pausedbooleanThe pause state of the account.Requiredfalse

Example Usage


Example Request

{
"accountId": 10,
"paused": true
}

Example Response

  0         
// 0 = Success,
// 1 = AccountNotFound,
// 2 = AccountNotActive,
// 3 = AccountClosed,
// 4 = AlreadyPaused,
// 5 = AlreadyNotPaused,
// 6 = FailedToClosePositions,
// 7 = FailedToCloseOrders,
// 8 = LiveAccountsUnsupported