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
Release history Release notifications | RSS feed
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.6.tar.gz
(30.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phoenix-trade-0.1.6.tar.gz.
File metadata
- Download URL: phoenix-trade-0.1.6.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c75b0052288baaba7c1c5511724cd6dbc585dfcd1a64518b9c2da0a2ef8145c7
|
|
| MD5 |
98067761b38b8deb91c37f14f8ee130d
|
|
| BLAKE2b-256 |
fee9531dba1f1f9caa1837f12f03a84a00bdcca3d2b4fb55775880393e14dad6
|
File details
Details for the file phoenix_trade-0.1.6-py3-none-any.whl.
File metadata
- Download URL: phoenix_trade-0.1.6-py3-none-any.whl
- Upload date:
- Size: 55.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edaf5b5dc8a965971124e2c73ace0b5d2b5675ef810dd205e6a71a7da140ecf0
|
|
| MD5 |
86e8d5acbca2a7e7b598489955ba9e72
|
|
| BLAKE2b-256 |
92aeb23d8833d5d57f0353c4d6b60765ea47d7df67fb396f37cc62a000ba4dad
|