Skip to main content

Python SDK for Oracle Sentinel API - AI-powered prediction market intelligence with x402 payments

Project description

Oracle Sentinel SDK

Python SDK for Oracle Sentinel API - AI-powered prediction market intelligence.

Features

  • 🔐 Token Gating: Free unlimited access for $OSAI holders (1000+ tokens)
  • 💳 x402 Payments: Automatic micropayments via Solana/USDC
  • 🤖 AI Signals: Access trading signals, analysis, and whale activity
  • Simple API: Easy-to-use Python interface

Installation

pip install oracle-sentinel-sdk  # v2.0 with x402 support

For x402 payment support (auto-pay):

pip install oracle-sentinel-sdk  # v2.0 with x402 support[solana]

Quick Start

Option 1: Free Access ($OSAI Holders)

If you hold 1000+ $OSAI tokens, you get FREE unlimited access:

from oracle_sentinel import OracleSentinelClient

# Just provide your wallet address
client = OracleSentinelClient(wallet_address="YOUR_WALLET_ADDRESS")

# Get signals - FREE!
signals = client.get_bulk_signals()
print(f"Found {signals['count']} signals")

for signal in signals['signals']:
    print(f"  {signal['signal']}: {signal['question'][:50]}... (edge: {signal['edge']}%)")

Option 2: Pay-per-Request (x402)

No $OSAI? Pay with USDC per request:

from oracle_sentinel import OracleSentinelClient

# Provide your Solana private key for auto-payment
client = OracleSentinelClient(
    private_key="YOUR_SOLANA_PRIVATE_KEY",
    rpc_url="https://api.mainnet-beta.solana.com"  # or your preferred RPC
)

# Get signals - automatically pays $0.08 USDC
signals = client.get_bulk_signals()

# Get single signal - pays $0.01 USDC
signal = client.get_signal("bitcoin-above-100k")

# Get full analysis - pays $0.03 USDC
analysis = client.get_analysis("bitcoin-above-100k")

API Reference

Endpoints & Pricing

Method Endpoint Price Description
get_signal(slug) /api/v1/signal/{slug} $0.01 Trading signal for a market
get_analysis(slug) /api/v1/analysis/{slug} $0.03 Full AI analysis
get_whale_activity(slug) /api/v1/whale/{slug} $0.02 Whale trading activity
get_bulk_signals() /api/v1/bulk $0.08 Top 10 active signals
analyze_market(url) /api/v1/analyze $0.05 Analyze any Polymarket URL
get_info() /api/v1/info FREE API information

All endpoints are FREE for $OSAI holders (1000+ tokens)

Client Options

client = OracleSentinelClient(
    wallet_address="...",      # For token gating (free access)
    private_key="...",         # For x402 payment (auto-pay)
    rpc_url="...",             # Solana RPC URL (default: mainnet)
    base_url="...",            # API URL (default: https://oraclesentinel.xyz)
    auto_pay=True              # Enable automatic payment (default: True)
)

Utility Methods

# Check USDC balance
balance = client.get_usdc_balance()
print(f"USDC Balance: ${balance}")

# Check if you qualify for free access
status = client.check_holder_status()
print(f"Free access: {status['has_free_access']}")

Error Handling

from oracle_sentinel import (
    OracleSentinelClient,
    PaymentRequiredError,
    InsufficientBalanceError,
    OracleSentinelError
)

try:
    signals = client.get_bulk_signals()
except PaymentRequiredError as e:
    print(f"Payment required: {e.amount} USDC atomic units")
except InsufficientBalanceError as e:
    print(f"Need {e.required}, have {e.available}")
except OracleSentinelError as e:
    print(f"API error: {e}")

Token Information

  • Token: $OSAI
  • Mint: HuDBwWRsa4bu8ueaCb7PPgJrqBeZDkcyFqMW5bbXpump
  • Required: 1000+ for free access
  • Buy: Jupiter

Links

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oracle_sentinel-2.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oracle_sentinel-2.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file oracle_sentinel-2.1.0.tar.gz.

File metadata

  • Download URL: oracle_sentinel-2.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for oracle_sentinel-2.1.0.tar.gz
Algorithm Hash digest
SHA256 5b355e52620e51f4e3f64bd876122fa17809635ebe4b315df0f2c908ddb12b2d
MD5 dad0c6e851fd9ad9362372dea9cada6b
BLAKE2b-256 7dd941327560aa349baab0e6d33c802eb88f7508ac770bf36c7ccf264a2450cd

See more details on using hashes here.

File details

Details for the file oracle_sentinel-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oracle_sentinel-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca408658a668437316e1e9df901e2704cd5b36ea6e57ef3d11a65efb5f1b467
MD5 343b686a0476aaf2dbbf47166a3ec71c
BLAKE2b-256 681339294a3a1147f5a7a6e0c185f96e732be56a92e477a72932a6ede741f91e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page