Development Guides

Multi Trade Block — Eclipse API Reference

External-facing reference for Multi Trade Block (MTB) REST endpoints in Eclipse API v2. Use these endpoints to create, read, update, and delete trade block details on accounts and portfolios, and to manage trade block reasons (including Custom Reasons).

For Orion Connect endpoints, see Multi Trade Block — Orion Connect API Reference.

Overview

When the firm preference Multi Trade Block Feature is enabled, trade blocks are stored as Trade Block Detail records. Each detail has its own reason (Type), description, and optional start/end dates. Multiple blocks can be active on the same account or portfolio at once.

When MTB is disabled, the legacy setAccountTradeBlock and setPortfolioTradeBlock endpoints update boolean fields on the entity instead of creating detail records.

Eclipse IDs are not Orion Connect IDs. Use Eclipse account and portfolio IDs on these endpoints. The trade block globalId is the stable identifier shared with Orion Connect.

Entity type codes (relatedType)

EntityValueMaps to in Orion Connect
Portfolio16Registration
Account32Account

Only Portfolio and Account are supported.

System trade block reasons

NameUsage
ManualUser-applied blocks; used by legacy set-trade-block endpoints.
OCISystem-managed. Not removed by bulk “deletable” delete.
Fixed IncomeAuto-applied when Fixed Income trades are placed.

Call GET /api/v2/TradeBlockReasons to retrieve reason IDs (including your firm’s Custom Reasons) and whether the caller has role access (hasRoleAccess).

Custom Reasons are created and maintained in Eclipse, then sync to Orion Connect. Do not use the Orion Connect reason update/delete APIs for firm-managed reasons.

Authentication and authorization

All endpoints require a valid Eclipse API token.

AreaTypical privilege
Trade block details (add / update / delete on an account or portfolio)Update on Accounts or Portfolios, and role access to that reason
Reason catalog (create / rename / delete Custom Reasons)Trade Block Management (Add / Update / Delete)
List reasonsAuthenticated user; response includes hasRoleAccess per reason

Even with entity update access, a caller may be denied a specific Type. Check hasRoleAccess on the reason, or use the GlobalId permission check endpoint.

OCI and other system-maintained reasons cannot be added, edited, or removed by most firm users.

Trade Block Details API

Base path: /api/v2/TradeBlockDetails

Data model: TradeBlockDetail

FieldTypeDescription
idintegerDetail ID (0 on create; required on update/delete)
relatedTypeinteger16 (Portfolio) or 32 (Account)
relatedTypeIdintegerEclipse ID of the account or portfolio
tradeBlockReasonIdintegerID of the trade block reason
descriptionstringFree-text description
startDatedatetimeBlock start date (required on create)
endDatedatetime or nullOptional; must be on or after startDate
isDeletedbooleanSoft-delete flag
isDisabledbooleantrue when the block is outside its active date range (if start/end date automation is enabled)
globalIdGUID or nullStable identifier; synced to Orion Connect
entityNamestringDisplay name of the related entity
tradeBlockReasonobject or nullOptional nested reason on create

Eclipse updates and deletes use numeric id. Use globalId for cross-system correlation with Orion Connect.

1. List trade block details

Returns trade block details for an entity and related entities (for example a portfolio and its accounts).

GET /api/v2/TradeBlockDetails?relatedType={relatedType}&relatedTypeId={relatedTypeId}

ParameterRequiredDescription
relatedTypeYes16 or 32
relatedTypeIdYesEclipse entity ID

Response: 200 OK — array of TradeBlockDetail objects.

There is no get-by-ID endpoint. List by entity, then use id or globalId.

2. Create trade block detail (single)

Use this to add a Manual or Custom Reason block. Pass the reason ID from GET /api/v2/TradeBlockReasons.

POST /api/v2/TradeBlockDetails

Example body:

{ “relatedType”: 32, “relatedTypeId”: 12345, “tradeBlockReasonId”: 7, “description”: “Client requested trading halt”, “startDate”: “2026-07-17T00:00:00”, “endDate”: “2026-12-31T00:00:00” }

Response: 200 OK — created TradeBlockDetail.

3. Create trade block details (batch)

POST /api/v2/TradeBlockDetails/AddList

Example body:

[ { “relatedType”: 16, “relatedTypeId”: 500, “tradeBlockReasonId”: 3, “description”: “Pending model change”, “startDate”: “2026-07-17T00:00:00” }, { “relatedType”: 32, “relatedTypeId”: 12345, “tradeBlockReasonId”: 7, “description”: “Account-level restriction”, “startDate”: “2026-07-17T00:00:00”, “endDate”: “2026-08-17T00:00:00” } ]

