Crypto Trading API on Volity: REST and WebSocket Access for Custom Systems

Last updated May 13, 2026
Table of Contents

The Volity crypto trading API gives developers programmatic access to market data, order management, and position handling. REST endpoints handle account state, order entry, and historical data. WebSocket streams deliver real-time prices and trade events. Sandbox environment, MQL Expert Advisor support, and VIP rate limits round out the offering.

What the crypto trading API gives you

Three integration patterns, depending on how custom your system is:

1. MQL Expert Advisors (EAs). The simplest path. Write or buy an EA in MQL4 or MQL5, drop it into Volity MT, and the EA executes on your behalf using the same execution engine as manual trading. EAs run on Volity’s infrastructure with the same 99.6% sub-1s fill rate.

2. REST API. Server-to-server integration. Query account balances, open positions, place orders, retrieve trade history. Standard HTTP/JSON. Authentication via API key issued in the account portal. Suits algorithmic strategies built in Python, Node.js, Go, or any language that handles HTTP.

3. WebSocket streams. Real-time market data and account events. Subscribe to price tick streams for any instrument, listen for order fills, position updates, balance changes. Low-latency push delivery. Combined with REST for full system coverage.

Endpoint categories

Account endpoints (REST): – GET /account, balance, equity, margin level, exposure – GET /positions, open positions with P&L, margin requirement – GET /orders, open and pending orders – GET /history, historical trades and orders

Market data endpoints (REST): – GET /instruments, full instrument list with specs – GET /quotes/{symbol}, current bid/ask – GET /candles/{symbol}, OHLCV history at any timeframe

Trading endpoints (REST): – POST /orders, place market, limit, stop, or OCO orders – PUT /orders/{id}, modify open order – DELETE /orders/{id}, cancel order – POST /positions/{id}/close, close a specific position

WebSocket channels: – quotes:{symbol}, real-time bid/ask streaming – trades:{symbol}, public trade ticks – account, your account state updates – positions, your position updates – orders, your order updates

Authentication

API keys are issued from the account portal under Settings → API Access. Each key has:

  • Permissions: read-only, trading-enabled, or full access including withdrawals
  • IP allowlist: restrict the key to specific source IPs
  • Rate limit tier: Standard (60 req/min) or VIP (600 req/min)
  • Sandbox toggle: test against demo capital before going live

Keys are revocable at any time. Best practice: separate keys per environment (one for backtesting, one for live, one for monitoring).

Code samples

Python REST: place a market order

“`python import requests import os

headers = { “Authorization”: f”Bearer {os.environ[‘VOLITY_API_KEY’]}”, “Content-Type”: “application/json” } order = { “symbol”: “BTCUSD”, “side”: “buy”, “type”: “market”, “size”: 0.01, “stop_loss”: 65000, “take_profit”: 75000 } r = requests.post(“https://api.volity.io/v1/orders”, json=order, headers=headers) print(r.json()) “`

Node.js WebSocket: subscribe to BTC ticks

“`javascript import WebSocket from ‘ws’;

const ws = new WebSocket(‘wss://stream.volity.io/v1?api_key=’ + process.env.VOLITY_API_KEY);

ws.on(‘open’, () => { ws.send(JSON.stringify({ subscribe: [‘quotes:BTCUSD’, ‘quotes:ETHUSD’] })); });

ws.on(‘message’, (data) => { const tick = JSON.parse(data); console.log(${tick.symbol}: bid ${tick.bid} ask ${tick.ask}); }); “`

Rate limits

Tier REST req/min WebSocket connections Concurrent orders
Standard 60 5 50
VIP 600 25 500

VIP tier unlocks at $50,000 account balance. Rate-limit headroom is one of the practical reasons high-frequency strategies graduate to VIP early.

Sandbox environment

Every API key can toggle between sandbox (demo capital) and live (real capital). Sandbox is identical to live in every aspect except the funds; orders fill against virtual balance. Use it to:

  • Test new strategies before deploying to live
  • Validate error handling and reconnection logic
  • Onboard new developers without exposing live keys
  • Run automated test suites in CI/CD pipelines

Switching is a single API parameter or a separate base URL (sandbox.api.volity.io).

Common crypto trading API use cases

  • Algorithmic trading. Custom strategies in Python or C++ that the MQL EA framework cannot express
  • Portfolio dashboards. Aggregate positions across Volity plus other accounts into a single view
  • Risk-monitoring overlays. Continuously check drawdown, exposure concentration, leverage utilisation; alert on threshold breach
  • Backtesting infrastructure. Pull historical data, replay against your strategy with realistic spreads and slippage
  • Reporting and compliance tooling. Export daily P&L, generate per-trade reports for tax or audit needs
  • Copy-trading systems. Mirror trades from a master account to follower accounts (subject to regulatory requirements)

