Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program log: Could not find perp market 0 at programs/drift/src/math/margin.rs:451 #199

Open
wkshare opened this issue Aug 8, 2024 · 0 comments

Comments

@wkshare
Copy link

wkshare commented Aug 8, 2024

What is happend.

My Code:

perp_markets = list(range(0, 35))
spot_markets = list(range(1, 24))
spot_market_oracle_infos, perp_market_oracle_infos, spot_market_indexes = (
    get_markets_and_oracles(perp_markets=perp_markets)
)
oracle_infos = spot_market_oracle_infos + perp_market_oracle_infos
spot_market_indexes = spot_markets
drift_client = DriftClient(
    connection=connection,
    wallet=wallet,
    env="mainnet",  # or "devnet"
    perp_market_indexes=perp_markets,
    spot_market_indexes=spot_market_indexes,
    oracle_infos=oracle_infos,
    tx_params=TxParams(None, PFEE),
    account_subscription=AccountSubscriptionConfig("cached"),
    active_sub_account_id=USER_ID,
)

How to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant