For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support Center
OverviewAPIResources
OverviewAPIResources
  • REST API Endpoints
    • GETGet Timestamp
    • GETO IDC User Info
      • GETAccount Dependents
      • GETAccount Find
      • GETAccount Item
      • GETAccount Items
      • GETAccount L Dependents
      • GETAccount List
      • GETAccount Suggest
      • POSTAcknowledge SSF Risk Disclosure
      • POSTActivate Swap Access
      • GETCash Balance Dependents
      • GETCash Balance Item
      • GETCash Balance Items
      • GETCash Balance L Dependents
      • GETCash Balance List
      • GETCash Balance Log Dependents
      • GETCash Balance Log Item
      • GETCash Balance Log Items
      • GETCash Balance Log L Dependents
      • POSTGet Cash Balance Snapshot
      • GETMargin Snapshot Dependents
      • GETMargin Snapshot Item
      • GETMargin Snapshot Items
      • GETMargin Snapshot L Dependents
      • GETMargin Snapshot List
      • POSTReset Demo Account State
      • GETShadow Account Dependents
      • GETShadow Account Item
      • GETShadow Account Items
      • GETShadow Account L Dependents
      • GETShadow Account Request Dependents
      • GETShadow Account Request Item
      • GETShadow Account Request Items
      • GETShadow Account Request L Dependents
      • GETShadow Account Request List
      • GETTrading Permission Dependents
      • GETTrading Permission Item
      • GETTrading Permission Items
      • GETTrading Permission L Dependents
      • GETTrading Permission List
      • POSTUpdate Futures Disabled
      • POSTUpdate Swap Enabled
Support Center
LogoLogo
REST API EndpointsAccounting

Update Swap Enabled

POST
https://demo-d.tradovateapi.com/v1/account/updateswapenabled
POST
/v1/account/updateswapenabled
1const url = 'https://demo-d.tradovateapi.com/v1/account/updateswapenabled';
2const options = {
3 method: 'POST',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{"accountId":1,"swapEnabled":true}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
200Successful
1{
2 "ok": true,
3 "errorText": "string"
4}
Was this page helpful?
Previous

Account Risk Status Dependents

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
accountIdlongRequired
swapEnabledbooleanRequired

Response

SimpleResponse
okboolean
errorTextstring<=8192 characters

Non-empty if the request failed