GET Latest Trade
Retrieve latest trade for stocks, cryptocurrencies, forex, energy, commodities, and more with the Real-Time Trade Details API.
Overview
The Real-Time Trade Details API provides the latest trade data for various financial products, including stocks, cryptocurrencies, forex, energy, commodities, and more. This API allows users to retrieve latest trade details for a specified list of symbols.
Endpoint
Stocks
https://data.infoway.io
/stock/batch_trade/{codes}
Crypto
https://data.infoway.io/crypto/batch_trade/{codes}
Forex, Commodities, Futures
https://data.infoway.io
/common/batch_trade/{codes}
Request Frequency
This API shares the same rate limits as other endpoints. The number of allowed requests per second depends on your subscription plan. Please refer to the Rate Limit Policy for details.
Error Codes
See the HTTP Error Codes section for reference.
Authentication
Each request must include your API Key in the header.
Header
Type
Required
Description
apiKey
String
Yes
Your API Key associated with your current plan.
Request Parameters
Parameter
Type
Required
Description
Example
codes
String
Yes
Comma-separated list of product codes to query.
TSLA.US,AAPL.US
Example Request
GET https://data.infoway.io/stock/batch_trade/TSLA.US,AAPL.US
Example Response
{
"ret": 200,
"msg": "success",
"traceId": "27bdafb1-c735-4499-aad1-553820284895",
"data": [
{
"s": "XAUAUD",
"t": 1750177346523,
"p": "5188.211",
"v": "3.0",
"vw": "15564.6330",
"td": 0
},
{
"s": "USDCNY",
"t": 1750175583124,
"p": "7.184",
"v": "1.0",
"vw": "7.1840",
"td": 0
}
]
}Response Fields
Field
Type
Required
Description
Example / Values
s
String
Yes
The symbol or product code.
USDCNY
t
Long
Yes
The trade timestamp in Unix epoch format (milliseconds).
1747382898892
p
String
Yes
The price of the trade.
34.650
v
String
Yes
The volume of the trade.
439000
vw
String
Yes
The weighted average price of the trade.
15211350.000
td
int
Yes
The trade direction: 0 for default, 1 for Buy, 2 for Sell.
0
Notes
This API is ideal for tracking real-time transaction details across various markets.
You can query multiple products in a single request by separating their codes with commas (up to a supported limit).
The
tdfield indicates the trade direction (whether the trade was a Buy or a Sell).
Last updated
