Remaining Amount

This function retrieves the remaining amount for a specific order using the Limit Order SDK. It queries the remaining amount using the LimitOrder.getRemainingAmount() method.

Example:

Parameters:

NameTypeDescription

orderHash

string

The hash of the order for which to retrieve the remaining amount.

import { LimitOrder } from "../../src/";

async function getRemainingAmount(order_hash: string): Promise<string>{
    const RPC_URL = "RPC_URL";
    const limitOrder = new LimitOrder(RPC_URL);
    
    const remainingAmount: string = await limitOrder.getRemainingAmount(order_hash);
    
    return remainingAmount;
}

getRemainingAmount("order_hash");

Response:

string.

Last updated