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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phoenix-trade-0.1.7.tar.gz
  • Upload date:
  • Size: 30.3 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.7.tar.gz
Algorithm Hash digest
SHA256 416b4889bd486600ed103524f45f08534e03aa8a9d066834526ef4c9379d4590
MD5 0f745fb789206b0dbc9771ddc2151b84
BLAKE2b-256 68f2b9c0155676e1ad31e4bb0a65ee25e60c5f565957eed66e0e7abd515396af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phoenix_trade-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 55.2 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ad907d77b1bbdfbbc228456d2c5f97f2ab83958b3da241470263d0c5300c238f
MD5 d875395a218d9b93b59ec0dde4dcd8b2
BLAKE2b-256 3e2829f19aa1041678a835124596b5d179e1eec8a234b69344fd6113514325df

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