AllTick API Docs
API Status
  • Welcome
  • Integration Process
    • Process Description
    • Market Address Description
      • HTTP Quotes API Address Description
      • Websocket Quotes API Address Description
    • Token application
    • Interface restriction description
      • HTTP interface restrictions
      • Websocket interface limitations
      • Error code description
    • Universal standard header description
      • HTTP Common Standard Headers
      • Websocket Common Standard Header
    • Product Code List
      • A Share
      • Hong Kong Stock
      • US Stock
      • Cryptocurrency (Digital Currency)
      • Commodity (Precious Metals)
      • Forex
  • REST API
    • HTTP request example
    • HTTP interface API
      • GET Single Product K line query(High Low, Open, Close)
      • POST Query the latest 2 K lines of products in batches(High , Low, Open, Close)
      • GET Order Book(Depth) Query
      • GET Latest transaction price query(Latest Price)
      • GET Stocks product information query
      • Price changes, Market closure, Holidays, Limit up/down, New listings, and Delistings
  • Websocket API
    • Websocket request example
    • Websocket Interface API
      • Latest Trade Price (Real-time Tick Data) Batch Subscription
      • Order Book (Real-time Tick-by-Tick, Market Depth) Subscription
      • Cancel quote subscription
      • Ping Pong
      • K-line push (not supported)
  • FAQs
    • Basic usage
      • What types of financial data does AllTick provide?
      • How to obtain an API key from AllTick?
      • What is the data update frequency of AllTick?
      • How to integrate AllTick data into my application?
      • What programming languages does AllTick support for API calls?
      • Can I use AllTick's data for commercial purposes?
      • How to contact AllTick customer support?
      • Does AllTick's API have request limitations?
      • How to report data issues or API malfunctions?
      • Does AllTick provide real-time or delayed data?
    • Subscription and Account Management
      • How to register an AllTick account?
      • Does AllTick offer a free trial period?
      • How to cancel AllTick's subscription service?
      • What services does my subscription include?
      • How to upgrade my AllTick subscription plan?
      • How to change my account information?
      • I forgot my login password, what should I do?
      • How to secure my AllTick account?
      • Can multiple people share one AllTick account?
      • Can my subscription be refunded?
    • Data usage and technical issues
      • How to Use AllTick's WebSocket Service?
      • What data formats does AllTick's API support?
      • How to Handle High-Frequency Updates of AllTick Data?
      • I encountered a technical problem when using the API, how can I solve it?
      • How to ensure the accuracy of data received from AllTick?
      • Does AllTick Provide Historical Data Query?
      • How do I limit my data usage to avoid exceeding my subscription limits?
      • Does AllTick's API support batch requests?
      • How can I get real-time notifications and alerts on specific financial markets?
      • Does AllTick provide data analysis and visualization tools?
Powered by GitBook
On this page

Was this helpful?

  1. REST API
  2. HTTP interface API

GET Order Book(Depth) Query

PreviousPOST Query the latest 2 K lines of products in batches(High , Low, Open, Close)NextGET Latest transaction price query(Latest Price)

Last updated 1 month ago

Was this helpful?

English /

GET /depth-tick

Interface Description

The following is the maximum market depth for each product type:

  1. It is normal for inactive products to be smaller than the maximum range listed below.

  2. There is a situation where the unilateral depth is empty. For example, when the stock price limit rises or falls, the unilateral market opening may be empty.

FX、Metals
Cryptocurrency
HK Stocks
CN Stocks

Order Book Description

Maximum 1 gears(Only Price, No Volume)

Maximum 5 gears

Maximum 10 gears

Maximum 5 gears

Request Frequency

Plan
Individual request
Request multiple HTTP interfaces

Free

Once every 10 seconds, only 1 request can be made

1、One request per second.

2、/batch-kline needs 10-second intervals.

3、Total of 10 requests per minute (every 6 seconds).

4、Max 14400 daily requests; excess resets at midnight.

Basic

Only 1 request per second

1、One request per second.

2、/batch-kline: 1 request every 3 seconds.

3、Total of 60 requests per minute (1 request per second).

4、Max 86400 daily requests; excess resets at midnight.

Premium

Up to 10 requests per second

1、Combined interfaces: 10 requests/second.

2、/batch-kline: 1 request/2 seconds.

3、Total: 600 requests/minute (10/second).

4、Daily limit: 864,000 requests; reset daily at midnight if exceeded.

Professional

Up to 20 requests per second

1、Combined interfaces: 20 requests/second.

2、/batch-kline: 1 request/second interval.

3、Total: 1200 requests/minute (20/second).

4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.

All HK Stocks

Up to 20 requests per second

1、Combined interfaces: 20 requests/second.

2、/batch-kline: 1 request/second interval.

3、Total: 1200 requests/minute (20/second).

4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.

All CN Stocks

Up to 20 requests per second

1、Combined interfaces: 20 requests/second.

2、/batch-kline: 1 request/second interval.

