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.0.0.tar.gz (8.8 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.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oracle_sentinel-2.0.0.tar.gz
  • Upload date:
  • Size: 8.8 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.0.0.tar.gz
Algorithm Hash digest
SHA256 11cfc486a398ff920b046ea9eedf66b34864813071025269e059a302203bdae4
MD5 a3e9709d49ff3dc2ba5504fb53bcbaa7
BLAKE2b-256 74613c36f0e7bf87343a5c698d2a04c7b24bc9b9828e99ca273bc08e08ce0197

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oracle_sentinel-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 327555884e0835dffc60dcf0246a88c36a1f39193feb0e7038ab9c510d7a88d4
MD5 430e2b6c76a4a01a862b4ca212b1fb9f
BLAKE2b-256 1bef19d1bc0face745feb4404d70fb1cc516154939edfb5f5c8e9b8ae42a04ab

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