OrderBookSnapshot
A snapshot of the order book for a market.Market identifier
List of buy orders (sorted by price descending)
List of sell orders (sorted by price ascending)
Unix timestamp of last orderbook update
Methods
from_dict(data)
Creates an OrderBookSnapshot instance from an API response dictionary.
Example
PriceLevel
A single price level in the orderbook.Price scaled by 1e6 (divide by 1,000,000 to get percentage)
Total size available at this price (6 decimals)
Methods
from_dict(data)
Creates a PriceLevel instance from an API response dictionary.
Example
Trade
A trade execution.Unique trade ID
Market identifier
Buyer’s wallet address
Seller’s wallet address
Execution price (scaled by 1e6)
Trade size (6 decimals)
Outcome traded (0 = YES, 1 = NO)
Trade execution timestamp
Transaction hash
Methods
from_dict(data)
Creates a Trade instance from an API response dictionary.
Example
Position
A user’s position in a market.Position ID
Market identifier
User’s wallet address
Number of YES shares held (6 decimals)
Number of NO shares held (6 decimals)
Total cost of YES shares (in USDC with 6 decimals)
Total cost of NO shares (in USDC with 6 decimals)
Revenue from selling YES shares (in USDC with 6 decimals)
Revenue from selling NO shares (in USDC with 6 decimals)
Total USDC invested in this position (6 decimals)
Net cost after accounting for revenue (6 decimals)
Total revenue from this position (6 decimals)
Last update timestamp
Methods
from_dict(data)
Creates a Position instance from an API response dictionary.
Example
Holder
A top holder in a market.User’s wallet address
Number of YES shares held (6 decimals)
Number of NO shares held (6 decimals)
Total USDC invested (6 decimals)
Methods
from_dict(data)
Creates a Holder instance from an API response dictionary.
ClaimablePosition
A resolved market where the user has winning tokens to claim.Market identifier
Market contract address
Winning outcome label (“YES” or “NO”)
Raw token balance (6 decimals)
Human-readable payout (e.g., “10.50”)
Properties
payout_float
Returns the payout as a float (balance / 1,000,000).
Methods
from_dict(data)
Creates a ClaimablePosition instance from an API response dictionary.
Example
UserActivity
User trading activity summary.User’s wallet address
Total number of trades
Total trading volume (in USDC with 6 decimals)
Profit and loss (in USDC with 6 decimals)
Number of unique markets traded
Methods
from_dict(data)
Creates a UserActivity instance from an API response dictionary.
UserStats
Detailed user statistics.User’s wallet address
Total USDC spent on positions (6 decimals)
Total USDC invested in positions (6 decimals)
Current value of all positions (6 decimals)
Profit/Loss (6 decimals)
PnL as percentage
Methods
from_dict(data)
Creates a UserStats instance from an API response dictionary.
Example
PendingTrade
A trade that is pending on-chain confirmation.Market identifier
Transaction hash
Buyer’s wallet address
Seller’s wallet address
Trade size (6 decimals)
Execution price (scaled by 1e6)
Submission timestamp
Whether this is part of a batch
Index within the batch (if applicable)
Methods
from_dict(data)
Creates a PendingTrade instance from an API response dictionary.
FailedTrade
A trade that failed on-chain.Market identifier
Transaction hash
Buyer’s wallet address
Seller’s wallet address
Attempted trade size (6 decimals)
Attempted execution price (scaled by 1e6)
Reason for failure
Submission timestamp
Index within the batch (if applicable)
Methods
from_dict(data)
Creates a FailedTrade instance from an API response dictionary.
SettlementStatus
Settlement status for a transaction.Whether the transaction was found
Transaction hash
Status (e.g., “pending”, “confirmed”, “failed”)
Error message if failed
Market identifier
Buyer’s wallet address
Seller’s wallet address
Trade size (6 decimals)
Execution price (scaled by 1e6)
Timestamp
Whether this is part of a batch
Index within the batch (if applicable)
Methods
from_dict(data)
Creates a SettlementStatus instance from an API response dictionary.
AssetPrice
Current price data for an asset.Asset symbol (e.g., “BTC”, “ETH”)
Current price scaled by 1e6 (e.g., 97250000000 = $97,250.00)
Unix timestamp when price was fetched
Methods
Creates an
AssetPrice instance from an API response dictionary.Example
FailedClaim
A claim transaction that failed.Transaction hash of the failed claim
User’s wallet address
Market contract address
Market identifier
Expected payout amount (6 decimals)
Winning outcome (0=YES, 1=NO)
Unix timestamp when claim was submitted
Methods
Creates a
FailedClaim instance from an API response dictionary.Example
PendingClaim
A claim transaction pending confirmation.Transaction hash of the pending claim
User’s wallet address
Market contract address
Market identifier
Expected payout amount (6 decimals)
Winning outcome (0=YES, 1=NO)
Unix timestamp when claim was submitted
Methods
Creates a
PendingClaim instance from an API response dictionary.