A test account, on demand.
The Demo Account API helps you obtain a working MetaTrader demo account programmatically, so your app has something to connect and test against. /DemoAccount/FindCompanies searches brokers that offer demos; /DemoAccount/ServersAndAccountTypes lists a broker's demo servers and platforms; and /DemoAccount/Open hands you a ready account — login, password and server — that you connect with /ConnectEx like any other. It's the frictionless way to try quotes, streaming, orders and EAs before you point the API at a live account.
Find a broker, get an account, connect.
Find brokers
/DemoAccount/FindCompanies?name= returns brokers that publish a demo server.
List servers
/DemoAccount/ServersAndAccountTypes gives that broker's demo servers and platforms.
Open & connect
/DemoAccount/Open returns a ready account — feed it to /ConnectEx.
curl "https://hrx.info/DemoAccount/Open?platform=MT5" -H "x-api-key: sk_live_…" { "login":"107082839", "password":"…", "server":"Ava-Demo 1-MT5", "broker":"Ava Trade Ltd.", "platform":"MT5" } # connect it and you're live on a demo curl "https://hrx.info/ConnectEx?user=107082839&password=…&server=Ava-Demo%201-MT5" \ -H "x-api-key: sk_live_…"
Frequently asked
Can I get a MetaTrader demo account through the API?+
/DemoAccount/Open returns a ready demo account — login, password and server — that you connect with /ConnectEx and use exactly like a live account, without any funds at risk.How do I find which brokers offer demos?+
/DemoAccount/FindCompanies?name= to search brokers that publish a demo server, then /DemoAccount/ServersAndAccountTypes to list that broker's demo servers and platforms.Does it support both MT4 and MT5 demos?+
platform=MT4 or platform=MT5 when opening a demo, and connect it the same way as any account.What can I test on a demo account?+
Is a demo account free?+
Get a demo account and start building.
Find a broker, open a demo, and connect it — no funds, no friction, full API.