Skip to content

andtan91/drift-py

 
 

Repository files navigation

Drift-py

A python software developer kit for interacting with the Drift Protocol. The package can also be used for research purposes to simulate transactions and events on the protocol, battle-testing it in unique scenarios.

Setup

pip install -r requirements

General Usage

Instantiating a Client

from os import environ
from sdk.client.sync import DriftClient

# instantiate a client with a private key for your Solana wallet
drift_client = DriftClient.create(
    private_key=environ['SOLANA_WALLET_PRIVATE_KEY'], 
    endpoint='https://api.mainnet-beta.solana.com'
)

Reading Protocol Data

market = drift_client.call_market(,
print(market)

About

drift protocol python sdk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.4%
  • Jupyter Notebook 9.6%