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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phoenix-trade-0.1.2.tar.gz
  • Upload date:
  • Size: 29.2 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.2.tar.gz
Algorithm Hash digest
SHA256 3d967f51c5c2e1d4b75ee6ff7f75a52a9c53e8b1ac0e33f412ca7d1b4ed32663
MD5 258a57ea7ca46fcf4d5bba9cd9dead05
BLAKE2b-256 a553882188a24dd17d083b98885001ce5f7dd0fb850a9978c1d9ca605f13ec89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phoenix_trade-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 54.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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d33dae6332b7f56e0c399d0246c28cd112cf3df55c6f57e55e240ba92f66b11c
MD5 fb977d4038ea5f8d198554876fdb5a88
BLAKE2b-256 db93c578b5b7104c50e8a34bd2502c76d03f6674c1ca062743c3177b31185a0e

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