Open a New Trading Account
Last updated
Last updated
This POST endpoint enables to send a request for opening a new trading account. The process of creating new trading accounts differs based on the clearing firm responsible for handing these requests; in this article we will demonstrate how to open a new paper trading account in Autoshares Trader's demo environment.
There are five required parameters that must be provided in the request:
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.
Authorization (header). This is the authorization token from the very first .
API version (path). Unless necessary, leave it at "1.0".
userId (query). This is the ID of the user account to which the new trading account will be bound.
model (body). This is a JSON file that contains detailed information about the new account opening request.
The body of this request represents the information about the to-be-created account opening request. It must be sent in the JSON format with the parameters described in the following table:
Parameter
Description
FormType
For paper trading, the parameter must be equal to Direct.
AccountProvider
This is the clearing firm responsible for handling account requests. For paper trading, specify PaperTrading.
Here's the final template for this API request:
In response to this API request, you will receive a JSON file containing information about the status of the request.
For convenience purposes, paper trading accounts need not be approved by administrators (unlike regular accounts that must be approved by both administrators and the clearing firm). Once a paper trading account opening request has been created, a new account will immediately be created and bound to the user whose ID was provided as a query parameter.
You may list the user's trading accounts via the following API endpoint:
Here are some of the common mistakes that developers make when attempting to send a new account opening request.
If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:
Another common mistake when making this request is failing to specify all of the required body parameters. Doing so will result in the 500 status code and the following error message: