Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

To support dma orders we need to create a version OrderInstructionService which will use the OrderValidationAdapter.
The OrderValidationAdapter validates incomming dma orders and verifies that the given external user does not exceed the defined limits.
It does this by calculating the order value and checking if the order limit or daily limits are exceded.
For market orders with a price it calls a service at livemarketdata to get a price to calculate with.

Deployment

1 Add the following files

C:\KodiakOrderEntryServer\Kodi.Kodiak.OrderEntry.Dma.dll
C:\KodiakOrderEntryServer\Kodi.Kodiak.OrderEntry.Dma.dll.pdb

C:\KodiakOrderEntryServer\Config\Spring\Kodi.Kodiak.OrderInstructions.Dma.config

2 Edit the application configuration file:

C:\KodiakOrderEntryServer\Kodi.Kodiak.WindowsServices.OrderEntryServer.exe.config

Add the following resource to the spring/context node below Kodi.Kodiak.OrderInstructions.config

<resource uri="~/Config/Spring/Kodi.Kodiak.OrderInstructions.Dma.config" />

3 Edit Config/ServiceConfig/CustomServices.config and add the service

<object id="OrderInstructionServiceDma" type="Kodi.Kodiak.Services.OrderInstructionService, Kodi.Kodiak.OrderInstructions" singleton="false" scope="session">
	<property name="OrderInstructionEntry" ref="OrderInstructionEntryDma"/>
	<property name="OrderInstructionSearch" ref="OrderInstructionSearch"/>
</object>

4 Edit Config/ServiceConfig/system.servicemodel.services.config and add the service

<service behaviorConfiguration="ServiceBehavior" name="OrderInstructionServiceDma">
	<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding" contract="Kodi.Kodiak.Services.ServiceContracts.IOrderInstructionService" />
	<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

Kodi.Kodiak.OrderInstructions.Dma.config settings

	<objects xmlns="http://www.springframework.net"
		xmlns:db="http://www.springframework.net/database"
		xmlns:nms="http://www.springframework.net/nms"
		xmlns:tx="http://www.springframework.net/tx">
	  <!-- Kodi.Kodiak.OrderEntry -->
	  <!-- OrderInstructions -->
	  <object id="OrderInstructionEntryDma" type="Kodi.Kodiak.OrderInstructions.OrderInstructionEntry, Kodi.Kodiak.OrderInstructions">
		<property name="ClientPublisher" ref="ClientPublisher"/>    
		<!-- Services -->
		<property name="OrderService" ref="OrderService"/>    
		<!-- Adapters -->
		<property name="OrderValidationAdapter" ref="OrderValidationAdapterDma"/>
		<property name="OrderInstructionEntryUtil" ref="OrderInstructionEntryUtil"/>
	  </object>
	 
	 
		<object id="OrderValidationAdapterDma" type="Kodi.Kodiak.OrderEntry.Dma.OrderValidationAdapter, Kodi.Kodiak.OrderEntry.Dma">	
			<property name="ExternalUserRepository" ref="ExternalUserRepository"/>
			<property name="UserRepository" ref="UserRepository"/>	
			<property name="InstrumentRepository" ref="InstrumentRepository"/>	
			<property name="OrderRepository" ref="OrderRepository"/>	
			<property name="OrderInstructionRepository" ref="OrderInstructionRepository"/>	
			<property name="EmailService" ref="EmailService"/>	
			<property name="RiskCheckByCustomer" value="false"/>	
			<property name="RiskCheckOnOnlyDmaOrders" value="false"/>	
			
			<property name="Url" value="${ApiUrl}"/>
			<property name="AuthenticationServiceUrl" value="${AuthenticationServiceUrl}"/>
			<property name="Username" value="${AuthUsername}"/>
			<property name="Password" value="${AuthPassword}"/>
			
			<property name="SystemId" value="kodiak_oms"/>
			<property name="UserAgent" value="Oms"/>			
		</object>  
	</objects>

  • No labels