Trader RFQs
This RFQ workflow automates the exchange of quoting information between trading platforms. A trading desk on Platform A generates an RFQ for a financial instrument, which is then sent via FDC3 messaging. A Delivery Hook standardizes and enriches the RFQ payload before an outbound Action sends it to one or more counterparties on Platform B. The receiving platform’s receptor listens for RFQs, processes the request, and may respond by raising an intent or directly broadcasting an RFQ response. This real‐time, automated exchange accelerates trading decisions and increases market liquidity.
Sequence Diagram
Components Description:
• TraderA (Platform A): Uses the Agent SDK to broadcast an RFQ context and raise intents.
• Delivery Hook: Intercepts and transforms the RFQ payload (e.g., adds quoting parameters, timestamps, or standardized identifiers).
• Outbound Action Handler: Uses REST or deep links to route the RFQ to the appropriate counterparty applications.
• TraderB (Platform B): Acts as the receptor by listening for the RFQ context or intent, processes the RFQ, and responds with bid details.
Implementation Patterns & Code
1. Trading Platform A – Broadcasting the RFQ
import { DesktopAgent } from '@finos/fdc3';
import { createAgent } from '<https://platform.connectifi.app/agent/main.bundle.js>';
const agent: DesktopAgent = await createAgent('<https://platform.connectifi.app>', 'TRADING_APP_A');
// Function to broadcast a new RFQ context
const broadcastRFQ = async () => {
const rfqContext = {
type: 'fdc3.trading.rfq',
data: {
rfqId: 'RFQ-1001',
instrument: {
symbol: 'AAPL',
exchange: 'NASDAQ'
},
quantity: 100,
price: 150.00,
timeStamp: new Date().toISOString()
}
};
// Broadcast RFQ which will be intercepted by the Delivery Hook
await agent.broadcast(rfqContext);
};
// Initiate RFQ broadcast
await broadcastRFQ();
// Optionally, raise intent to trigger outbound routing
const sendRFQ = async () => {
const response = await agent.raiseIntent('SubmitRFQ', {
type: 'fdc3.trading.rfq',
data: {
rfqId: 'RFQ-1001',
instrument: { symbol: 'AAPL', exchange: 'NASDAQ' },
quantity: 100,
price: 150.00,
timeStamp: new Date().toISOString()
}
});
console.log('RFQ Response:', response);
};
await sendRFQ();
2. Delivery Hook – RFQ Message Transformation
import { type Context } from '@finos/fdc3';
import type { DeliveryHookHandler } from '@connectifi/sdk';
import { RequestError } from '../types'; // Custom error types
// RFQ Delivery Hook to validate and enrich RFQ message
const transformRFQHook: DeliveryHookHandler = async (request) => {
const { context } = request;
if (context.type !== 'fdc3.trading.rfq') {
throw new RequestError('Context type not supported');
}
// Enriching RFQ message with additional parameters
const transformedContext: Context = {
...context,
data: {
...context.data,
validated: true,
enrichedTimeStamp: new Date().toISOString()
}
};
return { context: transformedContext };
};
// This hook would be registered via the Connectifi Admin UI
3. Outbound Action Handler – Routing the RFQ
import type { DataActionHandler } from '@connectifi/sdk';
import type { Context } from '@finos/fdc3';
const sendRFQHandler: DataActionHandler = async (request) => {
const { context, intent } = request;
if (intent !== 'SubmitRFQ') {
throw new Error('Unsupported intent');
}
// Simulate an outbound REST call or deep link to deliver RFQ context
const response = await fetch('<https://tradingplatformb.example.com/receiveRFQ>', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(context.data)
});
const result = await response.json();
return result; // Example: { status: 'RFQ Delivered', rfqId: context.data.rfqId }
};
4. Trading Platform B – Receptor for RFQ and Responding
// In Trading Platform B's application using the Agent SDK
import { DesktopAgent } from '@finos/fdc3';
import { createAgent } from '<https://platform.connectifi.app/agent/main.bundle.js>';
const agentB: DesktopAgent = await createAgent('<https://platform.connectifi.app>', 'TRADING_APP_B');
// Listen for incoming RFQ notifications
agentB.addContextListener('fdc3.trading.rfq', (context) => {
console.log('Received RFQ:', context);
// Process the RFQ and prepare a response (e.g., compute bid details)
const rfqResponse = {
type: 'fdc3.trading.rfqresponse',
data: {
rfqId: context.data.rfqId,
bidPrice: 149.50,
quantity: context.data.quantity,
responseTime: new Date().toISOString()
}
};
// Optionally, raise an intent to send the response back via the action
agentB.raiseIntent('SubmitRFQResponse', rfqResponse).then((result) => {
console.log('RFQ Response submitted:', result);
}).catch((error) => {
console.error('Error submitting RFQ response:', error);
});
});
Connectifi Platform Configuration
-
Directory & Application Registration:
• Register both trading applications (TRADING_APP_A and TRADING_APP_B) via the Connectifi Admin UI at https://platform.connectifi.app .
-
Configure Delivery Hooks:
• Register the RFQ Delivery Hook (e.g., transformRFQHook) for the context type “fdc3.trading.rfq” through the Connectifi Admin UI so that every RFQ broadcast is validated and enriched.
-
Set Up Outbound Actions:
• Create an Action in the Connectifi Admin UI that binds the “SubmitRFQ” intent to the sendRFQHandler for routing RFQs. • Optionally register an Action for “SubmitRFQResponse” to allow counterparty responses to be routed back to the originating platform.
-
Register Receptors:
• Configure receptors in your Connectifi application directory to bind incoming contexts (RFQs and RFQ responses) to the corresponding applications.
Next Steps
- Integrate the provided Agent SDK code into your respective trading platform applications.
- Register and test the Delivery Hooks and Outbound Actions using the Connectifi Admin UI.
- Perform end-to-end testing by simulating RFQ broadcasts and verifying responses across platforms.
- Explore further enhancements like security validations and error handling routines.
- Check out Connectifi templates for related apps and workflows at https://platform.connectifi.app/templates
This multi-step RFQ workflow demonstrates how FDC3 combined with Connectifi’s robust features can seamlessly facilitate real-time communication between trading platforms.