Skip to content

SDK drift: SuiBets exposes walletAddress constructor param in TypeScript but not in Python #967

@realfishsam

Description

@realfishsam

Drift

The TypeScript SuiBets exchange class accepts a walletAddress constructor option and injects it into the credentials sent to the sidecar. The Python SuiBets class does not accept a wallet_address parameter, so Python callers have no way to authenticate wallet-based operations on SuiBets.

TypeScript SDK

File: sdks/typescript/pmxt/client.ts lines 2827–2875 (approximately)

export interface SuiBetsOptions extends ExchangeOptions {
    walletAddress?: string;
}

export class SuiBets extends Exchange {
    private readonly _walletAddress?: string;

    constructor(options: SuiBetsOptions = {}) {
        super("suibets", options);
        this._walletAddress = options.walletAddress;
    }

    protected override getCredentials(): ExchangeCredentials | undefined {
        const base = super.getCredentials();
        if (!this._walletAddress) return base;
        return { ...(base ?? {}), walletAddress: this._walletAddress };
    }
}

Python SDK

File: sdks/python/pmxt/_exchanges.py lines 473–495 (approximately)

class SuiBets(Exchange):
    def __init__(
        self,
        base_url: Optional[str] = None,
        auto_start_server: Optional[bool] = None,
        pmxt_api_key: Optional[str] = None,
    ) -> None:
        super().__init__(
            "suibets",
            base_url=base_url,
            auto_start_server=auto_start_server,
            pmxt_api_key=pmxt_api_key,
        )

No wallet_address parameter; no credential injection.

Expected

Python SuiBets.__init__ should accept a wallet_address: Optional[str] = None parameter and pass it through to the sidecar as a credential, matching the TypeScript implementation.

Impact

Python callers cannot supply their wallet address when constructing a SuiBets instance. Authenticated SuiBets operations (order submission, position fetching, balance queries) will fail or silently omit the wallet credential in Python.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions