Skip to main content

Function: useOrders()

useOrders(params?: {address: string;memo: string;profile: string;query: {};state: OrderState;txHash: string; }): UseQueryResult<OrdersResponse, Error>

Parameters

ParameterTypeDescription
params?objectNo required parameters.
params.address?stringFilter based on the blockchain address associated with the order.
params.memo?stringFilter by the payment memo/reference..
params.profile?stringFilter based on the profile ID associated with the order.
params.query?QueryOptions<OrdersResponse>See Tanstack Query - useQuery options.
params.state?OrderStateFilter based on the state of the order.
params.txHash?stringFilter based on the blockchain transaction hash.

Returns

UseQueryResult<OrdersResponse, Error>

Example

const {
data,
isLoading,
isError,
error,
refetch,
...moreUseQueryResults
} = useOrders();

See

API Documentation

Defined in

sdk-react-provider/src/lib/hooks.tsx:601