TCL / Binance spot API / Query Sub Orders (USER_DATA)
Back to Collection Items
load ./chilkat.dll
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
set queryParams [new_CkJsonObject]
CkJsonObject_UpdateString $queryParams "timestamp" "{{timestamp}}"
CkJsonObject_UpdateString $queryParams "signature" "{{signature}}"
CkHttp_SetRequestHeader $http "Content-Type" "application/json"
CkHttp_SetRequestHeader $http "X-MBX-APIKEY" "{{binance-api-key}}"
# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://domain.com/sapi/v1/algo/futures/subOrders" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkJsonObject $queryParams
exit
}
puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp
delete_CkHttp $http
delete_CkJsonObject $queryParams
Curl Command
curl -G -d "timestamp=%7B%7Btimestamp%7D%7D"
-d "signature=%7B%7Bsignature%7D%7D"
-H "Content-Type: application/json"
-H "X-MBX-APIKEY: {{binance-api-key}}"
https://domain.com/sapi/v1/algo/futures/subOrders
Postman Collection Item JSON
{
"name": "Query Sub Orders (USER_DATA)",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "X-MBX-APIKEY",
"value": "{{binance-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/sapi/v1/algo/futures/subOrders?timestamp={{timestamp}}&signature={{signature}}",
"host": [
"{{url}}"
],
"path": [
"sapi",
"v1",
"algo",
"futures",
"subOrders"
],
"query": [
{
"key": "algoId",
"value": "13723",
"disabled": true
},
{
"key": "page",
"value": "",
"description": "Default is 1",
"disabled": true
},
{
"key": "pageSize",
"value": "",
"description": "MIN 1, MAX 100; Default 100",
"disabled": true
},
{
"key": "recvWindow",
"value": "5000",
"description": "The value cannot be greater than 60000",
"disabled": true
},
{
"key": "timestamp",
"value": "{{timestamp}}",
"description": "UTC timestamp in ms"
},
{
"key": "signature",
"value": "{{signature}}",
"description": "Signature"
}
]
},
"description": "Get respective sub orders for a specified algoId\n\nWeight(IP): 1"
},
"response": [
]
}