Mile Global Markets API

Build a trading app, earn on every trade

Give your users live prices and real trading inside your own app or website. Sign them in with OAuth, trade over our real-time API, and earn a markup of up to 3% on every trade they place.

Real trading, through one API

REST for accounts and contracts, a WebSocket gateway to price, buy and follow contracts in real time, and a live price feed for every market. Your users sign in with OAuth 2.0 and PKCE, and your app acts only within the scopes they approve.

  • OAuth 2.0 with PKCE sign-in
  • Real-time WebSocket trading gateway
  • Live price feed, no sign-in needed
  • Production and testing environments
Browse the API docs
trade.js
1// Price and buy a contract over the trading gateway
2const ws = new WebSocket("wss://api.miletrades.site/ws/v1");
3
4ws.onopen = () => ws.send(JSON.stringify({ authorize: token }));
5
6ws.onmessage = (ev) => {
7 const msg = JSON.parse(ev.data);
8 if (msg.msg_type === "authorize") ws.send(JSON.stringify({
9 proposal: 1, contract_type: "DIGITOVER",
10 symbol: "volatility_100", amount: 1, barrier: 4,
11 }));
12 if (msg.msg_type === "proposal") ws.send(JSON.stringify({
13 buy: msg.proposal.id, price: msg.proposal.ask_price,
14 }));
15};

Why build with Mile Global Markets

Markets around the clock

Synthetic indices trade 24/7, so your users always have something to trade, alongside markets on our other instruments.

Real-time from end to end

One WebSocket connection prices, buys and follows a contract to settlement, and the price feed streams every tick.

You set what you earn

Choose a markup from 0% to 3% for each app. It applies to every real-money trade, won or lost, and you claim it when you like.

Two ways to earn

Earn from your app, from the clients you bring, or both.

Trade markups

Add your markup to trades placed through your app, from 0% to 3%. Follow trades, clients and commission by day in the commission report.

Partner commissions

Join the Mile Global Markets partner programme and earn commission on the clients you refer.

Everything you need to build

The full reference, your keys and reports in one dashboard, and people to ask.

FAQs

Who is the API for?

Developers, fintech teams and businesses that want to offer trading inside their own website or app, with their users trading on Mile Global Markets accounts.

What can I build with it?

Trading apps and websites, bots and tools. Your users sign in with OAuth 2.0, and your app can show live prices, price and buy contracts, and follow open positions in real time. Digit contracts (matches, differs, even, odd, over, under) trade on synthetic indices; rise and fall contracts trade on any instrument. See the documentation.

How do I earn?

Set a markup of 0% to 3% on your app. It is added to the price of every real-money trade your users place through it, and you earn it whether the trade wins or loses. Your earnings build up per app and you claim them to your Mile Global Markets balance from the dashboard.

Can I test my app before going live?

Yes. A separate testing environment has its own REST and WebSocket addresses (listed in the documentation's overview), and every account has a demo balance, so you can build and test without real money.

What does it cost?

Nothing. Registering apps and using the API is free; your users pay the normal price of their trades plus the markup you set.

Start building on Mile Global Markets