External-facing reference for Multi Trade Block (MTB) REST endpoints in the Orion Connect (OAS) Web API v1. Use these endpoints to create, read, update, and delete trade block details on registrations and accounts, and to manage trade block reasons.
Overview
When the firm entity option Multi Trade Block Feature is enabled, trade blocks are stored as Trade Block Detail records in OASDB. Each detail has its own reason (Type), description, and optional start/end dates. Multiple blocks can be active on the same registration or account at once.
When MTB is disabled, legacy account and registration boolean fields (IsTradingBlocked, registration DoNotTrade) are updated directly instead of creating detail records.
A database trigger keeps the legacy registration/account do-not-trade fields in sync with active detail records.
Entity type codes (entityEnum)
| Entity | Value |
|---|---|
| Registration | 6 |
| Account | 7 |
Only Registration and Account are supported. Registration-level blocks are only accepted for sleeved registrations.
Eclipse mapping: OC uses entityEnum / entityId. Eclipse API v2 uses relatedType / relatedTypeId with different numeric codes (Portfolio = 16, Account = 32). Cross-system sync uses globalId as the stable identifier.
System trade block reasons
| Name | Usage |
|---|---|
Manual | User-applied blocks; used by legacy account update paths when MTB is enabled. |
OCI | Orion Connect Import; system-managed. Not removed by programmatic “delete all deletable” helpers. |
TOM Only | OC-only reason; sync events to Eclipse are not published for this reason. |
Fixed Income | System-maintained; applied by internal FI workflow. |
Call GET /api/v1/Trading/TradeBlocks/Reasons to retrieve reason IDs and metadata for your firm.
Authentication and authorization
All endpoints require a valid Orion Connect API token. Trade block detail endpoints require the Portfolio/Client/Account privilege:
| Operation | Access type |
|---|---|
| GET (list, read, reasons, related entities) | Read |
| POST / PUT / DELETE (create, update, delete, queue) | Edit |
Trade block reason update/delete endpoints are restricted to Orion Admin or the Eclipse service account (used for cross-system reason sync).
Trade Block Details API
Base path: /api/v1/Trading/TradeBlocks
Data model: TradeBlockDetailDto
| Field | Type | Description |
|---|---|---|
id | integer | Detail ID (0 on create) |
entityEnum | integer | 6 (Registration) or 7 (Account) |
entityId | integer | OC ID of the registration or account |
tradeBlockReasonId | integer | ID of the trade block reason |
description | string | Free-text description (required on create) |
startDate | date | Block start date (required on create; date-only format) |
endDate | date | null | Optional end date; must be > startDate |
isDeleted | boolean | Soft-delete flag |
isDisabled | boolean | true when block is outside active date range (if start/end date entity option enabled) |
globalId | GUID | null | Stable cross-system identifier; auto-generated on create if omitted |
entityName | string | Display name of the related entity (response only) |
tradeBlockReason | object | null | Optional nested reason |
errorMessage | string | null | Populated on failed items in batch responses |
createdBy, createdDate, editedBy, editedDate | audit | Audit fields (response) |
Batch response: TradeBlockResultDto
Create and update operations return a result object:
{ "successfulTradeBlocks": [ /* TradeBlockDetailDto[] */ ], "failedTradeBlocks": [ /* TradeBlockDetailDto[] with errorMessage */ ] }
1. Get trade block detail by ID
GET /api/v1/Trading/TradeBlocks/{tradeBlockId}
Response: 200 OK — single detail object, or 404 Not Found.
2. List trade block details for an entity
Returns trade block details for the given entity and related entities (e.g., a registration query also returns blocks on its accounts; an account query includes its registration’s blocks).
GET /api/v1/Trading/TradeBlocks?entityEnum={entityEnum}&entityId={entityId}
| Parameter | Required | Description |
|---|---|---|
entityEnum | Yes | 6 or 7 |
entityId | Yes | Registration or account ID |
Response: 200 OK — array of TradeBlockDetailDto objects. Returns 404 for unsupported entity types.
3. Create trade block details (batch)
POST /api/v1/Trading/TradeBlocks?createSyncEvent={bool}
Request body: array of TradeBlockDetailDto objects.
[ { "entityEnum": 7, "entityId": 12345, "tradeBlockReasonId": 3, "description": "Client requested trading halt", "startDate": "2026-07-17", "endDate": "2026-12-31" } ]
Query parameter: createSyncEvent (default true) — when true, publishes sync events to Eclipse (except for TOM Only reasons).
Validation rules (create):
idmust be0entityEnummust be6or7entityId> 0 and entity must existstartDatemust be set (not0001-01-01)- If
endDateis provided, it must be afterstartDate descriptionis requiredtradeBlockReasonIdmust reference a valid reason (or nestedtradeBlockReasonwhen custom types flag is enabled)- Registration blocks are silently dropped if the registration is not sleeved
Response:
200 OK— all succeeded (TradeBlockResultDto)207 Multi-Status— partial success400 Bad Request— all failed
4. Update trade block details (batch)
PUT /api/v1/Trading/TradeBlocks?createSyncEvent={bool}
Request body: array of TradeBlockDetailDto objects. Records are matched by globalId.
Mutable fields: description, startDate, endDate only.
entityEnum, entityId, tradeBlockReasonId, and globalId cannot be changed after creation. Attempting to change them adds an error to the item in failedTradeBlocks.
Response: same partial-success pattern as create (200, 207, or 400).
5. Delete trade block detail (single)
Soft-deletes the detail (isDeleted = true).
DELETE /api/v1/Trading/TradeBlocks/{tradeBlockId}?createSyncEvent={bool}
Response: 200 OK
6. Delete trade block details by ID (batch)
POST /api/v1/Trading/TradeBlocks/DeleteRequests?createSyncEvent={bool}
Request body: array of integer detail IDs.
[42, 43, 44]
Response: 200 OK
7. Delete trade block details by GlobalId (batch)
POST /api/v1/Trading/TradeBlocks/DeleteByGlobalIds?createSyncEvent={bool}
Request body: array of GUIDs.
Preferred for cross-system integrations that track blocks by globalId.
Response: 200 OK
8. Get related entities
Returns the primary entity and related entities for assigning blocks at different levels (e.g., a sleeved registration and its accounts).
GET /api/v1/Trading/TradeBlocks/Related?entityEnum={entityEnum}&entityId={entityId}
Response: 200 OK
[ { "id": 500, "entityType": 6, "name": "Smith Family Trust" }, { "id": 12345, "entityType": 7, "name": "12345678" } ]
9. Queue sync events for accounts
Re-publishes Eclipse sync events for the provided account IDs that have active trade block details. Used after import/discovery when Eclipse accounts are created after blocks were placed in OC.
POST /api/v1/Trading/TradeBlocks/QueueForAccountIds
Request body: array of account IDs.
[12345, 12346, 12347]
Response: 200 OK, or 400 Bad Request if no account IDs provided.
Trade Block Reasons API
List reasons (full)
GET /api/v1/Trading/TradeBlocks/Reasons
Returns all trade block reasons with metadata (globalId, isSystemMaintained, allowDetailAssignment, eclipseFirmId).
List reasons (simple)
GET /api/v1/Trading/TradeBlocks/Reasons/Simple
Returns { id, name } pairs for OAS.Search dropdowns.
Update reason
PUT /api/v1/Trading/TradeBlockReasons
Authorization: Orion Admin or Eclipse service account only. System-maintained reasons cannot be updated.
Delete reason
DELETE /api/v1/Trading/TradeBlockReasons/{tradeBlockReasonGlobalId}
Authorization: Orion Admin or Eclipse service account only. Existing details using the deleted reason are reassigned to Manual. Returns 404 if not found.
Legacy-compatible account endpoints
These endpoints remain available and route to MTB detail records when the Multi Trade Block entity option is enabled.
Update account (includes trading blocked)
PUT /api/v1/Portfolio/Accounts/{accountId}
When MTB is enabled and isTradingBlocked changes: creates or removes a Manual trade block detail on the account.
Update do-not-trade by list
PUT /api/v1/Portfolio/Accounts/action/updateDoNotTrade
[ { "id": 12345, "modelingInfo": { "isTradingBlocked": true } } ]
When MTB is enabled: creates or removes Manual details (all deletable blocks removed when setting to false, except OCI).
Update do-not-trade and SMA (Eclipse integration)
PUT /api/v1/Portfolio/Accounts/UpdateDoNotTradeAndSma/{accountId}
Used by Eclipse integration to update account trading blocked and SMA settings.
New Portfolio account update
PUT /api/v1/Portfolio/Accounts/NewPortfolio/{accountId}
When MTB is enabled, changing isTradingBlocked creates or removes Manual trade block details.
Custom Import (non-REST)
Bulk trade block operations are also available via Orion Connect Custom Import templates (requires Trade Block Add/Update/Delete privileges):
- Trade Block Add — create details in bulk
- Trade Block Update — update existing details
- Trade Block Delete — soft-delete by detail ID
Common workflows
Apply a custom trade block to an account
GET /api/v1/Trading/TradeBlocks/Reasons— findtradeBlockReasonIdPOST /api/v1/Trading/TradeBlocks— create the blockGET /api/v1/Trading/TradeBlocks?entityEnum=7&entityId={accountId}— verify
Re-sync blocks to Eclipse after account import
- Confirm Eclipse post-import discovery flag is enabled (see configuration reference).
POST /api/v1/Trading/TradeBlocks/QueueForAccountIdswith the new account IDs.
Toggle simple on/off block (backward compatible)
PUT /api/v1/Portfolio/Accounts/action/updateDoNotTrade with "isTradingBlocked": true or false.
Error responses
| Status | Meaning |
|---|---|
200 OK | Success (all items in batch succeeded for create/update) |
207 Multi-Status | Partial batch success — check successfulTradeBlocks and failedTradeBlocks |
400 Bad Request | Validation failure or all batch items failed |
401 Unauthorized | Missing or invalid credentials |
403 Forbidden | Insufficient privilege |
404 Not Found | Detail, entity, or reason not found |
500 Internal Server Error | Unexpected server error |
Eclipse synchronization
When createSyncEvent=true (the default), create, update, and delete operations publish sync events via a stored procedure. Each trade block detail has a globalId used as the stable cross-system identifier.
Sync events are not published for:
TOM Onlyreason blocks- Operations with
createSyncEvent=false
OC vs Eclipse API quick reference
| Concept | Orion Connect | Eclipse |
|---|---|---|
| API version / base | /api/v1/Trading/TradeBlocks | /api/v2/TradeBlockDetails |
| Entity type field | entityEnum | relatedType |
| Entity ID field | entityId | relatedTypeId |
| Account entity code | 7 | 32 |
| Registration / Portfolio | Registration 6 | Portfolio 16 |
| Batch create | POST /TradeBlocks (array body) | POST /TradeBlockDetails/AddList |
| Update key | globalId | id |
| Partial success | 207 + TradeBlockResultDto | Per-endpoint behavior |
| Re-queue sync | POST .../QueueForAccountIds | — |
Notes for integrators
- Send dates in date-only format (
YYYY-MM-DD). - Prefer batch POST/PUT with multiple items in a single request for bulk operations.
- Use
globalIdfor updates and cross-system correlation; use numericidfor OC-only delete-by-ID paths. - Set
createSyncEvent=falseonly when performing multi-step operations where a single sync at the end is preferred. - Deleted details are soft-deleted (
isDeleted: true). History is recorded intblTradeBlockDetailHistoryvia database trigger (no public history API). - There is no public REST endpoint for Manual shortcut create, bulk deletable delete, Fixed Income auto-block, or history query — these are handled internally or via Eclipse API / Custom Import.