Private/Get-ClobPrice.ps1
|
function Get-ClobPrice { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string]$TokenId, [Parameter(Mandatory = $true)] [ValidateSet('buy', 'sell')] [string]$Side, [Parameter()] [ValidateSet('table', 'json')] [string]$Output = 'table' ) process { $client = [ClobClient]::new() $result = $client.GetPrice($TokenId, $Side) [PolymarketOutput]::Format($result, $Output) } } |