# Models

## The APIBaseResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"APIBaseResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Response code (0 for success)"},"msg":{"type":"string","description":"Response message"},"result":{"type":"object","description":"Response data"}}}}}}
```

## The QuoteTokenBalance object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"QuoteTokenBalance":{"type":"object","properties":{"quoteToken":{"type":"string","description":"Quote token address"},"tokenDecimals":{"type":"integer","description":"Token decimals"},"totalBalance":{"type":"string","description":"Total balance (formatted with decimals)"},"availableBalance":{"type":"string","description":"Available balance (formatted with decimals)"},"frozenBalance":{"type":"string","description":"Frozen balance (formatted with decimals)"}}}}}}
```

## The MarketListResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"MarketListResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64","description":"Total number of markets"},"list":{"type":"array","items":{"$ref":"#/components/schemas/MarketData"}}}},"MarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"status":{"type":"integer","description":"Market status: 1=Created, 2=Activated, 3=Resolving, 4=Resolved, 5=Failed, 6=Deleted","enum":[1,2,3,4,5,6]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Created","Activated","Resolving","Resolved","Failed","Deleted"]},"marketType":{"type":"integer","description":"Market type: 0=Binary, 1=Categorical","enum":[0,1]},"childMarkets":{"type":"array","items":{"$ref":"#/components/schemas/ChildMarketData"},"description":"Child markets (for categorical markets)"},"yesLabel":{"type":"string","description":"Yes outcome label"},"noLabel":{"type":"string","description":"No outcome label"},"rules":{"type":"string","description":"Market rules"},"yesTokenId":{"type":"string","description":"Yes outcome token ID"},"noTokenId":{"type":"string","description":"No outcome token ID"},"conditionId":{"type":"string","description":"Condition ID"},"resultTokenId":{"type":"string","description":"Result token ID (after resolution)"},"volume":{"type":"string","description":"Total trading volume"},"volume24h":{"type":"string","description":"24-hour trading volume"},"volume7d":{"type":"string","description":"7-day trading volume"},"quoteToken":{"type":"string","description":"Quote token address"},"chainId":{"type":"string","description":"Chain ID"},"questionId":{"type":"string","description":"Question ID"},"incentiveFactor":{"type":"object","description":"Incentive factor (masked as empty object)"},"collection":{"$ref":"#/components/schemas/CollectionDataOpenAPI","description":"Collection market detail if any"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"},"cutoffAt":{"type":"integer","format":"int64","description":"Cutoff timestamp"},"resolvedAt":{"type":"integer","format":"int64","description":"Resolution timestamp"}}},"ChildMarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"yesLabel":{"type":"string"},"noLabel":{"type":"string"},"rules":{"type":"string"},"yesTokenId":{"type":"string"},"noTokenId":{"type":"string"},"conditionId":{"type":"string"},"resultTokenId":{"type":"string"},"volume":{"type":"string"},"quoteToken":{"type":"string"},"chainId":{"type":"string"},"questionId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"},"cutoffAt":{"type":"integer","format":"int64"},"resolvedAt":{"type":"integer","format":"int64"}}},"CollectionDataOpenAPI":{"type":"object","description":"Collection market data (for recurring/time-series markets)","properties":{"title":{"type":"string","description":"Collection title"},"symbol":{"type":"string","description":"Collection symbol"},"frequency":{"type":"string","description":"Collection frequency (e.g., daily, weekly)"},"current":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI","description":"Current period market data"},"next":{"type":"array","items":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI"},"description":"Upcoming period markets"}}},"CollectionMarketDataOpenAPI":{"type":"object","description":"Collection market period data","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"period":{"type":"string","description":"Period identifier"},"startTime":{"type":"integer","format":"int64","description":"Period start timestamp"},"endTime":{"type":"integer","format":"int64","description":"Period end timestamp"},"startPrice":{"type":"string","description":"Starting price for this period"},"endPrice":{"type":"string","description":"Ending price for this period"}}}}}}
```

## The MarketDetailResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"MarketDetailResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MarketData"}}},"MarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"status":{"type":"integer","description":"Market status: 1=Created, 2=Activated, 3=Resolving, 4=Resolved, 5=Failed, 6=Deleted","enum":[1,2,3,4,5,6]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Created","Activated","Resolving","Resolved","Failed","Deleted"]},"marketType":{"type":"integer","description":"Market type: 0=Binary, 1=Categorical","enum":[0,1]},"childMarkets":{"type":"array","items":{"$ref":"#/components/schemas/ChildMarketData"},"description":"Child markets (for categorical markets)"},"yesLabel":{"type":"string","description":"Yes outcome label"},"noLabel":{"type":"string","description":"No outcome label"},"rules":{"type":"string","description":"Market rules"},"yesTokenId":{"type":"string","description":"Yes outcome token ID"},"noTokenId":{"type":"string","description":"No outcome token ID"},"conditionId":{"type":"string","description":"Condition ID"},"resultTokenId":{"type":"string","description":"Result token ID (after resolution)"},"volume":{"type":"string","description":"Total trading volume"},"volume24h":{"type":"string","description":"24-hour trading volume"},"volume7d":{"type":"string","description":"7-day trading volume"},"quoteToken":{"type":"string","description":"Quote token address"},"chainId":{"type":"string","description":"Chain ID"},"questionId":{"type":"string","description":"Question ID"},"incentiveFactor":{"type":"object","description":"Incentive factor (masked as empty object)"},"collection":{"$ref":"#/components/schemas/CollectionDataOpenAPI","description":"Collection market detail if any"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"},"cutoffAt":{"type":"integer","format":"int64","description":"Cutoff timestamp"},"resolvedAt":{"type":"integer","format":"int64","description":"Resolution timestamp"}}},"ChildMarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"yesLabel":{"type":"string"},"noLabel":{"type":"string"},"rules":{"type":"string"},"yesTokenId":{"type":"string"},"noTokenId":{"type":"string"},"conditionId":{"type":"string"},"resultTokenId":{"type":"string"},"volume":{"type":"string"},"quoteToken":{"type":"string"},"chainId":{"type":"string"},"questionId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"},"cutoffAt":{"type":"integer","format":"int64"},"resolvedAt":{"type":"integer","format":"int64"}}},"CollectionDataOpenAPI":{"type":"object","description":"Collection market data (for recurring/time-series markets)","properties":{"title":{"type":"string","description":"Collection title"},"symbol":{"type":"string","description":"Collection symbol"},"frequency":{"type":"string","description":"Collection frequency (e.g., daily, weekly)"},"current":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI","description":"Current period market data"},"next":{"type":"array","items":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI"},"description":"Upcoming period markets"}}},"CollectionMarketDataOpenAPI":{"type":"object","description":"Collection market period data","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"period":{"type":"string","description":"Period identifier"},"startTime":{"type":"integer","format":"int64","description":"Period start timestamp"},"endTime":{"type":"integer","format":"int64","description":"Period end timestamp"},"startPrice":{"type":"string","description":"Starting price for this period"},"endPrice":{"type":"string","description":"Ending price for this period"}}}}}}
```

