Actions8
- Trading Actions
- Quantitative Account Actions
Overview
This node integrates with the MyPet Stocks quantitative trading system to manage quantitative accounts. Specifically, the "Create Account" operation allows users to create a new quantitative trading account by providing detailed account information such as account name, ID, type, dealer, server, leverage, and other settings.
This node is beneficial in scenarios where automated workflows need to programmatically create new trading accounts within the MyPet Stocks platform, for example:
- Setting up new client accounts automatically when onboarding traders.
- Creating demo or real accounts for testing or live trading environments.
- Managing multiple accounts with different brokers or configurations via automation.
Properties
| Name | Meaning |
|---|---|
| Account Name | Name of the quantitative account |
| Account ID | Quantitative account ID |
| Account Type | Account type; options: MT4, MT5 |
| Is Real Account | Whether this is a real account (true) or demo account (false) |
| Dealer | Select the dealer/broker (loaded dynamically from available dealers) |
| Server | Server name |
| Capital Type | Capital type; options: USD (Dollar), Cent |
| Max Leverage | Maximum leverage; options include 1:2, 1:20, 1:50, 1:100, 1:200, 1:400, 1:500, 1:800, 1:1000, 1:2000, 1:无限 (unlimited) |
| View Password | View password (optional) |
| Risk | Risk value - maximum loss percentage that can be tolerated (not a percentage) |
| Time Zone | Time zone; options include UTC, Europe/Moscow, Asia/Shanghai, America/New_York, Asia/Tokyo, Africa/Cairo, America/Los_Angeles |
| Status | Account status - true (active) or false (inactive) |
| Note | Note (optional) |
Output
The output JSON object after creating an account includes:
message: A string message returned by the API indicating success or failure.code: Numeric code representing the API response status.account: An object containing details of the newly created quantitative account as returned by the MyPet Stocks API.
Example output structure:
{
"message": "Account created successfully",
"code": 0,
"account": {
"id": 123,
"name": "Example Account",
"accountId": "ACC123",
"account_type": "mt5",
"is_real": true,
"dealer": "1",
"server": "ServerName",
"capital_type": "usd",
"max_lever": "1:100",
"risk": 100,
"time_zone": "UTC",
"status": true,
"note": "Optional note"
}
}
The node does not output binary data.
Dependencies
- Requires an API key credential or username/password credentials for authenticating with the MyPet Stocks API.
- The node uses HTTP requests to the MyPet Stocks API endpoints, requiring network access.
- The "Dealer" property loads options dynamically from the API, so valid credentials and connectivity are necessary.
- The base URL and authentication method are configured in the node credentials.
Troubleshooting
- Authentication errors: If authentication fails, ensure the correct credentials are provided and the authentication method matches (username/password or token).
- API errors on creation: If the API returns an error code, check the message for details such as invalid parameters or permission issues.
- Missing required fields: All required properties must be set; missing required inputs will cause errors.
- Invalid dealer or server: Ensure the selected dealer exists and the server name is valid.
- Network issues: Connectivity problems to the MyPet Stocks API endpoint will cause request failures.
- Permission denied: If the user lacks permissions to create accounts, the API will return an error.
Links and References
- MyPet Stocks API documentation (not included here, but refer to your platform's official API docs)
- n8n documentation on creating custom nodes and using HTTP Request helpers