Portfolio Subscription
Subscribe to portfolio update notifications for a specific user address.
Subscribe Request
{
"id": 4,
"method": "SUBSCRIBE",
"params": {
"chainId": 143,
"userAddress": "0xafdf17420b93db5b5badfd74cb503da099d18071",
"type": "portfolio"
}
}Unsubscribe Request
{
"id": 4,
"method": "UNSUBSCRIBE",
"params": {
"chainId": 143,
"userAddress": "0xafdf17420b93db5b5badfd74cb503da099d18071",
"type": "portfolio"
}
}Parameter Description
chainId(required): Chain IDuserAddress(required): User address (lowercase)type(required): Must be"portfolio"
Data Stream Message
Portfolio Update Description
This message is pushed when a user's orders, range orders, positions, or gates change
The
typefield indicates the change type:order: Order changerange: Range order changeposition: Position changegate: Gate change
After receiving this message, clients should call the corresponding REST API to fetch the latest portfolio details
Important Notes
This subscription only sends notifications when changes occur
You must call the REST API endpoints to retrieve the actual updated data
The notification includes the
instrumentandexpiryto help identify which instrument was affected
Last updated