In this article, we will see how to get an open order to complete this series. As a result, we get the orderId of all open trades. This allows us, for example, to check an open trade with New-Order or to cancel the one with the Set-Order function in Binance using the API and PowerShell.
If you already have read the previous article, you’ll notice that there is nothing new under the sun. You should be able now to handle all the news functions you would need for your project. Again, this example Get-OpenOrder corresponds to my needs, you can modify it according to yours.
function Get-OpenOrders{ <# .SYNOPSIS Return the open orders .PARAMETER Symbol Indicate the pair of which you wish to obtain the open order .EXAMPLE Get-OpenOrders .EXAMPLE $OpenOrders = Get-OpenOrders -Symbol BTCUSDT #> [cmdletbinding()] param( [Parameter(Mandatory=$false)] [string]$Symbol ) BEGIN{ # Check prerequisit try{ Get-Command -Name Get-UnixTimeStamp -ErrorAction Stop | out-null Get-Command -name Get-BinanceAPISignature -ErrorAction Stop | Out-Null Get-Command -Name Get-BinanceAPIHeader -ErrorAction Stop | Out-Null Get-Command -Name Request-API -ErrorAction Stop | Out-Null } catch{ Write-Host "Load Get-UnixTimeStamp, Get-BinanceAPISignature, Get-BinanceAPIHeader, Request-API first prior to laod the current script" -b red Break } $TimeStamp = Get-UnixTimeStamp if($PSBoundParameters.ContainsKey('Symbol')){ $QueryString = "symbol=$Symbol×tamp=$TimeStamp&recvWindow=5000" } else{ $QueryString = "timestamp=$TimeStamp&recvWindow=5000" } } PROCESS{ $URI = Get-BinanceAPISignature -QueryString $QueryString -EndPoint "/api/v3/openOrders" $Headers = Get-BinanceAPIHeader $ObjResults = $null $ObjResults = Request-API -Method Get -URI $URI -Headers $Headers } END{ return $ObjResults } }
About this function
- EndPoint /api/v3/account
Part of the Account Endpoint which requires authentication. - Where are the functions Get-BinanceAPISignature, Get-BinanceAPIHeader?
See post blog number 3
Examples


This is a very good set of blog posts and functions. Thank you for taking the time to put this together.
Hi Roy,
This is true that it takes time. Your reply helps me to be confident. Thanks a lot!
Very good insight, i like it.tx for sharing
Thanks!