Fill Order

This function fills an order with a specified amount using the Limit Order SDK.

Example:

import { uint256 } from "starknet";
import { LimitOrder, fillOrderResponse } from "../../src";

async function fillOrder(
    order_hash: string,
    fill_amount?: string
  ): Promise<fillOrderResponse> {
    const limitOrder = new LimitOrder()
    
    const response: fillOrderResponse = await limitOrder.fillOrder(order_hash, fill_amount);
    
    return response;
}
const fill_amount = uint256.bnToUint256(1000000000000000000);
fillOrder("order_hash", fill_amount.toString());

Parameters:

Response:

Last updated