Skip to main content

A Python library for interacting with Phoenix, a limit order book spot exchange on the Solana blockchain.

Project description

phoenixpy

Installation

pip install phoenix-trade

Usage

Here is an example of how to get the L2 book for the SOL/USDC market.

from phoenix.market import Market
from phoenix.client import PhoenixClient
import asyncio
from solders.pubkey import Pubkey


async def main():
    client = PhoenixClient()
    solusdc_market_pubkey = Pubkey.from_string(
        "4DoNfFBfF7UokCC2FQzriy7yHK6DY6NVdYpuekQ5pRgg"
    )
    print(await client.get_l2_book(solusdc_market_pubkey))
    await client.close()


asyncio.run(main())

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

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

phoenix-trade-0.1.9.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

phoenix_trade-0.1.9-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

Details for the file phoenix-trade-0.1.9.tar.gz.

File metadata

  • Download URL: phoenix-trade-0.1.9.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for phoenix-trade-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e0579c5eebfff731b1bfb5e079f0c6d438b3bee9e5fa1f5096c20a233dae848c
MD5 15986f66adb2df7f11525f11b6a1e1ff
BLAKE2b-256 ed6df90ea106c3e7c758ecab80805cc19237d998a3d7920f334d9601f8e7b4c0

See more details on using hashes here.

File details

Details for the file phoenix_trade-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: phoenix_trade-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 55.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for phoenix_trade-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5a0ea588bc4191530f1001a3e7999a1a153c34a85bb8316eb5d3db43349a5e94
MD5 a18f480d4aee1d827c29f490af8549ab
BLAKE2b-256 3fe45ba4984c98467cb08173c74a4ec52c0c52bec4c9cb6cf81e99e352033ed2

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