Last updated 9 months ago
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.
LimitOrder.getRemainingAmount()
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.
orderHash
string
The hash of the order for which to retrieve the remaining amount.