---
updatedAt: 2026-09-01T01:26:28.000Z
agentTools:
  projectIndex: https://apidocs.bct.host/llms.txt
---

# Subscribe to balance and positon snapshot

Subscribe the authenticated user to the PI balance snapshot service. If already subscribed, returns the existing subscription info. Subscription may be disabled or suspended by an administrator.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Balance and Position Snapshot",
    "description": "PI Balance Snapshot API service providing subscription management and daily historical account group balance snapshot queries.",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://trade-hk.osl.com"
    }
  ],
  "paths": {
    "/api/3/accountGroup/piBalanceSnapshot/subscribe": {
      "post": {
        "summary": "Subscribe to balance and positon snapshot",
        "description": "Subscribe the authenticated user to the PI balance snapshot service. If already subscribed, returns the existing subscription info. Subscription may be disabled or suspended by an administrator.",
        "operationId": "piBalanceSnapshotSubscribe",
        "tags": [
          "PiBalanceSnapshot"
        ],
        "security": [
          {
            "apiKeyAuth": [],
            "hmacSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription successful or already subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeResponse"
                },
                "examples": {
                  "newSubscription": {
                    "summary": "New subscription created",
                    "value": {
                      "action": "subscribed",
                      "userUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "subscribeDate": "2026-08-25T10:30:00.000Z",
                      "status": "active",
                      "isNewRecord": true
                    }
                  },
                  "alreadySubscribed": {
                    "summary": "Already subscribed",
                    "value": {
                      "action": "already_subscribed",
                      "userUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "subscribeDate": "2026-08-20T08:00:00.000Z",
                      "status": "active",
                      "isNewRecord": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Subscription disabled or suspended by administrator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "disabled": {
                    "summary": "Subscription disabled by admin",
                    "value": {
                      "error": {
                        "name": "BadRequest",
                        "message": "Subscription has been disabled by administrator"
                      }
                    }
                  },
                  "suspended": {
                    "summary": "Subscription suspended by admin",
                    "value": {
                      "error": {
                        "name": "BadRequest",
                        "message": "Subscription has been suspended by administrator"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Rest-Key",
        "description": "API Key"
      },
      "hmacSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "Rest-Sign",
        "description": "HMAC signature"
      }
    },
    "schemas": {
      "SubscribeResponse": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "subscribed",
              "already_subscribed"
            ],
            "description": "Action performed. 'subscribed' for new subscription, 'already_subscribed' if subscription already exists"
          },
          "userUuid": {
            "type": "string",
            "format": "uuid",
            "description": "User UUID"
          },
          "subscribeDate": {
            "type": "string",
            "format": "date-time",
            "description": "Subscription date"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled",
              "suspended"
            ],
            "description": "Current subscription status"
          },
          "isNewRecord": {
            "type": "boolean",
            "description": "Whether a new subscription record was created"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Error name"
              },
              "message": {
                "type": "string",
                "description": "Error description"
              }
            }
          }
        }
      }
    }
  }
}
```