When a request fails, the API returns problem details, a standard JSON error format (RFC 9457), with the content type application/problem+json. Every error has a stable code. Let your code check code, never the title or detail, which are written for people to read.
{ "type": "https://algotradertools.com/docs/errors#validation_failed", "title": "Validation failed", "status": 400, "code": "validation_failed", "detail": "lot_value: Use a number above 0 and up to 1000.", "errors": [ { "path": "/lot_value", "code": "invalid", "message": "Use a number above 0 and up to 1000." } ], "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e", "doc_url": "https://algotradertools.com/docs/errors#validation_failed"}
Field
Description
type
A URI for the error type. It points to this page, at the code's row
title
A short human-readable summary
status
The HTTP status code, repeated in the body
code
The stable identifier to branch on. Every code is listed below
detail
What went wrong in this particular case
errors
Only for validation_failed. One entry per problem, each with a path to the field as a JSON Pointer ("" for the request as a whole), a field-level code and a message
request_id
The request's ID, also in the X-Request-Id header. Include it when you contact support
Don't retry other errors without changing the request first. A 400, 401, 403, 404, 405, 406, 409 or 415 will fail the same way again.
Retrying a POST is safe for accounts and followers. If the first attempt went through, the second fails with already_connected or already_following instead of creating a duplicate. A retried POST /v1/copiers can create a second copier. If you didn't get a response to one, list your copiers before you retry it.
Retry with backoff. If it persists, contact support with the request_id
502, 503 or 504
close_failed
Copies couldn't be closed while deleting a copier or removing a follower
Nothing was deleted. Every follower handled up to the failure is now paused, and all of them except the one that failed already had their copies closed. Retry the delete, or resume the followers
A validation_failed error lists each problem in errors, with a path to the field and a code. Besides the generic codes required, invalid, null, blank, max_length, invalid_choice, does_not_exist, incorrect_type, min_value, max_digits and max_decimal_places, these say exactly what is wrong:
Code
Field
Meaning
already_connected
login
You already connected this MetaTrader account
account_released
login
You connected it before and its terminal was released. Reconnect it instead
account_not_connected
master_id, account_id
The account is still connecting or was released
account_is_master
account_id
The account is a copier's master. An account can't be both a master and a follower
account_is_follower
master_id
The account follows another copier. An account can't be both a master and a follower
already_following
account_id
The account already copies this master, in this copier or another one
self_copy
account_id
The copier's master can't follow itself
read_only_account
account_id
The account was connected with its investor password and can't place trades
netting_account
master_id, account_id
MT5 netting accounts aren't supported, only hedging accounts
automated_trading_off
account_id
The broker has switched off trading, or automated trading (Expert Advisors), on this account, so copies can't be placed. Ask the broker to allow it
immutable
master_id, account_id
The field can't be changed after creation. Create a new copier or follower instead
unknown_field
Any
The body has a field the resource doesn't have, often a typo. Read-only fields such as id or status are accepted and ignored, so you can send an object back as you read it
A close_positions query parameter that isn't true, false, 1 or 0 fails with validation_failed too, with the path/close_positions.