Chilkat Online Tools

Powershell / Binance spot API / Cancel Algo Order (TRADE)

Back to Collection Items

Add-Type -Path "C:\chilkat\ChilkatDotNet47-9.5.0-x64\ChilkatDotNet47.dll"

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

$http = New-Object Chilkat.Http

$http.SetRequestHeader("Content-Type","application/json")
$http.SetRequestHeader("X-MBX-APIKEY","{{binance-api-key}}")

$resp = $http.QuickRequest("DELETE","https://domain.com/sapi/v1/algo/futures/order?algoId=14511×tamp={{timestamp}}&signature={{signature}}")
if ($http.LastMethodSuccess -eq $false) {
    $($http.LastErrorText)
    exit
}

$($resp.StatusCode)
$($resp.BodyStr)

Curl Command

curl -X DELETE
	-H "Content-Type: application/json"
	-H "X-MBX-APIKEY: {{binance-api-key}}"
https://domain.com/sapi/v1/algo/futures/order?algoId=14511&timestamp={{timestamp}}&signature={{signature}}

Postman Collection Item JSON

{
  "name": "Cancel Algo Order (TRADE)",
  "request": {
    "method": "DELETE",
    "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/order?algoId=14511&timestamp={{timestamp}}&signature={{signature}}",
      "host": [
        "{{url}}"
      ],
      "path": [
        "sapi",
        "v1",
        "algo",
        "futures",
        "order"
      ],
      "query": [
        {
          "key": "algoId",
          "value": "14511"
        },
        {
          "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": "Cancel an active order.\n\nWeight(IP): 1"
  },
  "response": [
  ]
}