## The CollectionMarketDataOpenAPI object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"CollectionMarketDataOpenAPI":{"type":"object","description":"Collection market period data","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"period":{"type":"string","description":"Period identifier"},"startTime":{"type":"integer","format":"int64","description":"Period start timestamp"},"endTime":{"type":"integer","format":"int64","description":"Period end timestamp"},"startPrice":{"type":"string","description":"Starting price for this period"},"endPrice":{"type":"string","description":"Ending price for this period"}}}}}}
```

## The CollectionDataOpenAPI object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"CollectionDataOpenAPI":{"type":"object","description":"Collection market data (for recurring/time-series markets)","properties":{"title":{"type":"string","description":"Collection title"},"symbol":{"type":"string","description":"Collection symbol"},"frequency":{"type":"string","description":"Collection frequency (e.g., daily, weekly)"},"current":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI","description":"Current period market data"},"next":{"type":"array","items":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI"},"description":"Upcoming period markets"}}},"CollectionMarketDataOpenAPI":{"type":"object","description":"Collection market period data","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"period":{"type":"string","description":"Period identifier"},"startTime":{"type":"integer","format":"int64","description":"Period start timestamp"},"endTime":{"type":"integer","format":"int64","description":"Period end timestamp"},"startPrice":{"type":"string","description":"Starting price for this period"},"endPrice":{"type":"string","description":"Ending price for this period"}}}}}}
```

