🖥️
AutoShares
  • Deploy Apps with AutoShares API
  • User guide
    • Introduction
    • Web Trader
      • Getting Started
      • Platform Layout
      • User Widgets
        • Account Information
        • Account Opening
          • Account Funding
            • ACH Transfers
            • Check Transfers
            • Wire Transfers
        • Chart
        • News
        • Trade Ticket
          • Mutual Funds Trade Ticket
        • Watchlists
        • Orders
        • Positions
        • Market Depth
        • Options
        • Hotkeys
    • Digital Advisor
      • Getting Started
      • Selecting an Investment Model
      • Portfolio Tab
      • Trading Tab
      • Activity Tab
      • Funding Tab
    • WebTrader for iOS
      • Getting Started
      • App Layout
      • Watchlist & Quotes View
        • Trade View
          • Stock Trading
          • Options Trading
      • Positions View
      • Orders View
      • Price Alerts View
      • Account View
      • Apple Watch Extension
    • Web Trader for Android
      • Getting Started
      • App Layout
      • Watchlist & Quote View
        • Trade View
      • Price Alerts
      • Accounts & Settings
    • Knowledge Base
      • Troubleshooting
        • Performance
          • Tips for Enhancing Performance
      • How-To Guides
        • Trading Accounts
          • How to Create a New Trading Account
        • Security
          • How to Enable Two-Factor Authentication
  • REST API
    • Introduction
    • Trading API
      • Overview
      • Authentication
        • Single-Factor Authentication
          • Syntax
        • Two-Factor Authentication
          • Syntax
      • User Registration
        • Get Required Fields
        • Register a User
      • Managing Users
        • Get User's Info
          • Syntax
        • Get User's Trading Settings
        • Get Mobile App Settings
        • Get User's Exchanges
        • Modify User's Settings
        • Update User's Password
      • Trading Accounts
        • Get Account's Balance Info
          • Syntax
        • Get Account's History
          • Syntax
        • List User's Accounts
          • Syntax
      • Password Reset
        • 1. Reset Trader's Password
        • 2. Retrieve the Secret Question
        • 3. Generate a Token For a New Password
        • 4. Update the Password
      • Trading Accounts
        • Open a New Trading Account
      • Account Funding
        • Create an ACH Relationship
        • Get an ACH Relationship
        • Get All ACH Relationships
        • Get the Default ACH Relationship
        • Modify an ACH Relationship
        • Delete an ACH Relationship
        • Approve an ACH Relationship
        • Deposit / Withdraw Funds via ACH
        • Cancel an ACH Transfer
        • Get All Transfers
      • Orders
        • Verify Order Placement
          • Syntax
        • Place Order
          • Syntax
        • Verify Order Replacement
          • Syntax
        • Replace Order
          • Syntax
        • Cancel an Order
          • Syntax
        • Get Order's Info
          • Syntax
        • Get Filtered Orders
          • Syntax
      • Positions
        • Get User's Positions
          • Syntax
        • Get User's Positions in a Security
          • Syntax
        • Get Market Value of all Security Groups
      • Securities
        • Get Equity Info by Internal ID
          • Syntax
        • Get Equity Info by Ticker
          • Syntax
        • Get Equity Info by Mask
          • Syntax
        • Get Filtered Equities
          • Syntax
        • Get Option Info by Internal ID
          • Syntax
        • Get Option Info by Ticker
          • Syntax
        • Get Options Expiration Dates
          • Syntax
        • Get an Option Chain
        • Get Filtered Options
          • Syntax
      • Watchlists
        • Add Security to Watchlist by ID
          • Syntax
        • Add Security to Watchlist by Ticker
          • Syntax
        • Create New Watchlist
          • Syntax
        • Delete Watchlist
          • Syntax
        • Get Specific Watchlist
          • Syntax
        • Get User's Watchlists
          • Syntax
        • Remove Security From Watchlist by ID
          • Syntax
        • Remove Security from Watchlist by Ticker
          • Syntax
        • Rename Watchlist
          • Syntax
      • Price Alerts
        • Create Price Alert
          • Syntax
        • Delete Price Alert
          • Syntax
        • Get Specific Alert
          • Syntax
        • Get User's Price Alerts
          • Syntax
        • Modify Price Alert
          • Syntax
      • Historical Data
        • Get Comparison Chart Data
          • Syntax
        • Get Candles and Indicators for a Security
          • Syntax
        • Get Chart Data in the Excel Format
          • Syntax
      • News
        • Get News for a Security
        • Get Corporate Actions for a Security
      • User Feedback
        • Submit Feedback
          • Syntax
      • Managing Transactions
        • Get Transactions
          • Syntax
      • Streaming Data
        • Quotes
        • Orders
        • Positions
        • Watchlists
        • Account Balances
      • Code Samples
        • Basic Authentication
        • Two-Factor Autentication
        • Placing New Orders
        • Get User Information
        • List User Positions
        • Get Trading Data for Charts
      • Terms and Definitions
        • Part I
        • Part II
        • Part III
