Docs
Hooks
Overview

Hooks

@orderly.network/hooks

The hooks libraries provides a series of React hooks for React developers to ensure a seamless integration experience through the Orderly SDK. This library is a package built on top of @orderly.network/core and @orderly.network/perp.

Coding standards

  • If hooks returns an array, then the first elemnet will be the actual data, and the second element will be an object containing some supporting functions.
  • All hooks ending with stream will update in real-time, via relevant websocket subscriptions.
  • All hooks ending with query is a wrapper on API requests.

List of hooks

Base & Common

Provides basic hooks to help handle UI states, and some common state management logic.

Orderly API

Provides a list of hooks related to Orderly's business logic. Each hooks contains usage of the Orderly API and related data calculation logic.

For more details please see API docs