Setup
You can use @orderly.network/hooks
in two simple steps!
Installation
Inside your React project directory, run the following to install the SDK. You will also very likely need our Types SDK:
Add OrderlyConfigProvider
Add the OrderlyConfigProvider
component to your project, wrapping the root components.
We recommend that you use the default config in the newly created project, and provide your own brokerId
(Please get in touch with the Orderly team to get your own unique brokerId
)
Setup complete!
You can now use all the provided hooks within @orderly.network/hooks
!
Environments
The networkId
property within OrderlyConfigProvider
can be set to mainnet
or testnet
. The default is mainnet
. It is not possible to change the network during runtime. If you want to do so anyway, you need to reload the page.