3、Total: 1200 requests/minute (20/second).

4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.

Interface Limitations

API Endpoints

  1. US Stocks, Hong Kong Stocks, A Shares, Major Index Data API Endpoints:

    • Base Path: /quote-stock-b-api/depth-tick

    • Full URL: https://quote.alltick.io/quote-stock-b-api/depth-tick

  2. Forex, Precious Metals, Cryptocurrencies, Commodities API Endpoints:

    • Base Path: /quote-b-api/depth-tick

    • Full URL: https://quote.alltick.io/quote-b-api/depth-tick

Request Examples

  1. Request Example for US Stocks, Hong Kong Stocks, A Shares, Major Index Data: When sending a query request, you must include the method name and token information. An example request is as follows:

    https://quote.alltick.io/quote-stock-b-api/depth-tick?token=your_token&query=queryData
  2. Request Example for Forex, Precious Metals, Cryptocurrencies, Commodities: When sending a query request, you must include the method name and token information. An example request is as follows:

    https://quote.alltick.io/quote-b-api/depth-tick?token=your_token&query=queryData

Request Parameters

Name
Position
Type
Required
Description

token

query

string

No

query

query

string

No

See explanation for query request parameters

Query Request Parameters

Encode the following JSON into URL format and assign it to the query query string in the URL.

{
  "trace": "edd5df80-df7f-4acf-8f67-68fd2f096426",
  "data": {
    "symbol_list": [
      {
        "code": "857.HK"
      },
      {
        "code": "UNH.US"
      }
    ]
  }
}

Query Request Parameters

Name
Type
Required
Description

trace

string

Yes

data

object

Yes

» symbol_list

[object]

Yes

» » code

string

No

Code

Response Example

{
  "ret": 200,
  "msg": "ok",
  "trace": "edd5df80-df7f-4acf-8f67-68fd2f096426",
  "data": {
    "tick_list": [
      {
        "code": "857.HK",
        "seq": "30686349",
        "tick_time": "1677830357227",
        "bids": [
          {
            "price": "136.424",
            "volume": "100000.00"
          }
        ],
        "asks": [
          {
            "price": "136.427",
            "volume": "400000.00"
          }
        ]
      }
    ]
  }
}

Response Result

Status Code
Status Meaning
Description
Data Model

200

OK

OK

Inline

Name
Type
Required
Description

» ret

integer

true

Return code

» msg

string

true

Message corresponding to the return code

» trace

string

true

Request trace

» data

object

true

»» tick_list

[object]

true

»» » code

string

false

Code

»» » seq

string

false

Quote sequence number

»» » tick_time

string

false

Quote timestamp

»» » bids

[object]

false

Bid list

»» »» price

string

false

Price

»» »» volume

string

false

Volume

»» » asks

[object]

false

Ask list

»» »» price

string

false

Price

»» »» volume

string

false

Volume:

1、Forex, precious metals, and CFD indices do not provide volume.

2、Stocks and cryptocurrency data provide volume.

Official Website

Please be sure to read:

Please be sure to read:

Official website:

中文
[ HTTP Interface Limitations ].
[ Error Code Descriptions ].
https://alltick.co/

最新盘口报价查询

get
Query parameters
tokenstringRequired

如果不知道你的token,请联系相关人员索要

Example: 65b31e26-312c-4e71-89ae-f5e33073d1c8-1676446387481
querystringRequired

请对如下字段进行encode,后台服务收到之后会decode { "trace": "enim occaecat dolore esse voluptate", "data": { "symbol_list": [ { "code": "GBPJPY" }, { "code": "CADJPY" } ] } } trace:追踪码,用来查询日志使用,请保证每次请求时唯一 code:请查看code列表,选择你要查询的code

Example: %7B%20%20%20%20%22trace%22%3A%20%22enim%20occaecat%20dolore%20esse%20voluptate%22%2C%20%20%20%20%22data%22%3A%20%7B%20%20%20%20%20%20%20%20%22symbol_list%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22code%22%3A%20%22BTCUSDT%22%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22code%22%3A%20%22ETHUSDT%22%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%5D%20%20%20%20%7D%7D
Responses
200
OK
application/json
get
GET /quote-b-api/depth-tick?token=text&query=text HTTP/1.1
Host: 
Accept: */*
200

OK

{
  "ret": 200,
  "msg": "ok",
  "trace": "asdfsdfa",
  "data": {
    "tick_list": [
      {
        "code": "USDJPY",
        "seq": "30686349",
        "tick_time": "1677830357227",
        "bids": [
          {
            "price": "136.424",
            "volume": "100000.00"
          }
        ],
        "asks": [
          {
            "price": "136.427",
            "volume": "400000.00"
          }
        ]
      }
    ]
  }
}
  • GET /depth-tick
  • Interface Description
  • Request Frequency
  • Interface Limitations
  • API Endpoints
  • Request Examples
  • Request Parameters
  • Query Request Parameters
  • Response Result
  • GET最新盘口报价查询
  • Official Website