Latency and reliability

Volity’s API runs from European data centres with global edge presence. Typical median latencies:

  • REST request from EU: 30-80 ms
  • REST request from US East Coast: 90-130 ms
  • WebSocket tick delivery: sub-50 ms from quote update to client
  • Uptime SLA: 99.9% on Standard, 99.99% on VIP

For latency-sensitive strategies, VIP-tier accounts can request dedicated cross-connects to the trading core.

Security best practices

  • Never commit API keys to git. Use environment variables or a secrets manager
  • Restrict by IP on production keys
  • Use read-only keys for dashboards and monitoring
  • Rotate keys quarterly as part of standard hygiene
  • Enable 2FA on the account itself, not just the key
  • Log all key usage server-side to detect anomalous access

Sources

Frequently asked questions

What is a crypto trading API?

A crypto trading API is a programmatic interface for placing trades, querying market data, and managing positions automatically. The Volity crypto trading API exposes REST endpoints for account and order operations, plus WebSocket streams for real-time prices. Suits algorithmic traders, custom dashboards, and bot integrations.

Is Volity’s API free?

Yes. The API is included with your Volity account. Standard rate limits (60 req/min REST, 5 WebSocket connections) come with every account. VIP-tier accounts ($50,000 minimum) unlock higher rate limits.

How do I get an API key?

Open the Volity account portal, navigate to Settings → API Access, click “Generate Key”. You set permissions (read-only, trading, or full), IP allowlist, and sandbox/live toggle at creation time. Keys are revocable at any time.

Can I run high-frequency trading on Volity?

Yes. VIP-tier accounts unlock 600 req/min REST and 25 WebSocket connections, with 99.99% uptime SLA and optional dedicated cross-connects. The execution layer holds 99.6% sub-1s fills for manual orders; programmatic orders fill at the same speed.

Does the API support backtesting?

The API itself does not run backtests, but it exposes historical OHLCV data via GET /candles that you can pull into a backtester of your choice (Backtrader, vectorbt, custom). VIP-tier accounts get extended history depth.

What languages can I use with the Volity API?

Any language that handles HTTP REST and WebSocket. Common choices: Python, Node.js, Go, Rust, C#, Java. MQL4 and MQL5 EAs run inside Volity MT, not via the REST API.

Can I use the API to copy trades?

Yes, subject to regulatory requirements in your jurisdiction. Volity also offers a hosted copy-trading product via /tools/crypto-copy-trading/ for users who do not want to build the infrastructure themselves.

Start Your Days Smarter!

Get market insights, education, and platform updates from the Volity team.

Start Your Days Smarter!

High-Risk Investment Notice:  Website information does not contain and should not be construed as containing investment advice, investment recommendations, or an offer or solicitation of any transaction in financial instruments. It has not been prepared in accordance with legal requirements designed to promote the independence of investment research, and it is not subject to any prohibition on dealing ahead of the dissemination of investment research. Nothing on this site should be read or construed as constituting advice on the part of Volity Trade or any of its affiliates, directors, officers, or employees.

Please note that content is a marketing communication. Before making investment decisions, you should seek out independent financial advisors to help you understand the risks.

Services are provided by Volity Trade Ltd, registered in Saint Lucia, with the number 2024-00059. You must be at least 18 years old to use the services.

Trading forex (foreign exchange) or CFDs (contracts for difference) on margin carries a high level of risk and may not be suitable for all investors. There is a possibility that you may sustain a loss equal to or greater than your entire investment. Therefore, you should not invest or risk money that you cannot afford to lose. The products are intended for retail, professional, and eligible counterparty clients. For clients who maintain account(s) with Volity Trade Ltd., retail clients could sustain a total loss of deposited funds but are not subject to subsequent payment obligations beyond the deposited funds. Professional and eligible counterparty clients could sustain losses in excess of deposits.

Volity is a trademark of Volity Limited, registered in the Republic of Hong Kong, with the number 67964819.
Volity Invest Ltd, number HE 452984, registered at Archiepiskopou Makariou III, 41, Floor 1, 1065, Lefkosia, Cyprus is acting as a payment agent of Volity Trade Ltd.

Volity Trade Ltd. is an introductory broker for UBK Markets Ltd. It offers execution and custody services for clients introduced by Volity. UBK Markets Ltd is authorised and regulated by the Cyprus Securities and Exchange Commission (CySEC), license number 186/12 and registered at 67, Spyrou Kyprianou Avenue, Kyriakides Business Center, 2nd Floor, CY-4003 Limassol, Cyprus.

Volity Trade Ltd. does not offer services to citizens/residents of certain jurisdictions, such as the United States, and is not intended for distribution to or use by any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation.

Copyright: © 2026 Volity Trade Ltd. All Rights reserved.