## The MarketData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"MarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"status":{"type":"integer","description":"Market status: 1=Created, 2=Activated, 3=Resolving, 4=Resolved, 5=Failed, 6=Deleted","enum":[1,2,3,4,5,6]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Created","Activated","Resolving","Resolved","Failed","Deleted"]},"marketType":{"type":"integer","description":"Market type: 0=Binary, 1=Categorical","enum":[0,1]},"childMarkets":{"type":"array","items":{"$ref":"#/components/schemas/ChildMarketData"},"description":"Child markets (for categorical markets)"},"yesLabel":{"type":"string","description":"Yes outcome label"},"noLabel":{"type":"string","description":"No outcome label"},"rules":{"type":"string","description":"Market rules"},"yesTokenId":{"type":"string","description":"Yes outcome token ID"},"noTokenId":{"type":"string","description":"No outcome token ID"},"conditionId":{"type":"string","description":"Condition ID"},"resultTokenId":{"type":"string","description":"Result token ID (after resolution)"},"volume":{"type":"string","description":"Total trading volume"},"volume24h":{"type":"string","description":"24-hour trading volume"},"volume7d":{"type":"string","description":"7-day trading volume"},"quoteToken":{"type":"string","description":"Quote token address"},"chainId":{"type":"string","description":"Chain ID"},"questionId":{"type":"string","description":"Question ID"},"incentiveFactor":{"type":"object","description":"Incentive factor (masked as empty object)"},"collection":{"$ref":"#/components/schemas/CollectionDataOpenAPI","description":"Collection market detail if any"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"},"cutoffAt":{"type":"integer","format":"int64","description":"Cutoff timestamp"},"resolvedAt":{"type":"integer","format":"int64","description":"Resolution timestamp"}}},"ChildMarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"yesLabel":{"type":"string"},"noLabel":{"type":"string"},"rules":{"type":"string"},"yesTokenId":{"type":"string"},"noTokenId":{"type":"string"},"conditionId":{"type":"string"},"resultTokenId":{"type":"string"},"volume":{"type":"string"},"quoteToken":{"type":"string"},"chainId":{"type":"string"},"questionId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"},"cutoffAt":{"type":"integer","format":"int64"},"resolvedAt":{"type":"integer","format":"int64"}}},"CollectionDataOpenAPI":{"type":"object","description":"Collection market data (for recurring/time-series markets)","properties":{"title":{"type":"string","description":"Collection title"},"symbol":{"type":"string","description":"Collection symbol"},"frequency":{"type":"string","description":"Collection frequency (e.g., daily, weekly)"},"current":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI","description":"Current period market data"},"next":{"type":"array","items":{"$ref":"#/components/schemas/CollectionMarketDataOpenAPI"},"description":"Upcoming period markets"}}},"CollectionMarketDataOpenAPI":{"type":"object","description":"Collection market period data","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"period":{"type":"string","description":"Period identifier"},"startTime":{"type":"integer","format":"int64","description":"Period start timestamp"},"endTime":{"type":"integer","format":"int64","description":"Period end timestamp"},"startPrice":{"type":"string","description":"Starting price for this period"},"endPrice":{"type":"string","description":"Ending price for this period"}}}}}}
```

## The ChildMarketData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"ChildMarketData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"yesLabel":{"type":"string"},"noLabel":{"type":"string"},"rules":{"type":"string"},"yesTokenId":{"type":"string"},"noTokenId":{"type":"string"},"conditionId":{"type":"string"},"resultTokenId":{"type":"string"},"volume":{"type":"string"},"quoteToken":{"type":"string"},"chainId":{"type":"string"},"questionId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"},"cutoffAt":{"type":"integer","format":"int64"},"resolvedAt":{"type":"integer","format":"int64"}}}}}}
```

## The LatestPriceResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"LatestPriceResponse":{"type":"object","properties":{"tokenId":{"type":"string","description":"Token ID"},"price":{"type":"string","description":"Latest trade price"},"side":{"type":"string","description":"Last trade side (BUY/SELL)"},"size":{"type":"string","description":"Last trade size"},"timestamp":{"type":"integer","format":"int64","description":"Trade timestamp in milliseconds"}}}}}}
```

## The OrderbookResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderbookResponse":{"type":"object","properties":{"market":{"type":"string","description":"Condition ID"},"tokenId":{"type":"string","description":"Token ID"},"timestamp":{"type":"integer","format":"int64","description":"Timestamp in milliseconds"},"bids":{"type":"array","items":{"$ref":"#/components/schemas/OrderbookLevel"},"description":"Buy orders, sorted by price descending"},"asks":{"type":"array","items":{"$ref":"#/components/schemas/OrderbookLevel"},"description":"Sell orders, sorted by price ascending"}}},"OrderbookLevel":{"type":"object","properties":{"price":{"type":"string","description":"Price level"},"size":{"type":"string","description":"Total size at this price level"}}}}}}
```

