Skip to main content

Superchain exchange trading library

Project description

SCXT

SCXT is a Python library providing a unified interface for interacting with exchanges across the Optimism Superchain

Overview

SCXT abstracts away the complexities of interacting with protocols by providing a consistent API across all supported exchanges. This makes it easier for developers to build trading tools, bots, and analytics platforms that work across multiple protocols and chains.

Installation

# uv
uv add scxt

# pip
pip install scxt

Quick Start

import scxt

# Initialize the exchange
exchange = scxt.exchange({
    'rpc_url': 'https://mainnet.optimism.io',
    'private_key': 'your_private_key',  # Optional, for trading
})

# Fetch available markets
markets = exchange.fetch_markets()
print(markets)

# Fetch account balances (requires private key)
balances = exchange.fetch_balance()
print(balances)

# Create a market order (requires private key)
order = exchange.create_order(
    symbol='ETH',
    type='market',
    side='buy',
    amount=0.1,
)
print(order)

Features

  • Unified API between protocols and exchanges
  • Market data retrieval (available markets, prices, order books)
  • Account information and balances
  • Consistent error handling and data formats

Supported Exchanges

(coming soon)

Documentation

For detailed documentation, examples, and API references, visit the documentation site (coming soon).

Acknowledgments

  • This project is supported by an Optimism Builders Grant
  • Inspired by the CCXT library for centralized exchanges

Status

SCXT is currently in early development. The API is subject to change as the project evolves.

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

scxt-0.1.2.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

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

scxt-0.1.2-py3-none-any.whl (41.0 kB view details)

Uploaded Python 3

File details

Details for the file scxt-0.1.2.tar.gz.

File metadata

  • Download URL: scxt-0.1.2.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for scxt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9c9ff5f117c84d7f81fae0a0da057da9255f9dc7c8194744ad08aa9ecf5e14f4
MD5 ba2df432db0f0d917704f5c82b3a3ca1
BLAKE2b-256 8c0006dc23772b38ea183d66a6ef1d47558a21178e94ecf095224c3b8a5af8ff

See more details on using hashes here.

File details

Details for the file scxt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: scxt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 41.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for scxt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a406a62062084ed3753952c4068ad0f00da63cdb7d95ac7213eb406541d0f03
MD5 ee5aba539e4c6e931424c30c1d7ca8c2
BLAKE2b-256 e071c654586da11dbd3406955bb149997384ab860d125bff31d48cb2a453d59d

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