> ## 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.

# usePrivateQuery

> Hook to fetch data from authenticated private API endpoints.

Use `usePrivateQuery` to access a private API, for example to get the current user info.

* [Tech docs](/sdks/tech-doc/modules/orderly_network_hooks#useprivatequery)

```tsx theme={null}
const { data, isLoading, error } = usePrivateQuery("/v1/client/info");
const { state } = useAccount();

if (isLoading) return <div>loading...</div>;

return (
  <div>
    <div>{state.status}</div>
    <pre>{JSON.stringify(data, null, 2)}</pre>
  </div>
);
```