## The OrderbookLevel object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderbookLevel":{"type":"object","properties":{"price":{"type":"string","description":"Price level"},"size":{"type":"string","description":"Total size at this price level"}}}}}}
```

## The PriceHistoryResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"PriceHistoryResponse":{"type":"object","properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/PricePoint"},"description":"Historical price data points"}}},"PricePoint":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":"UTC timestamp in seconds"},"p":{"type":"string","description":"Price"}}}}}}
```

## The PricePoint object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"PricePoint":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":"UTC timestamp in seconds"},"p":{"type":"string","description":"Price"}}}}}}
```

## The QuoteTokenListResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"QuoteTokenListResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64","description":"Total number of quote tokens"},"list":{"type":"array","items":{"$ref":"#/components/schemas/QuoteTokenData"}}}},"QuoteTokenData":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Quote token ID"},"quoteTokenName":{"type":"string","description":"Quote token name"},"quoteTokenAddress":{"type":"string","description":"Quote token contract address"},"ctfExchangeAddress":{"type":"string","description":"CTF Exchange contract address"},"decimal":{"type":"integer","description":"Token decimals"},"symbol":{"type":"string","description":"Token symbol"},"chainId":{"type":"string","description":"Chain ID"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"}}}}}}
```

## The QuoteTokenData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"QuoteTokenData":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Quote token ID"},"quoteTokenName":{"type":"string","description":"Quote token name"},"quoteTokenAddress":{"type":"string","description":"Quote token contract address"},"ctfExchangeAddress":{"type":"string","description":"CTF Exchange contract address"},"decimal":{"type":"integer","description":"Token decimals"},"symbol":{"type":"string","description":"Token symbol"},"chainId":{"type":"string","description":"Chain ID"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"}}}}}}
```

## The PositionsResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"PositionsResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64","description":"Total number of positions"},"list":{"type":"array","items":{"$ref":"#/components/schemas/PositionData"}}}},"PositionData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"marketStatus":{"type":"integer","description":"Market status: 1=Created, 2=Activated, 3=Resolving, 4=Resolved, 5=Failed, 6=Deleted"},"marketStatusEnum":{"type":"string","description":"Human-readable market status"},"marketCutoffAt":{"type":"integer","format":"int64","description":"Market cutoff timestamp"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID (for categorical markets)"},"rootMarketTitle":{"type":"string","description":"Root market title"},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=Yes, 2=No","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"sharesOwned":{"type":"string","description":"Number of shares owned"},"sharesFrozen":{"type":"string","description":"Number of shares frozen (in pending orders)"},"unrealizedPnl":{"type":"string","description":"Unrealized profit/loss"},"unrealizedPnlPercent":{"type":"string","description":"Unrealized profit/loss percentage"},"dailyPnlChange":{"type":"string","description":"Daily PnL change"},"dailyPnlChangePercent":{"type":"string","description":"Daily PnL change percentage"},"conditionId":{"type":"string","description":"Condition ID"},"tokenId":{"type":"string","description":"Token ID"},"currentValueInQuoteToken":{"type":"string","description":"Current value in quote token (shares × current price)"},"avgEntryPrice":{"type":"string","description":"Average entry price"},"claimStatus":{"type":"integer","description":"Claim status: 0=CanNotClaim, 1=WaitClaim, 2=Claiming, 3=ClaimFailed, 4=Claimed"},"claimStatusEnum":{"type":"string","description":"Human-readable claim status","enum":["CanNotClaim","WaitClaim","Claiming","ClaimFailed","Claimed"]},"quoteToken":{"type":"string","description":"Quote token address"}}}}}}
```

