DataFlex / Binance delivery futures API / Get Funding Rate History of Perpetual Futures
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vQueryParams
Handle hoQueryParams
Variant vResp
Handle hoResp
String sTemp1
Integer iTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
If (Not(IsComObjectCreated(hoQueryParams))) Begin
Send CreateComObject of hoQueryParams
End
Get ComUpdateString Of hoQueryParams "symbol" "" To iSuccess
Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"
Get pvComObject of hoQueryParams to vQueryParams
Get ComQuickRequestParams Of hoHttp "GET" "https://domain.com/dapi/v1/fundingRate" vQueryParams To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComStatusCode Of hoResp To iTemp1
Showln iTemp1
Get ComBodyStr Of hoResp To sTemp1
Showln sTemp1
Send Destroy of hoResp
End_Procedure
Curl Command
curl -G -d "symbol="
-H "Content-Type: application/json"
https://domain.com/dapi/v1/fundingRate
Postman Collection Item JSON
{
"name": "Get Funding Rate History of Perpetual Futures",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"url": {
"raw": "{{url}}/dapi/v1/fundingRate?symbol=",
"host": [
"{{url}}"
],
"path": [
"dapi",
"v1",
"fundingRate"
],
"query": [
{
"key": "symbol",
"value": ""
},
{
"key": "startTime",
"value": "",
"disabled": true
},
{
"key": "endTime",
"value": "",
"disabled": true
},
{
"key": "limit",
"value": "",
"description": "Default 100; max 1000",
"disabled": true
}
]
}
},
"response": [
]
}