Implements

Constructors

Properties

apiUrl: string
graphUrl: string

Methods

  • Gets the trade history for a trade account.

    Parameters

    • accountId: number
    • page: number

    Returns Promise<{
        accountId: number;
        accountUser: string;
        createdTimestampUnixMillis: number;
        expiryTimestampUnixMillis: number;
        id: string;
        kind: {
            kind: "market";
        } | {
            args: {
                limitPrice: BigNumber;
            };
            kind: "limit";
        } | {
            args: {
                stopLoss?: null | {
                    kind: "position";
                } | {
                    id: string;
                    kind: "order";
                };
                triggerPrice: BigNumber;
            };
            kind: "stopMarket";
        } | {
            args: {
                limitPrice: BigNumber;
                triggerPrice: BigNumber;
            };
            kind: "stopLimit";
        } | {
            args: {
                takeProfit?: null | {
                    kind: "position";
                } | {
                    id: string;
                    kind: "order";
                };
                triggerPrice: BigNumber;
            };
            kind: "limitTrigger";
        } | {
            kind: string;
        };
        lpId: string;
        nonce: string;
        pair: Pair;
        signature: string;
        size: {
            amount: BigNumber;
            unit: "lpc" | "lot";
        };
        status: {
            content: {
                status: "placed";
            } | {
                content: {
                    timestampUnixMillis: number;
                    triggerPrice: BigNumber;
                };
                status: "triggered";
            };
            status: "open";
        } | {
            content: {
                price: BigNumber;
                settlementStatus: {
                    status: "queued";
                } | {
                    status: "beforeTx";
                } | {
                    status: "indexing";
                } | {
                    content: {
                        txHash: string;
                    };
                    status: "settled";
                };
                timestampUnixMillis: number;
            };
            status: "filled";
        } | {
            content: {
                reason: string;
                timestampUnixMillis: number;
                userCancellation?: null | {
                    address: string;
                    nonce: string;
                    signature: {
                        r: string;
                        s: string;
                        v: number;
                    };
                };
            };
            status: "cancelled";
        };
    }[]>