The Trade API provides endpoints to interact with trade data, including querying trades by symbol and retrieving trades within a specific date and time range.
Ensure you have the following preconfigured:
- Java
- Elasticsearch
- Kafka
Retrieve trades based on the symbol.
- URL:
/api/trade
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
GET http://localhost:8080/api/trade?symbol=META
Retrieve trades based on the symbol and a specified time range.
- URL:
/api/trade/range
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
start |
string (ISO 8601 DateTime) |
Yes | The start of the time range in YYYY-MM-DD HH:mm format. |
2025-01-15 00:00 |
end |
string (ISO 8601 DateTime) |
Yes | The end of the time range in YYYY-MM-DD HH:mm format. |
2025-01-15 12:00 |
GET http://localhost:8080/api/trade/range?symbol=META&start=2025-01-15 00:00&end=2025-01-15 12:00
Retrieve trade orders filtered by symbol, time range, and a maximum trade volume.
- URL:
/api/trade/volume/less
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
start |
string (ISO 8601 DateTime) |
Yes | The start of the time range in YYYY-MM-DD HH:mm format. |
2025-01-14 00:00 |
end |
string (ISO 8601 DateTime) |
Yes | The end of the time range in YYYY-MM-DD HH:mm format. |
2025-01-15 23:59 |
volume |
number |
Yes | The maximum trade volume to filter. | 200 |
GET http://localhost:8080/api/trade/volume/less?start=2025-01-14 00:00&end=2025-01-15 23:59&symbol=META&volume=200
Retrieve aggregated statistics on trade volume filtered by symbol and time range.
- URL:
/api/trade/aggregate
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
start |
string (ISO 8601 DateTime) |
Yes | The start of the time range in YYYY-MM-DD HH:mm format. |
2025-01-14 00:00 |
end |
string (ISO 8601 DateTime) |
Yes | The end of the time range in YYYY-MM-DD HH:mm format. |
2025-01-15 23:59 |
GET http://localhost:8080/api/trade/aggregate?start=2025-01-17 00:00&end=2025-01-17 23:59&symbol=META
Retrieve trade orders where the price difference (high - low) exceeds a specified threshold.
- URL:
/api/trade/significant
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
threshold |
integer |
Yes | The minimum price difference (high - low) for filtering. | 10 |
GET http://localhost:8080/api/trade/significant?threshold=10&symbol=META
Retrieve a daily trade volume histogram, calculating the total volume traded for each day.
- URL:
/api/trade/volume
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
GET http://localhost:8080/api/trade/volume?symbol=META
Retrieve the most significant price differences per day for a given trade symbol, including the high, low, date, and volume for each day with the largest price difference.
- URL:
/api/trade/volatile
- Method:
GET
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
symbol |
string |
Yes | The trade symbol to filter (e.g., META , AAPL ). |
META |
GET http://localhost:8080/api/trade/volatile?symbol=META