GET Latest transaction price query
English / 中文
GET /trade-tick
Please refer to the complete URL in API Address Description
API Endpoints
US Stocks, Hong Kong Stocks, A Shares, Major Index Data API Endpoints:
Base Path:
/quote-stock-b-api/trade-tick
Full URL:
https://quote.tradeswitcher.com/quote-stock-b-api/trade-tick
Forex, Precious Metals, Cryptocurrencies, Commodities API Endpoints:
Base Path:
/quote-b-api/trade-tick
Full URL:
https://quote.tradeswitcher.com/quote-b-api/trade-tick
Request Examples
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:
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:
Batch Code Latest K-Line Query functionality. Due to the large number of batch query parameters, they are placed in the body, with only the token field parameter remaining in the URL parameters.
Body Request Parameters
Request Parameters
token
query
string
Yes
If you don't know your token, please contact the relevant personnel to request
body
body
object
No
» trace
body
string
Yes
Trace code, used for querying logs, please ensure it's unique for each request
» data
body
object
Yes
»» data_list
body
[object]
Yes
»»» code
body
string
Yes
Please refer to the code list and select the code you want to query
»»» kline_type
body
integer
Yes
K-line type, 1 for 1-minute K, 2 for 5-minute K, 3 for 15-minute K, 4 for 30-minute K, 5 for hourly K, 6 for 2-hour K, 7 for 4-hour K, 8 for daily K, 9 for weekly K, 10 for monthly K (Note: Stocks do not support 2-hour K and 4-hour K)
»»» kline_timestamp_end
body
integer
Yes
From which timestamp to query backward, 0 means from the current time, only effective for non-stock type codes
»»» query_kline_num
body
integer
Yes
Number of K-lines to query, up to 1 or 2
»»» adjust_type
body
integer
Yes
Adjustment type, only effective for stock type codes, e.g., 0: ex-right, 1: pre-adjustment, currently only supports 0
Response Example
Response
200
OK
OK
Inline
» ret
integer
true
» msg
string
true
» trace
string
true
» data
object
true
»» kline_list
[array]
true
»»» code
string
true
Product Code
»»» kline_type
integer
true
K-line type, where 1 represents 1-minute K, 2 for 5-minute K, 3 for 15-minute K, 4 for 30-minute K, 5 for hour K, 6 for 2-hour K, 7 for 4-hour K, 8 for daily K, 9 for weekly K, and 10 for monthly K (Note: Stocks do not support 2-hour K and 4-hour K)
»»» kline_data
[array]
true
»»»» timestamp
string
true
Timestamp of the K-line
»»»» open_price
string
true
Opening price of the K-line
»»»» close_price
string
true
Closing price of the K-line
»»»» high_price
string
true
Highest price of the K-line
»»»» low_price
string
true
Lowest price of the K-line
»»»» volume
string
true
Volume of the K-line
»»»» turnover
string
true
Turnover of the K-line
Official Website
Official website: https://alltick.co/
Last updated