Skip to content

Commit 7be3c69

Browse files
authored
Merge pull request #1021 from finos/order-and-trade-experimental-contexts
Order and trade experimental contexts
2 parents d37227d + b8fdbfc commit 7be3c69

24 files changed

Lines changed: 1615 additions & 50 deletions

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2020
* Added a `ViewChat` Intent to be used when a user wants to open an existing chat room. ([#796](https://github.com/finos/FDC3/pull/796))
2121
* Added a `ViewMessages` intent to be used when a user wants to search and see a list of messages. ([#797](https://github.com/finos/FDC3/pull/797))
2222
* Added a context type representing a ChatSearchCriteria (`fdc3.chat.searchCriteria`). ([#797](https://github.com/finos/FDC3/pull/797))
23-
* Added an indication that applications, that can be launched to receive intents or context via a raised intent or open with context, SHOULD add their context or intent listeners via the API within 15 seconds, and that Desktop Agents MUST allow at least a 15 second timeout for them to do so, and MAY set a longer timeout ([#987](https://github.com/finos/FDC3/pull/987))
23+
* Added an indication that applications, that can be launched to receive intents or context via a raised intent or open with context, SHOULD add their context or intent listeners via the API within 15 seconds, and that Desktop Agents MUST allow at least a 15 second timeout for them to do so, and MAY set a longer timeout
24+
* Added experimental `Order`, `OrderList`, `Product`, `Trade` & `TradeList` context types. ([#1021](https://github.com/finos/FDC3/pull/1021))
2425

2526
### Changed
2627

docs/context/ref/Order.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
id: Order
3+
sidebar_label: Order
4+
title: Order
5+
hide_title: true
6+
---
7+
# `Order`
8+
9+
[`@experimental`](/docs/fdc3-compliance#experimental-features) context type representing an order. To be used with OMS and EMS systems.
10+
11+
This type currently only defines a required `id` field, which should provide a reference to the order in one or more systems, an optional human-readable `name` field to be used to summarize the order, and an optional `details` field that may be used to provide additional detail about the order, including a Context representing a `product`, which may be extended with arbitrary properties. The `details.product` field is currently typed as an unspecified Context type, but both `details` and `details.product` are expected to be standardized in the future.
12+
13+
## Type
14+
15+
`fdc3.order`
16+
17+
## Schema
18+
19+
<https://fdc3.finos.org/schemas/next/context/order.schema.json>
20+
21+
## Details
22+
23+
| Property | Type | Required | Details |
24+
|-------------------|------------|----------|---------------------------|
25+
| `type` | string | Yes | `'fdc3.order'` |
26+
| `id` | object | Yes | One or more identifiers that refer to the order in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future. E.g.:`{ myOMS: '12345' }` |
27+
| `name` | string | No | An optional human-readable summary of the order. |
28+
| `details` | object | No | Optional additional details about the order, which may include a product element that is an, as yet undefined but extensible, Context |
29+
| `details.product` | Product | No | The product that the order relates to |
30+
31+
## Examples
32+
33+
```js
34+
const order1 = {
35+
"type": "fdc3.order",
36+
"name": "...",
37+
"id": {
38+
"myOMS": "12345"
39+
},
40+
"details": {
41+
"product": {
42+
"type": "fdc3.product",
43+
"id": {
44+
"productId": "ABC123"
45+
},
46+
"instrument": {
47+
"type": "fdc3.instrument",
48+
"id": {
49+
"ticker": "MSFT"
50+
}
51+
}
52+
}
53+
}
54+
};
55+
```
56+
57+
```js
58+
const order2 = {
59+
"type": "fdc3.order",
60+
"id": {
61+
"myOMS": "ABC123"
62+
}
63+
};
64+
```
65+
66+
## See Also
67+
68+
Other Types
69+
70+
- [OrderList](OrderList)
71+
- [Product](Product)
72+
- [Trade](Trade)

docs/context/ref/OrderList.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
id: OrderList
3+
sidebar_label: OrderList
4+
title: OrderList
5+
hide_title: true
6+
---
7+
# `OrderList`
8+
9+
[`@experimental`](/docs/fdc3-compliance#experimental-features) A list of orders. Use this type for use cases that require not just a single order, but multiple.
10+
11+
Notes:
12+
13+
- The OrderList schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.
14+
15+
## Type
16+
17+
`fdc3.orderList`
18+
19+
## Schema
20+
21+
<https://fdc3.finos.org/schemas/next/context/orderList.schema.json>
22+
23+
## Details
24+
25+
| Property | Type | Required | Example Value |
26+
|--------------|------------|----------|---------------------------|
27+
| `type` | string | Yes | `'fdc3.orderList'` |
28+
| `id` | object | No | `{ listId: '1234' }` |
29+
| `name` | string | No | `'Today's orders'` |
30+
| `orders` | Trade[] | Yes | `[order1, order2]` |
31+
32+
## Example
33+
34+
```js
35+
const orderList = {
36+
type: "fdc3.orderList",
37+
orders: [
38+
{
39+
"type": "fdc3.order",
40+
"id": {
41+
"myOMS": "ABC123"
42+
}
43+
},
44+
{
45+
"type": "fdc3.order",
46+
"id": {
47+
"myOMS": "DEF456"
48+
}
49+
}
50+
]
51+
};
52+
```
53+
54+
## See Also
55+
56+
Other Types
57+
58+
- [Order](Order)

docs/context/ref/Product.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
id: Product
3+
sidebar_label: Product
4+
title: Product
5+
hide_title: true
6+
---
7+
# `Product`
8+
9+
[`@experimental`](/docs/fdc3-compliance#experimental-features) context type representing a tradable product. To be used with OMS and EMS systems. This type is currently only loosely defined as an extensible context object, with an optional instrument field.
10+
11+
Notes:
12+
13+
- The Product schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.
14+
15+
## Type
16+
17+
`fdc3.product`
18+
19+
## Schema
20+
21+
<https://fdc3.finos.org/schemas/next/context/product.schema.json>
22+
23+
## Details
24+
25+
| Property | Type | Required | Example Value |
26+
|--------------|------------|----------|---------------------------|
27+
| `type` | string | Yes | `'fdc3.product'` |
28+
| `id` | object | Yes | One or more identifiers that refer to the product. Specific key names for systems are expected to be standardized in future. |
29+
| `name` | string | No | A human-readable summary of the product. |
30+
| `instrument` | Instrument | No | A financial instrument that relates to the definition of this product. |
31+
32+
## Example
33+
34+
```js
35+
const product = {
36+
"type": "fdc3.product",
37+
"id": {
38+
"productId": "ABC123"
39+
},
40+
"instrument": {
41+
"type": "fdc3.instrument",
42+
"id": {
43+
"ticker": "MSFT"
44+
}
45+
}
46+
};
47+
```
48+
49+
## See Also
50+
51+
Other Types
52+
53+
- [Instrument](Instrument)
54+
- [Order](Order)
55+
- [Trade](Trade)

docs/context/ref/Trade.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
id: Trade
3+
sidebar_label: Trade
4+
title: Trade
5+
hide_title: true
6+
---
7+
# `Trade`
8+
9+
[`@experimental`](/docs/fdc3-compliance#experimental-features) context type representing a trade. To be used with execution systems.
10+
11+
This type currently only defines a required `id` field, which should provide a reference to the trade in one or more systems, an optional human readable `name` field to be used to summarize the trade and a required `product` field that may be used to provide additional detail about the trade, which is currently typed as an unspecified Context type, but `product` is expected to be standardized in future.
12+
13+
Notes:
14+
15+
- The Trade schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.
16+
17+
## Type
18+
19+
`fdc3.trade`
20+
21+
## Schema
22+
23+
<https://fdc3.finos.org/schemas/next/context/trade.schema.json>
24+
25+
## Details
26+
27+
| Property | Type | Required | Details |
28+
|--------------|------------|----------|---------------------------|
29+
| `type` | string | Yes | `'fdc3.trade'` |
30+
| `id` | object | Yes | One or more identifiers that refer to the trade in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future. |
31+
| `name` | string | No | A human-readable summary of the trade, e.g. `'100 TSLA @ 290.85 USD'` |
32+
| `product` | Product | Yes | A tradeable product |
33+
34+
## Example
35+
36+
```js
37+
const trade = {
38+
"type": "fdc3.trade",
39+
"name": "...",
40+
"id": {
41+
"myEMS": "12345"
42+
},
43+
"product": {
44+
"type": "fdc3.product",
45+
"id": {
46+
"productId": "ABC123"
47+
},
48+
"instrument": {
49+
"type": "fdc3.instrument",
50+
"id": {
51+
"ticker": "MSFT"
52+
}
53+
}
54+
}
55+
};
56+
```
57+
58+
## See Also
59+
60+
Other Types
61+
62+
- [Product](Product)
63+
- [TradeList](TradeList)

docs/context/ref/TradeList.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
id: TradeList
3+
sidebar_label: TradeList
4+
title: TradeList
5+
hide_title: true
6+
---
7+
# `TradeList`
8+
9+
[`@experimental`](/docs/fdc3-compliance#experimental-features) A list of trades. Use this type for use cases that require not just a single trade, but multiple.
10+
11+
Notes:
12+
13+
- The TradeList schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.
14+
15+
## Type
16+
17+
`fdc3.tradeList`
18+
19+
## Schema
20+
21+
<https://fdc3.finos.org/schemas/next/context/tradeList.schema.json>
22+
23+
## Details
24+
25+
| Property | Type | Required | Example Value |
26+
|--------------|------------|----------|---------------------------|
27+
| `type` | string | Yes | `'fdc3.tradeList'` |
28+
| `id` | object | No | `{ listId: '1234' }` |
29+
| `name` | string | No | `'Today's trades'` |
30+
| `trades` | Trade[] | Yes | `[trade1, trade2]` |
31+
32+
## Example
33+
34+
```js
35+
const tradeList = {
36+
type: "fdc3.tradeList",
37+
trades: [
38+
{
39+
"type": "fdc3.trade",
40+
"name": "...",
41+
"id": {
42+
"myEMS": "12345"
43+
},
44+
"product": {
45+
"type": "fdc3.product",
46+
"id": {
47+
"productId": "ABC123"
48+
},
49+
"instrument": {
50+
"type": "fdc3.instrument",
51+
"id": {
52+
"ticker": "MSFT"
53+
}
54+
}
55+
}
56+
},
57+
{
58+
"type": "fdc3.trade",
59+
"id": {
60+
"myEMS": "67890"
61+
},
62+
"product": {
63+
"type": "fdc3.product",
64+
"id": {
65+
"productId": "DEF456"
66+
},
67+
"instrument": {
68+
"type": "fdc3.instrument",
69+
"id": {
70+
"ticker": "TSLA"
71+
}
72+
}
73+
}
74+
}
75+
]
76+
};
77+
```
78+
79+
## See Also
80+
81+
Other Types
82+
83+
- [Trade](Trade)

docs/context/spec.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ The following are standard FDC3 context types:
184184
- [`fdc3.transactionResult`](ref/TransactionResult) ([schema](/schemas/next/context/transactionresult.schema.json))
185185
- [`fdc3.valuation`](ref/Valuation) ([schema](/schemas/next/context/valuation.schema.json))
186186

187+
The following are [`@experimental`](/docs/fdc3-compliance#experimental-features) types, which are in the process of being defined:
188+
189+
- [`fdc3.order`](ref/Order) ([schema](/schemas/next/context/order.schema.json))
190+
- [`fdc3.orderList`](ref/OrderList) ([schema](/schemas/next/context/orderList.schema.json))
191+
- [`fdc3.product`](ref/Product) ([schema](/schemas/next/context/product.schema.json))
192+
- [`fdc3.trade`](ref/Trade) ([schema](/schemas/next/context/trade.schema.json))
193+
- [`fdc3.tradeList`](ref/TradeList) ([schema](/schemas/next/context/tradeList.schema.json))
194+
187195
### Examples
188196

189197
The below examples show how the base context data interface can be used to define specific context data objects.

schemas/context/action.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"intent": {
1313
"type": "string",
14-
"$comment": "Should reference an intent type name, such as those defined in the FDC3 Standard'"
14+
"description": "A reference an intent type name, such as those defined in the FDC3 Standard"
1515
},
1616
"context": {
1717
"type": "object",

schemas/context/message.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://fdc3.finos.org/schemas/context/message.schema.json",
3+
"$id": "https://fdc3.finos.org/schemas/next/context/message.schema.json",
44
"type": "object",
55
"title": "Message",
66
"allOf": [{ "$ref": "context.schema.json#" }],

0 commit comments

Comments
 (0)