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.0.2.tar.gz (26.5 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.0.2-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phoenix-trade-0.0.2.tar.gz
  • Upload date:
  • Size: 26.5 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.0.2.tar.gz
Algorithm Hash digest
SHA256 2c2a4a2eb2180202801e7600be4f0983612a8536e95fb57623cfcbbd0d02d6d7
MD5 73f8fd4f345342f161b90027da29b56f
BLAKE2b-256 b8ccabe07e8b114fa299f21eacc7491bf875b225a2b1f6ee123fec1b936259f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phoenix_trade-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 51.1 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45501b630ed649daf84bc18c3b6711dab446a6c1711718bf0949c4eda366647a
MD5 f0829630fdd04039965b7b868f579400
BLAKE2b-256 32b934fa7fc8286b289c18c0c291fe0ceeca23e035d17413c0025a06be63bd79

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