Account
useSettleSubscription
Software Development Kits
[EVM] React Components SDK
- Overview
- Getting started
- Configuration
- Theming
- Wallet connect
- Framework Guides
- Page Components
- Block Components
[EVM] React Hooks SDK
[EVM] Core SDK
[EVM] Perp SDK
Account
useSettleSubscription
Subscribe to PnL settlements for current account via Websockets.
Example
useSettleSubscription({
onMessage: (data: any) => {
const { status } = data;
switch (status) {
case "COMPLETED":
// settlement completed
break;
case "FAILED":
// settlement failed
break;
default:
break;
}
}
});
On this page