Development Guides

Multi Trade Block — Orion Connect API Reference

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)

EntityValue
Registration6
Account7

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

NameUsage
ManualUser-applied blocks; used by legacy account update paths when MTB is enabled.
OCIOrion Connect Import; system-managed. Not removed by programmatic “delete all deletable” helpers.
TOM OnlyOC-only reason; sync events to Eclipse are not published for this reason.
Fixed IncomeSystem-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:

OperationAccess 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

FieldTypeDescription
idintegerDetail ID (0 on create)
entityEnuminteger6 (Registration) or 7 (Account)
entityIdintegerOC ID of the registration or account
tradeBlockReasonIdintegerID of the trade block reason
descriptionstringFree-text description (required on create)
startDatedateBlock start date (required on create; date-only format)
endDatedate | nullOptional end date; must be > startDate
isDeletedbooleanSoft-delete flag
isDisabledbooleantrue when block is outside active date range (if start/end date entity option enabled)
globalIdGUID | nullStable cross-system identifier; auto-generated on create if omitted
entityNamestringDisplay name of the related entity (response only)
tradeBlockReasonobject | nullOptional nested reason
errorMessagestring | nullPopulated on failed items in batch responses
createdBy, createdDate, editedBy, editedDateauditAudit 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}

ParameterRequiredDescription
entityEnumYes6 or 7
entityIdYesRegistration 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):

  • id must be 0
  • entityEnum must be 6 or 7
  • entityId > 0 and entity must exist
  • startDate must be set (not 0001-01-01)
  • If endDate is provided, it must be after startDate
  • description is required
  • tradeBlockReasonId must reference a valid reason (or nested tradeBlockReason when 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 success
  • 400 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

  1. GET /api/v1/Trading/TradeBlocks/Reasons — find tradeBlockReasonId
  2. POST /api/v1/Trading/TradeBlocks — create the block
  3. GET /api/v1/Trading/TradeBlocks?entityEnum=7&entityId={accountId} — verify

Re-sync blocks to Eclipse after account import

  1. Confirm Eclipse post-import discovery flag is enabled (see configuration reference).
  2. POST /api/v1/Trading/TradeBlocks/QueueForAccountIds with 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

StatusMeaning
200 OKSuccess (all items in batch succeeded for create/update)
207 Multi-StatusPartial batch success — check successfulTradeBlocks and failedTradeBlocks
400 Bad RequestValidation failure or all batch items failed
401 UnauthorizedMissing or invalid credentials
403 ForbiddenInsufficient privilege
404 Not FoundDetail, entity, or reason not found
500 Internal Server ErrorUnexpected 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 Only reason blocks
  • Operations with createSyncEvent=false

OC vs Eclipse API quick reference

ConceptOrion ConnectEclipse
API version / base/api/v1/Trading/TradeBlocks/api/v2/TradeBlockDetails
Entity type fieldentityEnumrelatedType
Entity ID fieldentityIdrelatedTypeId
Account entity code732
Registration / PortfolioRegistration 6Portfolio 16
Batch createPOST /TradeBlocks (array body)POST /TradeBlockDetails/AddList
Update keyglobalIdid
Partial success207 + TradeBlockResultDtoPer-endpoint behavior
Re-queue syncPOST .../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 globalId for updates and cross-system correlation; use numeric id for OC-only delete-by-ID paths.
  • Set createSyncEvent=false only when performing multi-step operations where a single sync at the end is preferred.
  • Deleted details are soft-deleted (isDeleted: true). History is recorded in tblTradeBlockDetailHistory via 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.