Public/MT5/Get-MT5SymbolGet.ps1
|
function Get-MT5SymbolGet { <# .SYNOPSIS Get a symbol by name #> [CmdletBinding()] param( [Parameter()][string] $TradePlatform, [Parameter(Mandatory)][string] $Symbol, [Parameter()][Nullable[guid]] $CacheId, [Parameter()][int] $CacheTimeout, [Parameter()][string] $IdempotencyKey ) $reqArgs = @{ Method = 'Get'; Path = "/api/v2/MT5/{tradePlatform}/SymbolGet/$([uri]::EscapeDataString([string]$Symbol))"; TradePlatform = $TradePlatform } if ($PSBoundParameters.ContainsKey('CacheId')) { $reqArgs.CacheId = $CacheId } if ($PSBoundParameters.ContainsKey('CacheTimeout')) { $reqArgs.CacheTimeout = $CacheTimeout } if ($PSBoundParameters.ContainsKey('IdempotencyKey')) { $reqArgs.IdempotencyKey = $IdempotencyKey } Invoke-MyWebApiRequest @reqArgs } |