delphiAx / Binance spot API / Compressed/Aggregate Trades List
Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
queryParams: TChilkatJsonObject;
resp: IChilkatHttpResponse;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := TChilkatHttp.Create(Self);
queryParams := TChilkatJsonObject.Create(Self);
queryParams.UpdateString('symbol','BNBUSDT');
http.SetRequestHeader('Content-Type','application/json');
resp := http.QuickRequestParams('GET','https://domain.com/api/v3/aggTrades',queryParams.ControlInterface);
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
Memo1.Lines.Add(IntToStr(resp.StatusCode));
Memo1.Lines.Add(resp.BodyStr);
Curl Command
curl -G -d "symbol=BNBUSDT"
-H "Content-Type: application/json"
https://domain.com/api/v3/aggTrades
Postman Collection Item JSON
{
"name": "Compressed/Aggregate Trades List",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"url": {
"raw": "{{url}}/api/v3/aggTrades?symbol=BNBUSDT",
"host": [
"{{url}}"
],
"path": [
"api",
"v3",
"aggTrades"
],
"query": [
{
"key": "symbol",
"value": "BNBUSDT",
"description": "Trading symbol, e.g. BNBUSDT"
},
{
"key": "fromId",
"value": "",
"description": "Trade id to fetch from. Default gets most recent trades.",
"disabled": true
},
{
"key": "startTime",
"value": "",
"description": "UTC timestamp in ms",
"disabled": true
},
{
"key": "endTime",
"value": "",
"description": "UTC timestamp in ms",
"disabled": true
},
{
"key": "limit",
"value": "500",
"description": "Default 500; max 1000.",
"disabled": true
}
]
},
"description": "Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.\n- If `startTime` and `endTime` are sent, time between startTime and endTime must be less than 1 hour.\n- If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned.\n\nWeight(IP): 1"
},
"response": [
]
}