# OpenAPI Introduction
OpenAPI provides wide varieties of market data and trading services for your programmed trading to meet the needs of every developer's programmed trading and help your Quant dreams.
OpenAPI consists of moomoo OpenD and moomoo API:
- moomoo OpenD is the gateway program of moomoo API, running on your local computer or cloud server. It is responsible for transferring the protocol requests to moomoo servers, and returning the processed data.
The following are communication architecture diagrams of OpenAPI.
The first time using moomoo OpenAPI, you need to finish the following two steps:
The first step is to install and start a gateway program moomoo OpenD locally or in the cloud.
moomoo OpenD exposes the interfaces in the way of TCP, which is responsible for transferring the protocol requests to moomoo servers and returning the processed data. The protocol interface has nothing to do with the type of programming language.
The second step is to download moomoo API and complete Environment Setup.
For your convenience, moomoo encapsulates API SDK for mainstream programming languages (hereinafter referred to as moomoo API).
# moomoo ID
moomoo ID is your user account (moomoo ID), which can be used in moomoo APP and OpenAPI.
You can use your moomoo ID and login password to log in to moomoo OpenD and obtain market data.
# Trading Account
A trading account serves as your securities account, acquired through the completion of the account opening procedure. The trading account is used for the purchase, sale and holding of various financial instruments provided by moomoo. Trading accounts include U.S. margin/cash accounts, Hong Kong margin/cash accounts, A-share accounts, and futures accounts.
- A U.S. account is used for trading securities and options in the U.S. market.
- A HK account is used for trading securities and options in the Hong Kong market.
- An A-share account is used for trading China Connect Securities supported through the HKEX Stock Connect program.
- A futures account is used for trading a variety of futures products in global markets, including futures in the Hong Kong market, CME Group futures in the U.S. market, futures in the Singapore market, and futures in the Japanese market. HK index options are also traded through the HK futures account.
Under one moomoo ID, you can open trading accounts from different securities firms. That is, under one moomoo ID, there might be several trading accounts.
There are 2 functions of OpenAPI: quotation and trading.
# Quotation Functions
# Quotation Data Categories
Including stocks, indices, options and futures from HK, US and A-share market. Find the specific types of support in the table below. You need authorities for each kinds of market data. For more details on how to obtain authorities, please click here.
|HK Market||Securities ||✓|
|US Market||Securities ||✓|
|A-share Market||Securities ||✓|
|Singapore Market||Securities ||X|
# Method to Obtain Market Data
- Subscribe and receive pushed real-time quote, candlestick, tick-by-tick and order book.
- Request for the latest market snapshot, historical candlesticks etc.
# Trading Functions
# Trading Capacity
Including stocks, options and futures from HK, US, A-share, Singapore and Japanese markets. Find the specific types of support in the table below:
|Market||Contracts||Paper Trading||Live Trading|
|FUTU HK||Moomoo Financial Inc.||Moomoo Financial Singapore Pte. Ltd.||FUTU AU|
|HK Market||Securities ||✓||✓||✓||✓||✓|
|US Market||Securities ||✓||✓||✓||✓||✓|
|A-share Market||China Connect Securities stocks||✓||✓||✓||✓||X|
|Non-China Connect Securities stocks||✓||X||X||X||X|
|Singapore Market||Securities ||X||X||X||X||X|
# Method of Trading
The trading interfaces are used for both live trading and paper trading.
- Full platform and multi-language
- moomoo OpenD supports Windows, MacOS, CentOS, Ubuntu
- Stable speed and free
- Stable technical architecture, directly connected to the exchanges
- The fastest order is 0.0014s
- There is no additional charge for trading via OpenAPI
- Abundant investment varieties
- Supporting real-time market data, live trading, and simulated trading in multiple markets including United States, Hong Kong, etc.
- Professional institutional services
- Customized market data and trading solutions