autoit / Binance spot API / Compressed/Aggregate Trades List
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oQueryParams = ObjCreate("Chilkat.JsonObject")
$oQueryParams.UpdateString("symbol","BNBUSDT")
$oHttp.SetRequestHeader "Content-Type","application/json"
Local $oResp = $oHttp.QuickRequestParams("GET","https://domain.com/api/v3/aggTrades",$oQueryParams)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite($oResp.StatusCode & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)
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": [
]
}