> ## Documentation Index
> Fetch the complete documentation index at: https://orderly.network/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# useMutation

> Hook for POST, PUT, and DELETE API requests such as creating or cancelling orders.

### Mutation

**Note: `useQuery`/`usePrivateQuery` can only be used for `GET` requests.**

For `POST`, `PUT` or `DELETE` requests, please use `useMutation`. For example to create a new order:

```tsx theme={null}
import { useMutation } from "@orderly.network/hooks";

const [createOrder, { data, error, isMutating }] = useMutation<OrderEntity, any>("/v1/order");
```
