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

# useConfig

> Hook to read Orderly configuration values like brokerId, networkId, and API URLs.

This hook allows to return various configuration values.

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

Possible keys:

```ts theme={null}
export type ConfigKey =
  | "apiBaseUrl"
  | "klineDataUrl"
  | "privateWsUrl"
  | "publicWsUrl"
  | "operatorUrl"
  | "domain"
  | "brokerId"
  | "networkId"
  | "env"
  | "PROD_URL"
  | "markets";
```

If no key is provided, then the entire `ConfigStore` will be returned.

### Example

```ts theme={null}
// get specific config
const networkId = useConfig("networkId");

useEffect(() => {
  if (networkId === "testnet") {
    // do something
  }
}, [networkId]);
```
