canonical: https://jentic.com/apis/magick.nu/tradeworks-main

# Magick Nu Tradeworks

Jentic publishes the only available OpenAPI specification for Tradeworks, keeping it validated and agent-ready. Tradeworks is a strategy-driven retail forex platform that lets traders configure automated MT4 strategies through a REST API. The spec covers eight endpoints across user provisioning, MT4 trading account registration, strategy template lookup, and password rotation flows for both end-user and broker-server credentials.

## For AI agents

Provision Tradeworks users, register MT4 trading accounts, and look up strategy templates through eight REST endpoints aimed at retail forex automation.

## Scope

Does not handle order placement, position management, or live MT4 trade execution - use for Tradeworks user provisioning, MT4 account registration, password rotation and strategy template lookup only.

## Capabilities

- Create new Tradeworks user accounts via POST /users
- Register an MT4 trading account against a broker server through POST /tradingAccounts
- Rotate the MT4 account password using PUT `/tradingAccounts/password/{username}/{brokerserver}/{mt4username}`
- Update a Tradeworks user's password via PUT `/users/password/{username}`
- Check whether a desired email or username is available with GET `/users/email/{email}` and GET `/users/username/{username}`
- Look up a strategy template by ID via GET `/strategies/strategyId/{strategyId}`
- List all available template strategies through GET `/strategies/templates`

## Use cases

### Forex Trader Onboarding

Run a frictionless signup flow that provisions a Tradeworks user and binds their MT4 account in one pass. The agent calls GET `/users/email/{email}` and GET `/users/username/{username}` to validate availability, POST /users to create the profile, and POST /tradingAccounts to register the MT4 connection. Suitable for forex affiliates and white-label brokers that need a programmatic signup pipeline.

Example prompt: POST /users to create the new Tradeworks user, then POST /tradingAccounts to attach the MT4 broker server and credentials

### Strategy Template Discovery

Surface the Tradeworks strategy library to traders before they wire it to an MT4 account. GET `/strategies/templates` returns every published template, and GET `/strategies/strategyId/{strategyId}` fetches a single strategy's configuration. Useful for affiliate dashboards and strategy comparison tools that want to render a selection UI ahead of trading account binding.

Example prompt: Call GET `/strategies/templates` and render each template name and id, then GET `/strategies/strategyId/{strategyId}` when the trader picks one

### Credential Rotation

Drive scheduled password rotation for Tradeworks users and their MT4 broker connections. PUT `/users/password/{username}` rotates the Tradeworks login, and PUT `/tradingAccounts/password/{username}/{brokerserver}/{mt4username}` rotates the MT4 password. Useful for security operators enforcing a credential hygiene policy across a managed pool of forex accounts.

Example prompt: PUT `/tradingAccounts/password/{username}/{brokerserver}/{mt4username}` for every account flagged in the rotation queue

### AI Agent Forex Account Provisioning

Let an AI assistant onboard a forex client end-to-end without holding the underlying broker credentials. Through Jentic the agent searches for the user creation operation, loads the schema for /users and /tradingAccounts, and executes with credentials brokered by the vault. Useful for chatbots embedded in affiliate sites that funnel traders into Tradeworks.

Example prompt: Search Jentic for 'create a tradeworks user', load POST /users, and execute with the email, username and password supplied by the user

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/users` | Create a new Tradeworks user |
| POST | `/tradingAccounts` | Register an MT4 trading account |
| PUT | `/tradingAccounts/password/{username}/{brokerserver}/{mt4username}` | Update an MT4 account password |
| GET | `/strategies/templates` | List all template strategies |
| GET | `/strategies/strategyId/{strategyId}` | Get a strategy by ID |
| GET | `/users/email/{email}` | Check email availability |
| GET | `/users/username/{username}` | Check username availability |
| PUT | `/users/password/{username}` | Update a user's password |

## Key resources

- **Users** — Create users, check availability, and rotate passwords via /users
- **Trading Accounts** — Register MT4 accounts and rotate broker passwords via /tradingAccounts
- **Strategies** — Look up strategy templates via /strategies

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 69 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 56 / 100
  - AI-Readiness & Agent Experience: 44 / 100
  - Agent Usability: 94 / 100
  - Security: 100 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/magick.nu/tradeworks-main/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Tradeworks API by hand means encoding basic-auth credentials on every request and coordinating them across user provisioning, MT4 account registration, password rotation, and strategy-template paths. Through Jentic you install once, import Tradeworks from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** You choose which Tradeworks operations the agent may call, so you can limit it to the ones it needs, such as creating a user or listing strategy templates, and leave out others like rotating an MT4 account password unless you add them. The agent only reaches the operations in the set you allow.
- **Credential handling:** Your Tradeworks credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Tradeworks user' or 'register an MT4 account', and Jentic returns the matching Tradeworks operation with its input schema so the agent calls the right endpoint directly.

## Related APIs

- **Tradeworks (tradeworks slug)** — Identical Tradeworks spec exposed under a different slug in the corpus
- **Alpaca Trading API** — Commission-free equities and crypto brokerage API with order placement
- **Polygon.io Market Data API** — Real-time and historical market data for backtesting strategies
- **Finnhub API** — Forex quotes, fundamentals and news for strategy decision support

## FAQ

### Why is there no official OpenAPI spec for Tradeworks?

Magick.nu does not publish an OpenAPI specification for Tradeworks; the API is documented only through a Swagger UI page on the developer site. Jentic generates and maintains this spec so AI agents and developers can call Tradeworks via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Tradeworks API use?

The Tradeworks API requires HTTP Basic authentication - the developer Swagger page asks for username and password. Through Jentic the credential is stored encrypted in your Jentic One instance, so an agent calls /users or /tradingAccounts with a scoped token rather than embedding the basic-auth pair.

### Can the Tradeworks API place trades on MT4?

No. The exposed endpoints cover user provisioning, MT4 account registration via POST /tradingAccounts, password rotation, and strategy template lookup. Order placement and execution flow through the MT4 terminal itself, not through the eight REST endpoints in this spec.

### What are the rate limits for the Tradeworks API?

Per-endpoint rate limits are not defined in the spec. The base URL points at a dev environment (http://devui.magick.nu/rest), so production limits should be confirmed with Magick.nu directly before high-volume usage.

### How do I register a new MT4 account through Jentic?

Run pip install jentic, search for 'register an mt4 trading account', and Jentic surfaces POST /tradingAccounts with its input schema. Execute with the broker server, MT4 username and password fields and Jentic returns the registered account record.

### How do I check whether a username is available before signup?

Call GET `/users/username/{username}` with the desired username as a path parameter. The endpoint returns an availability flag so the signup flow can prompt for an alternative before it issues POST /users. The same pattern applies to GET `/users/email/{email}` for email availability.

### Can I limit what my agent is allowed to do with the Tradeworks API?

Yes. Because you run Jentic One yourself, you decide which Tradeworks operations the agent may call, and it can only reach the ones you allow. You can restrict it to what it needs, such as creating a user with POST /users or listing strategy templates with GET `/strategies/templates`, and leave out others like rotating an MT4 account password with PUT `/tradingAccounts/password/{username}/{brokerserver}/{mt4username}.` Your basic-auth credentials stay stored and injected at execution time under your own rules, never exposed to the agent.
