{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab","code-snippet"]},"type":"markdown"},"seo":{"title":"Rebalancing API Webhooks","description":"Welcome to the Upvest API documentation. Here you will find all the information you need to integrate with our API.","siteUrl":"https://docs.upvest.co","image":"/assets/upvest-logo-card.ee25ccc59849324b0b73151a5c972c87639419556344db0b6dcf518151cb4c3c.925ff8b2.png","keywords":"documentation, api","lang":"en-US","meta":[{"name":"description","content":"Welcome to the Upvest API documentation. Here you will find all the information you need to integrate with our API."},{"name":"image","content":"/assets/upvest-logo-card.ee25ccc59849324b0b73151a5c972c87639419556344db0b6dcf518151cb4c3c.925ff8b2.png"},{"name":"twitter:card","content":"summary_large_image"},{"name":"twitter:title","content":"Welcome to the Upvest API Documentation"},{"name":"twitter:image","content":"/assets/upvest-logo-card.ee25ccc59849324b0b73151a5c972c87639419556344db0b6dcf518151cb4c3c.925ff8b2.png"},{"name":"twitter:description","content":"Welcome to the Upvest API documentation. Here you will find all the information you need to integrate with our API."},{"name":"og:url","content":"https://docs.upvest.co/"},{"name":"og:title","content":"Welcome to the Upvest API Documentation"},{"name":"og:description","content":"Welcome to the Upvest API documentation. Here you will find all the information you need to integrate with our API."},{"name":"og:image","content":"/assets/upvest-logo-card.ee25ccc59849324b0b73151a5c972c87639419556344db0b6dcf518151cb4c3c.925ff8b2.png"}]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rebalancing-api-webhooks","__idx":0},"children":["Rebalancing API Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks are a mechanism for your software to automatically receive information about rebalancing execution events. By leveraging webhooks, you remove the need to poll the API for rebalancing state changes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For general information about webhooks, refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/byol/getting_started/implementing_webhooks"},"children":["Implementing webhooks"]}," guide."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clients can subscribe to webhooks to track rebalancing execution orders as they are placed, executed, and settled by the market."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When rebalancing is triggered, orders are generated and executed. Each execution order generates webhook events reflecting its lifecycle:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rebalancing-execution-order-events","__idx":1},"children":["Rebalancing execution order events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a portfolio rebalancing is triggered, the system generates individual execution orders for each security adjustment. These orders transition through states as they are processed:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event Type"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Event Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When Triggered"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["When Triggered"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.NEW"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A rebalancing order has been created and submitted to the market."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When rebalancing starts and orders are generated."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.PROCESSING"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The rebalancing order is being processed by the market."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["After initial acceptance at the venue."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.FILLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The rebalancing order has been fully executed."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When all quantities match at the venue."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.CANCELLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The rebalancing order has been cancelled."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When cancellation is confirmed."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"rebalancing-execution-order-webhook-example","__idx":2},"children":["Rebalancing execution order webhook example"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"REBALANCING_EXECUTION_ORDER.NEW","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_partials/schemas/portfolios/event_portfolio_rebalancing_execution_orders.v1.example.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n  \"id\": \"54b8d84f-5bd0-4e43-bf0f-164388cb4c23\",\n  \"created_at\": \"2021-07-21T14:10:00.00Z\",\n  \"type\": \"REBALANCING_EXECUTION_ORDER.NEW\",\n  \"object\": {\n    \"id\": \"eb5ba93f-5dfe-4bf1-8571-4da0caacc80c\",\n    \"execution_id\": \"760abce7-e6b5-440b-bdf3-88e35ed6417a\",\n    \"created_at\": \"2021-07-21T14:10:00.000Z\",\n    \"updated_at\": \"2021-07-21T14:10:00.000Z\",\n    \"account_id\": \"debf2026-f2da-4ff0-bb84-92e45babb1e3\",\n    \"portfolio_order_id\": \"4f2f5db9-ef4e-4dbf-80a1-bffc71985d6c\",\n    \"status\": \"PROCESSING\"\n  },\n  \"webhook_id\": \"cd2e4183-4e62-4e0f-981b-44b594d14610\"\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"REBALANCING_EXECUTION_ORDER.PROCESSING","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Order is being processed by the market. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," field in the object will be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROCESSING"]},"."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"REBALANCING_EXECUTION_ORDER.FILLED","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Order execution is complete. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," field in the object will be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FILLED"]},"."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"REBALANCING_EXECUTION_ORDER.CANCELLED","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Order has been cancelled. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," field in the object will be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CANCELLED"]},"."]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-execution-events","__idx":3},"children":["Related execution events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to rebalancing execution order events, you will also receive standard ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["order execution events"]}," for each rebalancing trade. These are the same execution events as regular orders:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event Type"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Event Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXECUTION.FILLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A rebalancing trade fill has occurred (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/byol/guides/orders/orders_webhooks"},"children":["Orders webhooks"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXECUTION.SETTLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A rebalancing trade settlement is confirmed (typically T+2)."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Monitor both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.*"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXECUTION.*"]}," events to fully track rebalancing progress."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"recommended-workflow","__idx":4},"children":["Recommended workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To implement rebalancing tracking with webhooks:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Trigger rebalancing"]}," — Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /portfolios/rebalancings/executions"]}," to start"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Subscribe to rebalancing events"]}," — Listen for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REBALANCING_EXECUTION_ORDER.*"]}," events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Track execution orders"]}," — Update your system when each order's state changes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Monitor underlying fills"]}," — Also listen for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXECUTION.FILLED"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXECUTION.SETTLED"]}," events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Determine completion"]}," — Rebalancing is complete when all execution orders are either ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FILLED"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CANCELLED"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/byol/getting_started/implementing_webhooks"},"children":["implementing webhooks"]}," for setup instructions."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"Rebalancing API Webhooks","id":"rebalancing-api-webhooks","depth":1},{"value":"Rebalancing execution order events","id":"rebalancing-execution-order-events","depth":2},{"value":"Rebalancing execution order webhook example","id":"rebalancing-execution-order-webhook-example","depth":3},{"value":"Related execution events","id":"related-execution-events","depth":2},{"value":"Recommended workflow","id":"recommended-workflow","depth":2}],"frontmatter":{"seo":{"title":"Rebalancing API Webhooks"}},"lastModified":"2026-07-16T03:58:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/byol/guides/portfolios/rebalancing/rebalancing_webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}