Skip to main content

Market

A prediction market on the Turbine platform.
id
str
Unique market identifier (hex string)
chain_id
int
Blockchain chain ID (137 = Polygon, 43114 = Avalanche, 84532 = Base Sepolia)
contract_address
str
Market contract address (ERC1155 for outcome tokens)
settlement_address
str
Settlement contract address (holds USDC collateral)
question
str
Market question (e.g., “Will BTC be above $97,250 at 3:15 PM?”)
description
str
Detailed market description
category
str
Market category (e.g., “crypto”, “sports”, “politics”)
expiration
int
Unix timestamp when the market expires
maker
str
Address of the market creator
resolved
bool
Whether the market has been resolved
winning_outcome
int | None
Winning outcome (0 = YES, 1 = NO) if resolved, otherwise None
volume
int
Total trading volume (in USDC with 6 decimals)
created_at
int
Creation timestamp
updated_at
int
Last update timestamp

Methods

from_dict(data)

Creates a Market instance from an API response dictionary.

Example

markets = client.get_markets()

for market in markets:
    print(f"Market: {market.question}")
    print(f"  Chain: {market.chain_id}")
    print(f"  Expires: {market.expiration}")
    print(f"  Volume: ${market.volume / 1e6:.2f}")
    print(f"  Resolved: {market.resolved}")
    if market.resolved:
        outcome = "YES" if market.winning_outcome == 0 else "NO"
        print(f"  Winner: {outcome}")

QuickMarket

A 15-minute BTC/ETH quick market.
id
int
Internal database ID
market_id
str
Market identifier (hex string)
asset
str
Asset symbol (“BTC” or “ETH”)
interval_minutes
int
Market duration in minutes (typically 15)
start_price
int
Strike price scaled by 1e6 (divide by 1e6 to get USD price)
end_price
int | None
Final settlement price if resolved, otherwise None
start_time
int
Unix timestamp when the market started
end_time
int
Unix timestamp when the market expires
resolved
bool
Whether the market has been resolved
outcome
int | None
Winning outcome (0 = YES, 1 = NO) if resolved
price_source
str
Price oracle source (e.g., “Pyth”)
created_at
int
Creation timestamp
contract_address
str
Market contract address

Methods

from_dict(data)

Creates a QuickMarket instance from an API response dictionary.

Example

quick_market = client.get_quick_market("BTC")

print(f"Asset: {quick_market.asset}")
print(f"Strike: ${quick_market.start_price / 1e6:,.2f}")
print(f"Ends at: {quick_market.end_time}")
print(f"Resolved: {quick_market.resolved}")

if quick_market.resolved:
    outcome = "YES" if quick_market.outcome == 0 else "NO"
    print(f"Winner: {outcome}")
    print(f"Final price: ${quick_market.end_price / 1e6:,.2f}")
Currently, only BTC quick markets are active. The get_quick_market() method accepts “BTC” as the asset parameter.

Resolution

Market resolution status from the UMA oracle.
market_id
str
Market identifier
assertion_id
str
UMA assertion ID
outcome
int
Winning outcome (0 = YES, 1 = NO)
resolved
bool
Whether the resolution is finalized
timestamp
int
Resolution timestamp

Methods

from_dict(data)

Creates a Resolution instance from an API response dictionary.

Example

resolution = client.get_resolution(market_id="0xabc...")

if resolution.resolved:
    outcome = "YES" if resolution.outcome == 0 else "NO"
    print(f"Market resolved: {outcome} won")
    print(f"Assertion ID: {resolution.assertion_id}")
else:
    print("Market not yet resolved")

MarketStats

Statistics for a specific market.
market_id
str
Market identifier
contract_address
str
Market contract address
last_price
int
Last traded price (scaled by 1e6)
total_volume
int
Total trading volume (in USDC with 6 decimals)
volume_24h
int
24-hour trading volume (in USDC with 6 decimals)

Methods

from_dict(data)

Creates a MarketStats instance from an API response dictionary.

Example

stats = client.get_market_stats(market_id="0xabc...")

print(f"Last Price: {stats.last_price / 1e6:.2%}")
print(f"Total Volume: ${stats.total_volume / 1e6:,.2f}")
print(f"24h Volume: ${stats.volume_24h / 1e6:,.2f}")

ChainStats

Statistics for a single blockchain.
chain_id
int
Chain ID (137 = Polygon, 43114 = Avalanche)
total_volume
int
Total volume on this chain (in USDC with 6 decimals)
total_trades
int
Total number of trades on this chain
updated_at
int
Last update timestamp

Methods

from_dict(data)

Creates a ChainStats instance from an API response dictionary.

PlatformStats

Platform-wide statistics across all chains.
chains
list[ChainStats]
List of per-chain statistics
total_volume
int
Total platform volume (in USDC with 6 decimals)
total_trades
int
Total number of trades across all chains

Methods

from_dict(data)

Creates a PlatformStats instance from an API response dictionary.

Example

stats = client.get_platform_stats()

print(f"Platform Total Volume: ${stats.total_volume / 1e6:,.2f}")
print(f"Platform Total Trades: {stats.total_trades:,}")
print("\nPer-Chain Breakdown:")
for chain in stats.chains:
    chain_name = "Polygon" if chain.chain_id == 137 else "Avalanche"
    print(f"  {chain_name}:")
    print(f"    Volume: ${chain.total_volume / 1e6:,.2f}")
    print(f"    Trades: {chain.total_trades:,}")

Build docs developers (and LLMs) love