4. Building a Transaction for a Market Order
/**
* @notice Spends to take a list of orders
* @param book_id The id of the book to take from
* @param limit_price The maximum price to take at
* @param base_amount The amount of base asset to spend
* @param min_quote_amount The minimum amount of quote asset to receive
* @param hook_data Additional data to pass to the hook
* @param deadline The deadline for the actions
*/
fn spend(
ref self: TContractState,
book_id: felt252,
limit_price: u256,
base_amount: u256,
min_quote_amount: u256,
hook_data: Span<felt252>,
deadline: u64
);
Similar to getExpectedOutput, if you want to set unlimited slippage, simply set the limitPrice parameter to 0.