5.2. URLs and Their Parameters
Throughout Section 6, the OAuth flows reference a custom user creation/authorization (login/signup) screen. Additionally, the user creation flow (5.3.) mentions a trading account creation screen.
The front-end component of these screens is designed entirely by the broker. Please, note that the screens should replace the default cTrader login/signup (and account creation) pages. Additionally, the screens must not include any browser-related controls.
Moreover, when performing various InApp actions, users are also sent to pre-defined URLs relevant to a particular InApp action. For example, clicking on the button for making a deposit should provide users with a custom deposit options screen. Similarly to the above provisions, these screens must be created by brokers and should be consistent with other elements of the UI. However, users must be able to close these screens by interacting with a ‘Back’ button, an ‘X’ button, or something similar.
The outlined URLs can be opened using the following query parameters.
Parameters
Parameter | Screen(s) | Required? | Data Type | Description |
---|---|---|---|---|
lang | All screens | No | string | The language of the device OS. This parameter allows for displaying forms and screens in different languages. Takes Alpha-2 (ISO 369-2) codes as values. |
source | All screens | No | string | The type of the application accessing the screen. Applicable values include Web , Android , iOS , MacOS , and Desktop . Brokers can also use this parameter to adjust the screen design for various devices. |
theme | All screens | No | string | The preferred color scheme of the app (can be either light or dark ). This parameter is needed for the broker to establish a consistent design and ensure that the screens appear native to the trading application. |
firstLogin | Login/signup | No | boolean | A flag determining whether this is the user’s first login attempt on the current device. As Spotware only supports a single URL for the login/signup screen, this parameter is needed for the broker’s CRM system to correctly recognize whether it needs to open its user creation page or the login form. The value of true denotes the user’s first per-device login, and vice versa. |
partnerId | Login/signup | No | string | The email assigned as a partner identifier to a specific user or an account. |
token | InApp actions | Yes | string | The OT token required for authorization. |
account | InApp actions | Yes (only for deposits/withdrawals); No (in other cases) | integer | The trading account number linked to the user. |