## The PositionData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"PositionData":{"type":"object","properties":{"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"marketStatus":{"type":"integer","description":"Market status: 1=Created, 2=Activated, 3=Resolving, 4=Resolved, 5=Failed, 6=Deleted"},"marketStatusEnum":{"type":"string","description":"Human-readable market status"},"marketCutoffAt":{"type":"integer","format":"int64","description":"Market cutoff timestamp"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID (for categorical markets)"},"rootMarketTitle":{"type":"string","description":"Root market title"},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=Yes, 2=No","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"sharesOwned":{"type":"string","description":"Number of shares owned"},"sharesFrozen":{"type":"string","description":"Number of shares frozen (in pending orders)"},"unrealizedPnl":{"type":"string","description":"Unrealized profit/loss"},"unrealizedPnlPercent":{"type":"string","description":"Unrealized profit/loss percentage"},"dailyPnlChange":{"type":"string","description":"Daily PnL change"},"dailyPnlChangePercent":{"type":"string","description":"Daily PnL change percentage"},"conditionId":{"type":"string","description":"Condition ID"},"tokenId":{"type":"string","description":"Token ID"},"currentValueInQuoteToken":{"type":"string","description":"Current value in quote token (shares × current price)"},"avgEntryPrice":{"type":"string","description":"Average entry price"},"claimStatus":{"type":"integer","description":"Claim status: 0=CanNotClaim, 1=WaitClaim, 2=Claiming, 3=ClaimFailed, 4=Claimed"},"claimStatusEnum":{"type":"string","description":"Human-readable claim status","enum":["CanNotClaim","WaitClaim","Claiming","ClaimFailed","Claimed"]},"quoteToken":{"type":"string","description":"Quote token address"}}}}}}
```

## The UserTradeListResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"UserTradeListResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64","description":"Total number of trades"},"list":{"type":"array","items":{"$ref":"#/components/schemas/UserTradeData"}}}},"UserTradeData":{"type":"object","description":"Trade data for querying other users' trades (orderNo and tradeNo are hidden for privacy)","properties":{"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID (for categorical markets)"},"rootMarketTitle":{"type":"string","description":"Root market title"},"side":{"type":"string","description":"Trade side (BUY/SELL)"},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=Yes, 2=No","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"price":{"type":"string","description":"Trade price"},"shares":{"type":"string","description":"Number of shares traded"},"amount":{"type":"string","description":"Trade amount in quote token"},"fee":{"type":"string","description":"Fee amount (human-readable format)"},"profit":{"type":"string","description":"Profit/loss"},"quoteToken":{"type":"string","description":"Quote token address"},"quoteTokenUsdPrice":{"type":"string","description":"USD price of quote token"},"usdAmount":{"type":"string","description":"Total USD value of this trade"},"status":{"type":"integer","description":"Trade status: 1=Pending, 2=Filled, 3=Canceled, 4=Expired, 5=Failed"},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Pending","Filled","Canceled","Expired","Failed"]},"chainId":{"type":"string","description":"Chain ID"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"}}}}}}
```

## The UserTradeData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"UserTradeData":{"type":"object","description":"Trade data for querying other users' trades (orderNo and tradeNo are hidden for privacy)","properties":{"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID (for categorical markets)"},"rootMarketTitle":{"type":"string","description":"Root market title"},"side":{"type":"string","description":"Trade side (BUY/SELL)"},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=Yes, 2=No","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"price":{"type":"string","description":"Trade price"},"shares":{"type":"string","description":"Number of shares traded"},"amount":{"type":"string","description":"Trade amount in quote token"},"fee":{"type":"string","description":"Fee amount (human-readable format)"},"profit":{"type":"string","description":"Profit/loss"},"quoteToken":{"type":"string","description":"Quote token address"},"quoteTokenUsdPrice":{"type":"string","description":"USD price of quote token"},"usdAmount":{"type":"string","description":"Total USD value of this trade"},"status":{"type":"integer","description":"Trade status: 1=Pending, 2=Filled, 3=Canceled, 4=Expired, 5=Failed"},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Pending","Filled","Canceled","Expired","Failed"]},"chainId":{"type":"string","description":"Chain ID"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp"}}}}}}
```

## The OrderListResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderListResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64","description":"Total number of orders"},"list":{"type":"array","items":{"$ref":"#/components/schemas/OrderData"},"description":"List of orders"}}},"OrderData":{"type":"object","description":"Order record (list item or detail; detail includes trades)","properties":{"orderId":{"type":"string","description":"Order ID (transaction number)"},"transNo":{"type":"string","description":"Deprecated; use orderId instead"},"status":{"type":"integer","description":"Order status: 1=pending, 2=filled, 3=canceled, 4=expired, 5=failed","enum":[1,2,3,4,5]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Pending","Finished","Canceled","Expired","Failed"]},"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID"},"rootMarketTitle":{"type":"string","description":"Root market title"},"side":{"type":"integer","description":"Side: 1=buy, 2=sell","enum":[1,2]},"sideEnum":{"type":"string","description":"Human-readable side","enum":["Buy","Sell"]},"tradingMethod":{"type":"integer","description":"Trading method: 1=market, 2=limit"},"tradingMethodEnum":{"type":"string","description":"Human-readable trading method","enum":["Market","Limit"]},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=yes, 2=no","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"price":{"type":"string","description":"Price per share (for limit orders)"},"orderShares":{"type":"string","description":"Total shares in order"},"orderAmount":{"type":"string","description":"Total amount in order (quote token)"},"filledShares":{"type":"string","description":"Filled shares"},"filledAmount":{"type":"string","description":"Filled amount (quote token)"},"profit":{"type":"string","description":"Profit/loss"},"quoteToken":{"type":"string","description":"Quote token address"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (milliseconds)"},"expiresAt":{"type":"integer","format":"int64","description":"Expiration timestamp (milliseconds)"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/OrderTradeData"},"description":"Related trades (only present in order detail response)"}}},"OrderTradeData":{"type":"object","description":"Trade record within an order detail","properties":{"orderNo":{"type":"string","description":"Order number"},"tradeNo":{"type":"string","description":"Trade number"},"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"rootMarketId":{"type":"integer","format":"int64"},"rootMarketTitle":{"type":"string"},"side":{"type":"string"},"outcome":{"type":"string"},"outcomeSide":{"type":"integer","enum":[1,2]},"outcomeSideEnum":{"type":"string","enum":["Yes","No"]},"price":{"type":"string"},"shares":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"integer","format":"int64","description":"Fee in wei"},"feeFormatted":{"type":"string","description":"Human-readable fee"},"profit":{"type":"string"},"quoteToken":{"type":"string"},"quoteTokenUsdPrice":{"type":"string"},"usdAmount":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"chainId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"}}}}}}
```