Powered by GitBook
On this page
  • Overview
  • Response
  • Common Mistakes
  • Failing to Specify the Et-App-Key Parameter
  1. REST API
  2. Trading API
  3. Managing Users

Get Mobile App Settings

Retrieve settings for Autoshares Trader for iOS and Android

PreviousGet User's Trading SettingsNextGet User's Exchanges

Last updated 4 years ago

Overview

This GET endpoint enables you to retrieve the mobile settings for Autoshares Trader for iOS and Android. These settings can and should be used to determine how the mobile apps function and whether or not they should function in the first place (perhaps the mobile app's version is obsolete and must be updated before working).

The selection of available settings can always be extended or contracted. If you would like to add extra settings that can be leveraged in your mobile app, contact our and they will add them for you.

There are two required parameters that must be provided in the request:

  1. Et-App-Key (header). This is the unique key of your app that identifies your app when communicating with our service. Contact your administrator to get this key.

  2. API version (path). Unless necessary, leave it at "1.0".

The user information request must be sent to the following URL:

GET apiURL/v1.0/applications/mobile/settings

Response

In response to this request, you will receive a JSON object containing the current mobile settings:

{
  "Settings": {
    "accountOpeningHTML": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>Parent Page</title>\r\n    <style>\r\n        body {\r\n            height: 100vh;\r\n            width: 100vw;\r\n            box-sizing: border-box;\r\n            overflow: hidden;\r\n            margin: 0;\r\n        }\r\n        #accountOpenning {\r\n            height: 100vh;\r\n            width: 100vw;\r\n        }\r\n    </style>\r\n    <script type=\"text/javascript\" src=\"https://ao-et-demo-prod.etnasoft.us/assets/account.opening.client.js\"></script>\r\n</head>\r\n<body>\r\n    <iframe\r\n        id=\"accountOpenning\"\r\n        src=\"https://ao-et-demo-prod.etnasoft.us/\"\r\n        frameborder=\"0\"\r\n        name=\"accountOpenning\"\r\n        scrolling='auto',\r\n        allowfullscreen=true\r\n        allow=\"geolocation;\"\r\n        token='%token%'\r\n    ></iframe>\r\n    <script>\r\n        const\r\n            frame = document.getElementById('accountOpenning'),\r\n            accounOpeningClient = new ETNA.AccounOpeningClient(frame),\r\n            logger = accounOpeningClient.setLogger(data => {\r\n                if (data.action === 'submit') {\r\n                    window.location.replace(\"http://accountSubmitted\");\r\n                    logger.remove();\r\n                    return;\r\n                    //Make custom actions here\r\n                }\r\n                if (data.type === 'info'){\r\n                    console.log(data);\r\n                    window.location.replace(\"http://accountSubmitted\");\r\n                    return;\r\n                }\r\n                if (data.type === 'error') return console.error(data);\r\n            }, true);\r\n            var accountId = '%AccountID%';\r\n            var clearingFirm = '%ClearingFirm%';\r\n            console.log(accountId);\r\n            if(accountId === 'null'){\r\n                //For create account\r\n                accounOpeningClient.createAccount();\r\n            } else {\r\n                //For create update\r\n                accounOpeningClient.updateAccount(accountId, clearingFirm);\r\n            }\r\n    </script>\r\n</body>\r\n</html>",
    "compatibleAndroidVersionCode": "59",
    "compatibleIOSVersion": "2.33.3",
    "defaultLoginMode": "1",
    "defaultOrdersPageSize": "15",
    "enableAddAccountButton": "1",
    "enableFundAccountButton": "0",
    "enablePaperTradingBanner": "1",
    "enableSeparateOptionTradeButton": "0",
    "enableSignUpButton": "1",
    "enableTouchID": "1",
    "enableTrailingOrders": "1",
    "recoverButtonSettings": "{\"environments\":[1,1]}",
    "securitySubscriptionType": "0",
    "signUpButtonSettings": "{\"environments\":[1,1]}",
    "tradeButtonAppearanceType": "1",
    "tryDemoButtonSettings": "{\"environments\":[0,1]}",
    "PinEnabled": false,
    "maxNumberOrderLegs": "4"
  }
}

where:

Parameter

Description

accountOpeningHTML

The HTML that is prompted whenever a trader attempts to open a new trading account.

compatibleAndroidVersionCode

The minimum supported version of the Android app.

compatibleIOSVersion

The minimum supported version of the iOS app.

Common Mistakes

Here are some of the common mistakes that developers make when requesting mobile settings:

Failing to Specify the Et-App-Key Parameter

If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:

{
    "error": "Application key is not defined or does not exist"
}
support team