Socketrade

Broker guide · checked 29 November 2026

MT5 API for MetaQuotes-Demo

The MetaQuotes demo server is the account MetaTrader itself offers when you first install it. It is not a broker and holds no live funds, which makes it the safest first connection for a quickstart or a CI test.

Server names

Use the exact name MetaTrader shows. A wrong server is the most common connection failure.

MetaQuotes-DemoThe default demo server in a fresh MetaTrader 5 install.

Symbols and contract sizes

The same name does not always mean the same size. Check the contract before you set a lot.

EURUSDStandard spelling.
XAUUSDGold. Contract sizes are the demo server's, not a broker's.
Other symbolsRead the account's symbol list; the demo server carries a limited set.

Connect it

One call adds the account. Wait for ready before sending an order.

curl -X POST https://api.socketrade.com/v2/accounts \
  -H "X-API-Key: $SOCKETRADE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountNumber": "12345678",
    "accountPassword": "your-demo-password",
    "accountServerHost": "MetaQuotes-Demo",
    "name": "MetaQuotes demo"
  }'

What to watch

  • A demo account can be reset or removed by MetaQuotes. Do not use it for anything you need to keep.
  • No live funds and no real execution. It is a test rail, not a broker.
  • The server is exactly MetaQuotes-Demo; do not add a suffix.
  • If the demo expires, create a new one in MetaTrader and connect that; the API does not renew it.

Sources