> ## Documentation Index
> Fetch the complete documentation index at: https://api-trading-docs.vexprofx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Check the connection and verify an account from your backend.

You need the provider's token, the customer's MT5 login and master password,
and authorization to verify the account. Example values are fictional.

## 1. Configure the URL and token

The cURL examples use `API_BASE` and `MT5_API_TOKEN`. Load the token from your backend's
secret manager; do not include it in the repository.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export API_BASE="https://api-trading.vexprofx.com"
# Set MT5_API_TOKEN in your backend's secure environment.
```

## 2. Check availability

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --fail-with-body "$API_BASE/health/live"
curl --fail-with-body "$API_BASE/health/ready" \
  -H "Authorization: Bearer $MT5_API_TOKEN"
```

The first query returns `{"status":"ok"}`. The second checks the MT5 connection
and requires a specific permission. If it fails, resolve [the error](/errors) before continuing.

## 3. Verify the account

This Python example prompts for the password without displaying it or placing it
in a command argument. It requires `httpx` (`python -m pip install httpx`).

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import getpass
import os
import httpx

login = int(input("MT5 login: "))
with httpx.Client(
    base_url="https://api-trading.vexprofx.com",
    headers={"Authorization": "Bearer " + os.environ["MT5_API_TOKEN"]},
    timeout=30.0,
) as client:
    password = getpass.getpass("Master password: ")
    response = client.post(
        f"/api/v1/accounts/{login}/verify", json={"password": password}
    )
    del password
    response.raise_for_status()
    verification = response.json()
    if not (verification.get("valid") is True and verification.get("verified") is True):
        raise RuntimeError("The account was not verified")
    print("Verification valid until:", verification["expires_at"])
    account = client.get(f"/api/v1/accounts/{login}")
    account.raise_for_status()
    print("Account query completed")
```

Do not log the verification request body. The investor password cannot be used for
this process. [Review responses and expiration](/accounts-passwords).

## 4. Query before trading

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --fail-with-body "$API_BASE/api/v1/account-verifications" \
  -H "Authorization: Bearer $MT5_API_TOKEN"
curl --fail-with-body "$API_BASE/api/v1/accounts/123456/positions?offset=0&total=100" \
  -H "Authorization: Bearer $MT5_API_TOKEN"
curl --fail-with-body "$API_BASE/api/v1/market/ticks?symbols=EURUSD&trans_id=0" \
  -H "Authorization: Bearer $MT5_API_TOKEN"
```

Replace `123456` with the verified login and `EURUSD` with your broker's symbol.
To submit a trade, continue with [the trading workflow](/trading/overview).
