Account Actions

Perform advanced account management operations with powerful tools for resetting demo accounts, switching risk categories, updating liquidity, and managing trading halts.

Reset Demo Account State

Reset a simulation account to its market-open state on a given date. This is useful for returning accounts to their starting values or fixing issues that occurred during trading.

Via Dashboard

  1. Navigate to the Query Builder and select “accounts” from the Repository Name dropdown
  2. Enter IDs of accounts you want to reset to the given date
  3. Click “Run Query” and wait for the list to populate
  4. Select one or more accounts (bulk execution is allowed)
  5. Click “ACTIONS”, then “Reset Demo Account State”
  6. Select a date using the Date input, then click “APPLY”

Bulk Operations: You can select multiple accounts for bulk execution of this action.

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/account/resetDemoAccountState Development: https://demo-api.staging.ninjatrader.dev/v1/account/resetDemoAccountState

Send a POST request with this JSON body:

1{
2 "accountIds": [12345, 67890],
3 "resetTradeDate": {
4 "day": 15,
5 "month": 8,
6 "year": 2023
7 }
8}

Success Response:

1{ "ok": true }

Error Response:

1{
2 "errorText": "Empty accountIds",
3 "ok": false
4}

Switch Account’s Active Risk Category

Switch an account’s Risk Category to change risk parameters like max lot size, allowed products, or to switch to a trade-halted category.

Risk Category: A Risk Category is the base risk profile assigned to your account templates. We design each Risk Category based on vendor requirements. These entities define the most basic risk params associated with the account type, such as max lot size and allowed/restricted products.

Via Dashboard

  1. Go to the Query Builder and select ‘accounts’ from the Repository Name dropdown
  2. Enter relevant IDs, master ID, or SQL-like WHERE statements to filter results
  3. Run the query and select one or more accounts (bulk actions are allowed)
  4. Click “ACTIONS” and select “Switch Risk Category”
  5. Choose from the defined Risk Category entities for your business
  6. Confirm the change

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/accountRiskStatus/switchRiskCategory Development: https://demo-api.staging.ninjatrader.dev/v1/accountRiskStatus/switchRiskCategory

Send a POST request with this JSON body:

1{
2 "accountIds": [12345, 67890],
3 "riskCategoryId": 789
4}

To find all Risk Categories associated with your organization, call /riskCategory/list.

Lock or Unlock an Account

Lock or unlock an account to control trading permissions and account access.

Via Dashboard

  1. Navigate to the Query Builder and select the “accounts” repository
  2. Use the “Default Grid” button to populate the Select statement if not set
  3. Select an account from the results
  4. Click “Actions” and select “Change Lock”
  5. Select the Action and Reason, providing a Reason Description
  6. Click submit

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/accountRiskStatus/setAdminAutoLiqAction Development: https://demo-api.staging.ninjatrader.dev/v1/accountRiskStatus/setAdminAutoLiqAction

Send a POST request with this JSON body:

1{
2 "accountId": 131838,
3 "adminAction": "LockTradingImmediately",
4 "adminActionReasonCode": "Other",
5 "adminActionReason": "Manual Disable"
6}

Update Max Net Liquidity

Update an account’s maximum net liquidity to fix drawdown issues or adjust risk parameters.

Via Dashboard

  1. Use the Query Builder to find an account or list of accounts
  2. Select the account you want to modify
  3. Click “ACTIONS” and select “Update MaxNetLiq”
  4. Enter the desired value and click “Update”
  5. You should see a confirmation message appear

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/accountRiskStatus/updateMaxNetLiq Development: https://demo-api.staging.ninjatrader.dev/v1/accountRiskStatus/updateMaxNetLiq

Send a POST request with this JSON body:

1{
2 "accountId": 12345,
3 "maxNetLiq": 50000
4}

Halt Trading for a Risk Category

Halt trading for all accounts that have a given risk category. This allows you to turn off a product type temporarily or halt all trading for your business in an emergency.

Important: Please favor the riskTimePeriod-based method over the Category Halt method. Read more about this in the Holiday Liquidation section.

Via Dashboard

  1. Create a Query Builder query for the ‘riskCategory’ Repository
  2. Use the Default Grid, a blank WHERE statement, and set the result limit to something like 100
  3. Select a risk category item (should look like ‘YOURBIZ-50K’)
  4. Click “ACTIONS” and select “Halt Trading”
  5. Check or uncheck the halt setting and click “APPLY”

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/accountRiskStatus/setDemoHalt Development: https://demo-api.staging.ninjatrader.dev/v1/accountRiskStatus/setDemoHalt

Send a POST request with this JSON body:

1{
2 "halt": true,
3 "riskCategoryId": 789
4}

Demo Account Manual Cash Adjustment

Make direct balance changes to demo accounts. Use this carefully as it may have unexpected results when dealing with auto-liquidation configurations.

Via Dashboard

  1. Use the Query Builder to find an account or list of accounts
  2. Select the account you want to modify
  3. Click “ACTIONS” and select “Manual Cash Adjust”
  4. Fill in the adjustment details:
    • Amount: The credit or debit to the account
    • Type: How the credit/debit affects other values (Manual Adjustment is typically what you want)
    • Currency: The currency type of the change amount
    • Description: An arbitrary comment to describe the transaction
  5. Click “APPLY”

Via API

Use the following endpoints:

Production: https://demo.tradovateapi.com/v1/cashBalance/changeDemoBalance Development: https://demo-api.staging.ninjatrader.dev/v1/cashBalance/changeDemoBalance

Send a POST request with this JSON body:

1{
2 "cashChange": 1000,
3 "accountId": 12345
4}

Bulk Operations

Bulk Trading Permission Revocation

Revoke multiple trading permissions at once using the following endpoints:

Production: https://demo.tradovateapi.com/v1/user/revokeTradingPermissions Development: https://demo-api.staging.ninjatrader.dev/v1/user/revokeTradingPermissions

Send a POST request with this body:

1{
2 "tradingPermissionIds": [123, 456, 789]
3}
  • This endpoint will accept up to 1024 ID arguments
  • The endpoint will skip already-revoked permissions if any are present
  • If all provided IDs are for trading permissions that have already been declined, this will fail

Cancel Everything

Use the special “cancelEverything” API endpoint to cancel all subscriptions, revoke trading permissions, and clear MD subscriptions and renewals.

Important: To clear all subscriptions, you MUST call the endpoint on both live and demo environments! This endpoint should be used when an end user fails their evaluation accounts to ensure all subscriptions are expired/revoked.

Production Endpoints:

  • https://demo.tradovateapi.com/v1/user/cancelEverything
  • https://live.tradovateapi.com/v1/user/cancelEverything

Development Endpoints:

  • https://demo-api.staging.ninjatrader.dev/v1/user/cancelEverything
  • https://live-api.staging.ninjatrader.dev/v1/user/cancelEverything

Send a POST request with this JSON body:

1{
2 "userIds": [12345, 67890]
3}

Response:

1{
2 "tradovateSubscriptionIds": [...],
3 "tradingPermissionIds": [...],
4 "userPluginIds": [...],
5 "marketDataSubscriptionIds": [...]
6}

tradovateSubscriptionIds, userPluginIds, and marketDataSubscriptionIds will only be cancelled when calling from the LIVE environment, while tradingPermissionIds will only be cancelled when calling from the DEMO environment. This is why it is necessary to call the endpoint in both environments to fully cancel the user’s membership.