## The OrderData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderData":{"type":"object","description":"Order record (list item or detail; detail includes trades)","properties":{"orderId":{"type":"string","description":"Order ID (transaction number)"},"transNo":{"type":"string","description":"Deprecated; use orderId instead"},"status":{"type":"integer","description":"Order status: 1=pending, 2=filled, 3=canceled, 4=expired, 5=failed","enum":[1,2,3,4,5]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Pending","Finished","Canceled","Expired","Failed"]},"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID"},"rootMarketTitle":{"type":"string","description":"Root market title"},"side":{"type":"integer","description":"Side: 1=buy, 2=sell","enum":[1,2]},"sideEnum":{"type":"string","description":"Human-readable side","enum":["Buy","Sell"]},"tradingMethod":{"type":"integer","description":"Trading method: 1=market, 2=limit"},"tradingMethodEnum":{"type":"string","description":"Human-readable trading method","enum":["Market","Limit"]},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=yes, 2=no","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"price":{"type":"string","description":"Price per share (for limit orders)"},"orderShares":{"type":"string","description":"Total shares in order"},"orderAmount":{"type":"string","description":"Total amount in order (quote token)"},"filledShares":{"type":"string","description":"Filled shares"},"filledAmount":{"type":"string","description":"Filled amount (quote token)"},"profit":{"type":"string","description":"Profit/loss"},"quoteToken":{"type":"string","description":"Quote token address"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (milliseconds)"},"expiresAt":{"type":"integer","format":"int64","description":"Expiration timestamp (milliseconds)"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/OrderTradeData"},"description":"Related trades (only present in order detail response)"}}},"OrderTradeData":{"type":"object","description":"Trade record within an order detail","properties":{"orderNo":{"type":"string","description":"Order number"},"tradeNo":{"type":"string","description":"Trade number"},"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"rootMarketId":{"type":"integer","format":"int64"},"rootMarketTitle":{"type":"string"},"side":{"type":"string"},"outcome":{"type":"string"},"outcomeSide":{"type":"integer","enum":[1,2]},"outcomeSideEnum":{"type":"string","enum":["Yes","No"]},"price":{"type":"string"},"shares":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"integer","format":"int64","description":"Fee in wei"},"feeFormatted":{"type":"string","description":"Human-readable fee"},"profit":{"type":"string"},"quoteToken":{"type":"string"},"quoteTokenUsdPrice":{"type":"string"},"usdAmount":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"chainId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"}}}}}}
```

## The OrderDetailResponse object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderDetailResponse":{"type":"object","description":"Order detail response (includes orderData with trades)","properties":{"orderData":{"$ref":"#/components/schemas/OrderData"}}},"OrderData":{"type":"object","description":"Order record (list item or detail; detail includes trades)","properties":{"orderId":{"type":"string","description":"Order ID (transaction number)"},"transNo":{"type":"string","description":"Deprecated; use orderId instead"},"status":{"type":"integer","description":"Order status: 1=pending, 2=filled, 3=canceled, 4=expired, 5=failed","enum":[1,2,3,4,5]},"statusEnum":{"type":"string","description":"Human-readable status","enum":["Pending","Finished","Canceled","Expired","Failed"]},"marketId":{"type":"integer","format":"int64","description":"Market ID"},"marketTitle":{"type":"string","description":"Market title"},"rootMarketId":{"type":"integer","format":"int64","description":"Root market ID"},"rootMarketTitle":{"type":"string","description":"Root market title"},"side":{"type":"integer","description":"Side: 1=buy, 2=sell","enum":[1,2]},"sideEnum":{"type":"string","description":"Human-readable side","enum":["Buy","Sell"]},"tradingMethod":{"type":"integer","description":"Trading method: 1=market, 2=limit"},"tradingMethodEnum":{"type":"string","description":"Human-readable trading method","enum":["Market","Limit"]},"outcome":{"type":"string","description":"Outcome label"},"outcomeSide":{"type":"integer","description":"Outcome side: 1=yes, 2=no","enum":[1,2]},"outcomeSideEnum":{"type":"string","description":"Human-readable outcome side","enum":["Yes","No"]},"price":{"type":"string","description":"Price per share (for limit orders)"},"orderShares":{"type":"string","description":"Total shares in order"},"orderAmount":{"type":"string","description":"Total amount in order (quote token)"},"filledShares":{"type":"string","description":"Filled shares"},"filledAmount":{"type":"string","description":"Filled amount (quote token)"},"profit":{"type":"string","description":"Profit/loss"},"quoteToken":{"type":"string","description":"Quote token address"},"createdAt":{"type":"integer","format":"int64","description":"Creation timestamp (milliseconds)"},"expiresAt":{"type":"integer","format":"int64","description":"Expiration timestamp (milliseconds)"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/OrderTradeData"},"description":"Related trades (only present in order detail response)"}}},"OrderTradeData":{"type":"object","description":"Trade record within an order detail","properties":{"orderNo":{"type":"string","description":"Order number"},"tradeNo":{"type":"string","description":"Trade number"},"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"rootMarketId":{"type":"integer","format":"int64"},"rootMarketTitle":{"type":"string"},"side":{"type":"string"},"outcome":{"type":"string"},"outcomeSide":{"type":"integer","enum":[1,2]},"outcomeSideEnum":{"type":"string","enum":["Yes","No"]},"price":{"type":"string"},"shares":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"integer","format":"int64","description":"Fee in wei"},"feeFormatted":{"type":"string","description":"Human-readable fee"},"profit":{"type":"string"},"quoteToken":{"type":"string"},"quoteTokenUsdPrice":{"type":"string"},"usdAmount":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"chainId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"}}}}}}
```

