Private/Get-ClobMarkets.ps1

function Get-ClobMarkets {
  [CmdletBinding()]
  param (
    [Parameter()]
    [string]$ConditionId,

    [Parameter()]
    [string]$Cursor,

    [Parameter()]
    [ValidateSet('table', 'json')]
    [string]$Output = 'table'
  )

  process {
    $client = [ClobClient]::new()
    if ($ConditionId) {
      $result = $client.GetClobMarket($ConditionId)
    } else {
      $result = $client.GetClobMarkets($Cursor)
    }
    [PolymarketOutput]::Format($result, $Output)
  }
}