Validation (create):

  • relatedType and relatedTypeId must be valid
  • startDate must be set
  • If endDate is provided, it must be on or after startDate
  • Caller must have entity update privilege and role access to the reason

Response: 200 OK — array of created objects.

4. Update trade block detail (single)

PUT /api/v2/TradeBlockDetails/{id}

Mutable fields: description, startDate, endDate only.

relatedType, relatedTypeId, and tradeBlockReasonId cannot be changed after creation. Attempting to change them returns 400 Bad Request.

Response: 200 OK — updated TradeBlockDetail.

5. Update trade block details (batch)

POST /api/v2/TradeBlockDetails/UpdateList

Request body: array of TradeBlockDetail objects (each with a valid id).

Response: 200 OK — array of updated objects.

6. Delete trade block detail (single)

Soft-deletes the detail (isDeleted = true). This is the correct way to remove one block when the account or portfolio has more than one.

DELETE /api/v2/TradeBlockDetails/{id}

Response: 200 OK

7. Delete trade block details (batch)

POST /api/v2/TradeBlockDetails/DeleteList

Example body:

[42, 43, 44]

Response: 200 OK

8. Get related entities

Returns the primary entity and related entities (for example a portfolio and its assigned accounts).

GET /api/v2/TradeBlockDetails/RelatedEntities?entityId={entityId}&entityType={entityType}

Example response:

[ { “id”: 500, “entityType”: 16, “name”: “Growth Portfolio” }, { “id”: 12345, “entityType”: 32, “name”: “John Smith IRA” } ]

9. Delete all deletable trade blocks for an entity

Removes all active trade block details for the entity except OCI.

Use this only when you intend to clear every user-managed block (Manual, Custom Reasons, Fixed Income, and so on). It will not remove a single custom-reason block while leaving others in place.

DELETE /api/v2/TradeBlockDetails/DeletableDetails/{entityId}/{entityTypeId}

When start/end date automation is enabled, only non-disabled blocks are deleted.

Response: 200 OK

10. Create Manual trade block (shortcut)

Creates a Manual trade block. If a Manual block already exists on that entity, returns the existing one (idempotent). Cannot attach a Custom Reason.

POST /api/v2/TradeBlockDetails/Manual/{relatedType}/{relatedTypeId}

Example body:

{ “description”: “Manual block applied via API” }

Response: 200 OK — TradeBlockDetail with reason Manual, startDate = today.

Batch (Manual only):

POST /api/v2/TradeBlockDetails/Manual/{relatedType}

Example body:

{ “relatedTypeIds”: [12345, 12346] }

11. Create Fixed Income trade blocks (batch)

Creates Fixed Income trade blocks after Fixed Income trades. Duration comes from the entity’s Fixed Income trade block days preference — callers do not supply days.

POST /api/v2/TradeBlockDetails/FixedIncome/{relatedType}

Example body:

[ { “relatedTypeId”: 500, “tradeInstanceId”: 98765 }, { “relatedTypeId”: 12345, “tradeInstanceId”: 98766 } ]

Response: 200 OK — partial success is supported (succeeded / failed with per-item errors).

12. Get trade block detail history

GET /api/v2/TradeBlockDetails/History/{relatedType}/{relatedTypeId}?startDate={startDate}&endDate={endDate}

Query dates use YYYY-MM-DD.

Response: 200 OK — history objects with change type, reason, description, dates, and audit fields.

Orion Connect has no public history API.

Trade Block Reasons API

Base path: /api/v2/TradeBlockReasons

This is where firms manage Custom Reasons. System-maintained reasons cannot be renamed or deleted.

MethodPathDescription
GET/api/v2/TradeBlockReasonsList all reasons. Includes hasRoleAccess.
GET/api/v2/TradeBlockReasons/EditableFirm-editable reasons. Requires Trade Block Management Read.
POST/api/v2/TradeBlockReasons/AddByNameCreate a reason. Body is the reason name string. Requires Trade Block Management Add.
PUT/api/v2/TradeBlockReasonsRename/update a reason. Requires Trade Block Management Update.
DELETE/api/v2/TradeBlockReasons/{id}Delete a firm reason. Existing blocks stay and are reassigned to Manual.
POST/api/v2/TradeBlockReasons/TradeBlockReasonsPermissionByGlobalIdsPass an array of reason GlobalIds; returns GlobalIds the caller is denied.

Deleting a Custom Reason does not unblock accounts. Only deleting the trade block detail removes the block.

Legacy-compatible trade block endpoints

