Skip to content

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

@wkshare

Description

@wkshare

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions