Skip to main content

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.

Quickstart

The core idea is to create an instance of the exchange you want to use. Let's use Synthetix V2 on the Optimism network (chain ID 10) as an example.

import os
from scxt.exchanges import SynthetixV2
from dotenv import load_dotenv

# Load environment variables (optional, for API keys etc.)
load_dotenv()

# Configuration for Synthetix V2
config = {
    "chain_id": 10,  # Optimism Mainnet
    "private_key": os.getenv("PRIVATE_KEY"), # Your wallet's private key
    "rpc_url": os.getenv("CHAIN_10_RPC") # An Optimism RPC endpoint
}

# Create the exchange instance
exchange = SynthetixV2(config)

# Fetch markets
markets = exchange.fetch_markets()
print("Markets:", markets)

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

  • Synthetix V2
  • Odos

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.

Metadata

Release files for scxt 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scxt 0.1.5
File Size Uploaded
scxt-0.1.5.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scxt 0.1.5
File Interpreter ABI Platform
scxt-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 75.4 kB

Release files / scxt-0.1.5.tar.gz

Download URL scxt-0.1.5.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dfd15b9f2c091b284163f76847e8a6b24ffbb907175f33be1d358c23ef46693c
BLAKE2b-256 checksum
How to use checksums
aec23211db98528544743372037ed91a81d1269329c0271c4f3fbb4e41503945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / scxt-0.1.5-py3-none-any.whl

Download URL scxt-0.1.5-py3-none-any.whl
Size 41.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b70c5a19a2a88732489da28fbc797452b05b3dcdc36c3c687d722f9ec7795658
BLAKE2b-256 checksum
How to use checksums
906a83029bd0b5831efcc1ac7cbbd018e27c7a07eb2f1371dd2fba50fcbd9d87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page