Bloomberg AIM Routes API

Create, modify, and manage routes to brokers

OpenAPI Specification

bloomberg-aim-routes-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bloomberg Data License API (HAPI) Broker Strategies Routes API
  description: Provides programmatic access to Bloomberg's comprehensive financial, pricing, reference, regulatory, and alternative data covering over 50 million securities and 56,000 fields via the Hypermedia API (HAPI). The BEAP/HAPI follows a hypermedia-driven REST architecture where clients discover resources through link relations in responses.
  version: 1.0.0
  contact:
    name: Bloomberg Developer Support
    url: https://developer.bloomberg.com/
  license:
    name: Proprietary
    url: https://www.bloomberg.com/notices/tos/
  termsOfService: https://www.bloomberg.com/notices/tos/
servers:
- url: https://api.bloomberg.com/eap
  description: Bloomberg Enterprise Access Point (Production)
security:
- bearerAuth: []
- oauth2: []
tags:
- name: Routes
  description: Create, modify, and manage routes to brokers
paths:
  /request/blp/emapisvc/CreateOrderAndRouteEx:
    post:
      operationId: createOrderAndRoute
      summary: Create an Order and Route Simultaneously
      description: Creates a new order and immediately routes it to a specified broker in a single operation.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderAndRouteRequest'
            examples:
              CreateorderandrouteRequestExample:
                summary: Default createOrderAndRoute request
                x-microcks-default: true
                value: {}
      responses:
        '200':
          description: Order created and routed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderAndRouteResponse'
              examples:
                Createorderandroute200Example:
                  summary: Default createOrderAndRoute 200 response
                  x-microcks-default: true
                  value:
                    EMSX_SEQUENCE: 10
                    EMSX_ROUTE_ID: '500123'
                    MESSAGE: example_value
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /request/blp/emapisvc/GroupRouteEx:
    post:
      operationId: groupRoute
      summary: Route Multiple Orders as a Group
      description: Routes a group of orders to a single broker in a single operation, useful for basket or program trading.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupRouteRequest'
            examples:
              GrouprouteRequestExample:
                summary: Default groupRoute request
                x-microcks-default: true
                value:
                  EMSX_SEQUENCE:
                  - 10
                  EMSX_AMOUNT_PERCENT: 42.5
                  EMSX_BROKER: example_value
                  EMSX_ORDER_TYPE: MKT
                  EMSX_LIMIT_PRICE: 42.5
                  EMSX_TIF: DAY
                  EMSX_STRATEGY: example_value
                  EMSX_STRATEGY_PARAMS: example_value
      responses:
        '200':
          description: Orders routed as a group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupRouteResponse'
              examples:
                Grouproute200Example:
                  summary: Default groupRoute 200 response
                  x-microcks-default: true
                  value:
                    numRouted: 10
                    MESSAGE: example_value
                    routeIds:
                    - EMSX_SEQUENCE: 10
                      EMSX_ROUTE_ID: '500123'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /request/blp/emapisvc/RouteEx:
    post:
      operationId: routeOrder
      summary: Route an Order to a Broker
      description: Routes an existing order to a specific broker with optional strategy parameters.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteOrderRequest'
            examples:
              RouteorderRequestExample:
                summary: Default routeOrder request
                x-microcks-default: true
                value:
                  EMSX_SEQUENCE: 10
                  EMSX_AMOUNT: 10
                  EMSX_BROKER: example_value
                  EMSX_ORDER_TYPE: MKT
                  EMSX_TIF: DAY
                  EMSX_LIMIT_PRICE: 42.5
                  EMSX_STOP_PRICE: 42.5
                  EMSX_STRATEGY: example_value
                  EMSX_STRATEGY_PARAMS: example_value
                  EMSX_EXEC_INSTRUCTIONS: example_value
                  EMSX_ACCOUNT: example_value
      responses:
        '200':
          description: Order routed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteOrderResponse'
              examples:
                Routeorder200Example:
                  summary: Default routeOrder 200 response
                  x-microcks-default: true
                  value:
                    EMSX_SEQUENCE: 10
                    EMSX_ROUTE_ID: '500123'
                    MESSAGE: example_value
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /request/blp/emapisvc/ModifyRouteEx:
    post:
      operationId: modifyRoute
      summary: Modify a Route
      description: Modifies parameters of an existing route, such as quantity or strategy parameters.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyRouteRequest'
            examples:
              ModifyrouteRequestExample:
                summary: Default modifyRoute request
                x-microcks-default: true
                value:
                  EMSX_SEQUENCE: 10
                  EMSX_ROUTE_ID: '500123'
                  EMSX_AMOUNT: 10
                  EMSX_ORDER_TYPE: MKT
                  EMSX_LIMIT_PRICE: 42.5
                  EMSX_STOP_PRICE: 42.5
                  EMSX_TIF: DAY
                  EMSX_STRATEGY: example_value
                  EMSX_STRATEGY_PARAMS: example_value
      responses:
        '200':
          description: Route modified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
              examples:
                Modifyroute200Example:
                  summary: Default modifyRoute 200 response
                  x-microcks-default: true
                  value:
                    STATUS: 10
                    MESSAGE: example_value
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /request/blp/emapisvc/DeleteRoute:
    post:
      operationId: deleteRoute
      summary: Delete (cancel) a Route
      description: Cancels an active route. Only routes that have not been fully filled can be cancelled.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteRouteRequest'
            examples:
              DeleterouteRequestExample:
                summary: Default deleteRoute request
                x-microcks-default: true
                value:
                  EMSX_SEQUENCE: 10
                  EMSX_ROUTE_ID: '500123'
      responses:
        '200':
          description: Route cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
              examples:
                Deleteroute200Example:
                  summary: Default deleteRoute 200 response
                  x-microcks-default: true
                  value:
                    STATUS: 10
                    MESSAGE: example_value
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /request/blp/emapisvc/GetRoutes:
    post:
      operationId: getRoutes
      summary: Get Routes
      description: Retrieves the current list of routes associated with orders in the EMSX blotter.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetRoutesRequest'
            examples:
              GetroutesRequestExample:
                summary: Default getRoutes request
                x-microcks-default: true
                value:
                  scope: PRIVATE
      responses:
        '200':
          description: List of routes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRoutesResponse'
              examples:
                Getroutes200Example:
                  summary: Default getRoutes 200 response
                  x-microcks-default: true
                  value:
                    routes:
                    - EMSX_SEQUENCE: 10
                      EMSX_ROUTE_ID: '500123'
                      EMSX_BROKER: example_value
                      EMSX_AMOUNT: 10
                      EMSX_FILLED: 10
                      EMSX_STATUS: CANCEL
                      EMSX_ORDER_TYPE: example_value
                      EMSX_LIMIT_PRICE: 42.5
                      EMSX_AVG_PRICE: 42.5
                      EMSX_STRATEGY: example_value
                      EMSX_EXEC_INSTRUCTIONS: example_value
                      EMSX_LAST_FILL_DATE: example_value
                      EMSX_LAST_FILL_TIME: example_value
                      EMSX_ROUTE_CREATE_DATE: example_value
                      EMSX_ROUTE_CREATE_TIME: example_value
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    RouteOrderRequest:
      type: object
      required:
      - EMSX_SEQUENCE
      - EMSX_AMOUNT
      - EMSX_BROKER
      - EMSX_ORDER_TYPE
      - EMSX_TIF
      properties:
        EMSX_SEQUENCE:
          type: integer
          description: Order sequence number to route
          example: 10
        EMSX_AMOUNT:
          type: integer
          description: Quantity to route
          example: 10
        EMSX_BROKER:
          type: string
          description: Broker code
          example: example_value
        EMSX_ORDER_TYPE:
          type: string
          enum:
          - MKT
          - LMT
          - STP
          - STP LMT
          example: MKT
        EMSX_TIF:
          type: string
          enum:
          - DAY
          - GTC
          - OPG
          - IOC
          - FOK
          - GTD
          - MOC
          - LOC
          example: DAY
        EMSX_LIMIT_PRICE:
          type: number
          example: 42.5
        EMSX_STOP_PRICE:
          type: number
          example: 42.5
        EMSX_STRATEGY:
          type: string
          description: Broker strategy name
          example: example_value
        EMSX_STRATEGY_PARAMS:
          type: object
          additionalProperties: true
          example: example_value
        EMSX_EXEC_INSTRUCTIONS:
          type: string
          example: example_value
        EMSX_ACCOUNT:
          type: string
          example: example_value
    DeleteRouteRequest:
      type: object
      required:
      - EMSX_SEQUENCE
      - EMSX_ROUTE_ID
      properties:
        EMSX_SEQUENCE:
          type: integer
          description: Order sequence number
          example: 10
        EMSX_ROUTE_ID:
          type: integer
          description: Route ID to cancel
          example: '500123'
    OperationResponse:
      type: object
      properties:
        STATUS:
          type: integer
          description: Operation status code (0 = success)
          example: 10
        MESSAGE:
          type: string
          description: Status message
          example: example_value
    CreateOrderAndRouteRequest:
      allOf:
      - $ref: '#/components/schemas/CreateOrderRequest'
      - type: object
        required:
        - EMSX_BROKER
        properties:
          EMSX_BROKER:
            type: string
            description: Broker code for routing
          EMSX_STRATEGY:
            type: string
            description: Broker execution strategy name
          EMSX_STRATEGY_PARAMS:
            type: object
            description: Strategy-specific parameters
            additionalProperties: true
          EMSX_EXEC_INSTRUCTIONS:
            type: string
            description: Execution instructions for the broker
    CreateOrderRequest:
      type: object
      required:
      - EMSX_TICKER
      - EMSX_AMOUNT
      - EMSX_ORDER_TYPE
      - EMSX_SIDE
      - EMSX_TIF
      properties:
        EMSX_TICKER:
          type: string
          description: Bloomberg security identifier
          examples:
          - IBM US Equity
        EMSX_AMOUNT:
          type: integer
          description: Order quantity (number of shares/contracts)
          example: 10
        EMSX_ORDER_TYPE:
          type: string
          description: Order type
          enum:
          - MKT
          - LMT
          - STP
          - STP LMT
          example: MKT
        EMSX_SIDE:
          type: string
          description: Buy or sell
          enum:
          - BUY
          - SELL
          - SHRT
          example: BUY
        EMSX_TIF:
          type: string
          description: Time in force
          enum:
          - DAY
          - GTC
          - OPG
          - IOC
          - FOK
          - GTD
          - MOC
          - LOC
          example: DAY
        EMSX_LIMIT_PRICE:
          type: number
          description: Limit price (required for LMT and STP LMT orders)
          example: 42.5
        EMSX_STOP_PRICE:
          type: number
          description: Stop price (required for STP and STP LMT orders)
          example: 42.5
        EMSX_ACCOUNT:
          type: string
          description: Trading account identifier
          example: example_value
        EMSX_NOTES:
          type: string
          description: Free-text notes attached to the order
          example: example_value
        EMSX_HAND_INSTRUCTION:
          type: string
          description: Handling instruction
          enum:
          - ANY
          - DIR
          - FCM
          example: ANY
        EMSX_BASKET_NAME:
          type: string
          description: Name of the basket this order belongs to
          example: example_value
        EMSX_CFD_FLAG:
          type: string
          description: Contract for difference flag
          enum:
          - Y
          - N
          example: Y
        EMSX_CUSTOM_NOTE1:
          type: string
          example: example_value
        EMSX_CUSTOM_NOTE2:
          type: string
          example: example_value
        EMSX_CUSTOM_NOTE3:
          type: string
          example: example_value
        EMSX_CUSTOM_NOTE4:
          type: string
          example: example_value
        EMSX_CUSTOM_NOTE5:
          type: string
          example: example_value
        EMSX_GTD_DATE:
          type: string
          description: Good-till-date in YYYYMMDD format
          example: example_value
        EMSX_INVESTOR_ID:
          type: string
          description: Investor identifier for allocation
          example: '500123'
        EMSX_LOCATE_BROKER:
          type: string
          description: Locate broker for short sells
          example: example_value
        EMSX_LOCATE_ID:
          type: string
          description: Locate ID for short sells
          example: '500123'
        EMSX_PORTFOLIO:
          type: string
          description: Portfolio name for the order
          example: example_value
    GetRoutesRequest:
      type: object
      properties:
        scope:
          type: string
          enum:
          - PRIVATE
          - TEAM
          example: PRIVATE
    CreateOrderAndRouteResponse:
      type: object
      properties:
        EMSX_SEQUENCE:
          type: integer
          description: Unique order sequence number
          example: 10
        EMSX_ROUTE_ID:
          type: integer
          description: Unique route identifier
          example: '500123'
        MESSAGE:
          type: string
          example: example_value
    GetRoutesResponse:
      type: object
      properties:
        routes:
          type: array
          items:
            $ref: '#/components/schemas/Route'
          example: []
    ModifyRouteRequest:
      type: object
      required:
      - EMSX_SEQUENCE
      - EMSX_ROUTE_ID
      properties:
        EMSX_SEQUENCE:
          type: integer
          description: Order sequence number
          example: 10
        EMSX_ROUTE_ID:
          type: integer
          description: Route ID to modify
          example: '500123'
        EMSX_AMOUNT:
          type: integer
          example: 10
        EMSX_ORDER_TYPE:
          type: string
          enum:
          - MKT
          - LMT
          - STP
          - STP LMT
          example: MKT
        EMSX_LIMIT_PRICE:
          type: number
          example: 42.5
        EMSX_STOP_PRICE:
          type: number
          example: 42.5
        EMSX_TIF:
          type: string
          enum:
          - DAY
          - GTC
          - OPG
          - IOC
          - FOK
          - GTD
          - MOC
          - LOC
          example: DAY
        EMSX_STRATEGY:
          type: string
          example: example_value
        EMSX_STRATEGY_PARAMS:
          type: object
          additionalProperties: true
          example: example_value
    Error:
      type: object
      properties:
        STATUS:
          type: integer
          example: 10
        MESSAGE:
          type: string
          example: example_value
        REASON:
          type: string
          example: example_value
    Route:
      type: object
      properties:
        EMSX_SEQUENCE:
          type: integer
          description: Parent order sequence number
          example: 10
        EMSX_ROUTE_ID:
          type: integer
          description: Unique route identifier
          example: '500123'
        EMSX_BROKER:
          type: string
          description: Broker code
          example: example_value
        EMSX_AMOUNT:
          type: integer
          description: Routed quantity
          example: 10
        EMSX_FILLED:
          type: integer
          description: Filled quantity on this route
          example: 10
        EMSX_STATUS:
          type: string
          enum:
          - CANCEL
          - CXL_PND
          - DONE
          - FILL
          - MOD_PND
          - NEW
          - PART_FILL
          - RJCT
          - SENT
          - WORKING
          example: CANCEL
        EMSX_ORDER_TYPE:
          type: string
          example: example_value
        EMSX_LIMIT_PRICE:
          type: number
          example: 42.5
        EMSX_AVG_PRICE:
          type: number
          description: Average fill price for this route
          example: 42.5
        EMSX_STRATEGY:
          type: string
          example: example_value
        EMSX_EXEC_INSTRUCTIONS:
          type: string
          example: example_value
        EMSX_LAST_FILL_DATE:
          type: string
          example: example_value
        EMSX_LAST_FILL_TIME:
          type: string
          example: example_value
        EMSX_ROUTE_CREATE_DATE:
          type: string
          example: example_value
        EMSX_ROUTE_CREATE_TIME:
          type: string
          example: example_value
    GroupRouteRequest:
      type: object
      required:
      - EMSX_SEQUENCE
      - EMSX_BROKER
      - EMSX_ORDER_TYPE
      - EMSX_TIF
      properties:
        EMSX_SEQUENCE:
          type: array
          items:
            type: integer
          description: List of order sequence numbers to route as a group
          example: []
        EMSX_AMOUNT_PERCENT:
          type: number
          description: Percentage of each order to route (0-100)
          minimum: 0
          maximum: 100
          example: 42.5
        EMSX_BROKER:
          type: string
          example: example_value
        EMSX_ORDER_TYPE:
          type: string
          enum:
          - MKT
          - LMT
          - STP
          - STP LMT
          example: MKT
        EMSX_LIMIT_PRICE:
          type: number
          example: 42.5
        EMSX_TIF:
          type: string
          enum:
          - DAY
          - GTC
          - OPG
          - IOC
          - FOK
          - GTD
          - MOC
          - LOC
          example: DAY
        EMSX_STRATEGY:
          type: string
          example: example_value
        EMSX_STRATEGY_PARAMS:
          type: object
          additionalProperties: true
          example: example_value
    RouteOrderResponse:
      type: object
      properties:
        EMSX_SEQUENCE:
          type: integer
          example: 10
        EMSX_ROUTE_ID:
          type: integer
          description: Unique route identifier
          example: '500123'
        MESSAGE:
          type: string
          example: example_value
    GroupRouteResponse:
      type: object
      properties:
        numRouted:
          type: integer
          description: Number of orders successfully routed
          example: 10
        MESSAGE:
          type: string
          example: example_value
        routeIds:
          type: array
          items:
            type: object
            properties:
              EMSX_SEQUENCE:
                type: integer
              EMSX_ROUTE_ID:
                type: integer
          example: []
  responses:
    BadRequest:
      description: Invalid request parameters or business rule violation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bloomberg-issued JWT credential obtained from the Bloomberg Console.
    oauth2:
      type: oauth2
      description: OAuth 2.0 client credentials flow
      flows:
        clientCredentials:
          tokenUrl: https://bsso.blpprofessional.com/ext/api/as/token.oauth2
          scopes:
            eap: Access to Enterprise Access Point data
            eap.catalogs.read: Read catalog data
            eap.catalogs.write: Write catalog data