## The OrderTradeData object

```json
{"openapi":"3.0.3","info":{"title":"OPINION Prediction Market OpenAPI","version":"1.0.0"},"components":{"schemas":{"OrderTradeData":{"type":"object","description":"Trade record within an order detail","properties":{"orderNo":{"type":"string","description":"Order number"},"tradeNo":{"type":"string","description":"Trade number"},"txHash":{"type":"string","description":"Transaction hash"},"marketId":{"type":"integer","format":"int64"},"marketTitle":{"type":"string"},"rootMarketId":{"type":"integer","format":"int64"},"rootMarketTitle":{"type":"string"},"side":{"type":"string"},"outcome":{"type":"string"},"outcomeSide":{"type":"integer","enum":[1,2]},"outcomeSideEnum":{"type":"string","enum":["Yes","No"]},"price":{"type":"string"},"shares":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"integer","format":"int64","description":"Fee in wei"},"feeFormatted":{"type":"string","description":"Human-readable fee"},"profit":{"type":"string"},"quoteToken":{"type":"string"},"quoteTokenUsdPrice":{"type":"string"},"usdAmount":{"type":"string"},"status":{"type":"integer"},"statusEnum":{"type":"string"},"chainId":{"type":"string"},"createdAt":{"type":"integer","format":"int64"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opinion.trade/developer-guide/opinion-open-api/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