These remain available and route to MTB detail records when Multi Trade Block is enabled. They are on/off switches, not “delete this one Type.”

Set account trade block

PUT /api/v2/Account/Accounts/action/setAccountTradeBlock

Requires Accounts Update.

Example body:

[ { “id”: 12345, “isDoNotBuySell”: true, “isCustodialRestriction”: false } ]

When MTB is enabled:

  • isDoNotBuySell true creates a Manual detail if one does not already exist
  • isDoNotBuySell false removes every Manual block on that account. Custom Reason blocks are left in place

Update account details (includes do not trade)

PUT /api/v2/Account/Accounts/{accountId}/Details

When MTB is enabled and isDoNotBuySell is set to false, this path removes all non-OCI blocks on the account (Manual and Custom Reasons).

Set portfolio trade block

PUT /api/v2/Portfolio/Portfolios/action/setPortfolioTradeBlock

Requires Portfolios Update.

Example body:

[ { “id”: 500, “doNotTrade”: true } ]

When MTB is enabled: creates or removes a Manual trade block detail on the portfolio.

Custom Import (non-REST)

Bulk operations are also available in Eclipse Data Management → Custom Import:

  • Trade Block (Add)
  • Trade Block (Update)
  • Trade Block (Delete) — by Trade Block ID

Requires Trade Block Management permission for the action, plus role access to the specified Type.

Common workflows

Apply a custom trade block to an account

  1. GET /api/v2/TradeBlockReasons — find tradeBlockReasonId (confirm hasRoleAccess)
  2. POST /api/v2/TradeBlockDetails — create the block
  3. GET /api/v2/TradeBlockDetails?relatedType=32&relatedTypeId={accountId} — verify

Remove one block when several exist

DELETE /api/v2/TradeBlockDetails/{id}

Do not use setAccountTradeBlock or DeletableDetails for this. Those can remove more than the one block you intended.

Remove all user-applied blocks from a portfolio (keep OCI)

DELETE /api/v2/TradeBlockDetails/DeletableDetails/{portfolioId}/16

Toggle a simple Manual on/off block (backward compatible)

PUT /api/v2/Account/Accounts/action/setAccountTradeBlock with isDoNotBuySell true or false.

Error responses

StatusMeaning
200 OKSuccess
400 Bad RequestValidation failure (invalid dates, mismatched IDs, update of a deleted record)
401 UnauthorizedMissing or invalid credentials
403 ForbiddenInsufficient privilege or no role access to that trade block reason
404 Not FoundEntity or trade block reason not found
500 Internal Server ErrorUnexpected server error

Orion Connect synchronization

Create, update, and delete operations publish sync events to Orion Connect by default. Each trade block detail has a globalId used as the stable cross-system identifier.

Eclipse portfolio-level blocks sync as registration-level blocks in Orion Connect.

OC vs Eclipse API quick reference

ConceptEclipseOrion Connect
API version / base/api/v2/TradeBlockDetails/api/v1/Trading/TradeBlocks
Entity type fieldrelatedTypeentityEnum
Entity ID fieldrelatedTypeIdentityId
Account entity code327
Portfolio / RegistrationPortfolio 16Registration 6
Entity IDsEclipse IDsOrion Connect IDs
Batch createPOST /TradeBlockDetails/AddListPOST /TradeBlocks (array body)
Update keynumeric idglobalId
Date formatdatetimedate-only YYYY-MM-DD
Custom Reasons catalogFirm-facing APIOrion Admin / service account only
Manual shortcutPOST …/Manual/{relatedType}/{relatedTypeId}No public shortcut
Bulk deletable deleteDELETE …/DeletableDetails/{id}/{type}No public endpoint
HistoryGET …/History/{type}/{id}No public endpoint
Re-queue syncPOST …/QueueForAccountIds

Notes for integrators

  • Confirm Multi Trade Block is enabled for the firm before using these endpoints.
  • Prefer batch endpoints (AddList, UpdateList, DeleteList) for bulk work.
  • Send Eclipse account/portfolio IDs, not Orion Connect IDs.
  • Use globalId to correlate a block across systems; use numeric id for Eclipse update/delete.
  • Deleted details are soft-deleted (isDeleted true).
  • When start/end date automation is enabled, filter on isDisabled false for currently active blocks.
  • To add or remove a Custom Reason block, use Trade Block Details with tradeBlockReasonId. To add or remove a Custom Reason Type, use Trade Block Reasons.
  • To lift one of several blocks on an account, delete that detail by id. Account/portfolio do-not-trade toggles are not per-reason deletes.