forked from finos/FDC3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finos#644 | Add Order and OrderLeg Context Types
- Loading branch information
1 parent
afc85df
commit 342173f
Showing
9 changed files
with
511 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
id: Order | ||
sidebar_label: Order | ||
title: Order | ||
hide_title: true | ||
--- | ||
# `Order` | ||
|
||
A context type representing the details of an order, which may be used to transmit a new order to a third party or share details of an existing order. | ||
|
||
When the intenet is to create an Order in a downstream system at least one OrderLeg MUST be populated. | ||
|
||
When the intent is to lookup an Order in a downstream system at least one entry MUST be populated in the id field and other fields are not required. | ||
|
||
## Type | ||
|
||
`fdc3.order` | ||
|
||
## Schema | ||
|
||
https://fdc3.finos.org/scehmas/next/order.schema.json | ||
|
||
## Details | ||
|
||
| Property| Type| Required| Example | ||
| -| -| -| - | ||
| `id` | object | Yes | `{'OMS': '123456789'}` | ||
| `id.OMS` | string | No | `'123456789'` | ||
| `id.EMS` | string | No | `'EMSID1234'` | ||
| `id.PMS` | string | No | `'PMS12345'` | ||
| `sendingTime` | string | Yes | `'2022-03-30T15:44:44+00:00'` | ||
| `timeInForce` | fdc3.timeRange| No | `{type: "fdc3.timeRange", startTime: "2020-09-01T08:00:00.000Z", endTime: "2020-10-31T08:00:00.000Z"}` | ||
| `orderLegs` | fdc3.orderLeg[] | Yes | | ||
| `notes` | String | No | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
id: OrderLeg | ||
sidebar_label: OrderLeg | ||
title: OrderLeg | ||
hide_title: true | ||
--- | ||
# `OrderLeg` | ||
|
||
A context type representing the details of an individual order leg, which MAY be used as part of an Order context when creating a new Order and MAY be transmitted separately to look up details of an existing OrderLeg. | ||
|
||
When the OrderLeg is part of an Order context with the intent to CREATE a new Order fields MUST be populated as indicated. | ||
|
||
When the intent is to lookup an OrderLeg in a downstream system at least one entry MUST be populated in the id field and other fields are NOT required. | ||
|
||
## Type | ||
|
||
`fdc3.orderLeg` | ||
|
||
## Schema | ||
|
||
https://fdc3.finos.org/scehmas/next/orderLeg.schema.json | ||
|
||
| Property| Type| Required| Example | ||
| -| -| -| - | ||
| `type` | String | Yes | `fdc3.orderLeg` | ||
| `id` | object | Yes | `{'OMS': '123456789-leg1'}` | ||
| `product` | object | Yes | `{'instrument': {'ticker':'MSFT'}} \| {'productDefinition': '...'}` | ||
| `product.instrument` | fdc3.Instrument | No | `{'instrument': {'ticker':'MSFT'}}` | ||
| `product.productDefinition` | object | No | `{'productDefinition': '...'}` | ||
| `quantity` | object | Yes | `{'units': 100000.00}` | ||
| `quantity.units` | double | No | `1000000.00` | ||
| `quantity.cashValue` | double | No | `5000000.00` | ||
| `quantity.proceedsFrom` | string | No | `{'OMS': '123456789-leg2'}` | ||
| `currency` | fdc3.currency | No | `{type: 'fdc3.currency', name: 'US Dollar', id: {CURRENCY_ISOCODE: "USD"}}` | ||
| `side` | string | Yes | `'B' \| 'S' \| 'P' \| 'R'...` | ||
| `price` | object | Yes | `{'orderType': 'limit', 'limitPrice': 123.45}` | ||
| `price.priceType` | string | No | `'absolute' \| 'percentage' \| 'yield' \| 'spread'...` | ||
| `price.orderType` | string | Yes | `'limit' \| 'market' \| 'stopMarket' \| 'stopLimit'...` | ||
| `price.limitPrice` | double | No | `1.15` | ||
| `price.stopPrice` | double | No | `1.20` | ||
| `settlement` | object | No | `{currency: {type: 'fdc3.currency', name: 'Pound Sterling', id: {CURRENCY_ISOCODE: "GBP"}, 'date': '2022-03-30T15:44:44+00:00'}` | ||
| `settlement.currency` | fdc3.currency | No | `{type: 'fdc3.currency', name: 'Pound Sterling', id: {CURRENCY_ISOCODE: "GBP"}` | ||
| `settlement.date` | string | No | `'2022-03-30T15:44:44+00:00'` | ||
| `allocations` | object[] | No | `[{'account': 'TRADEACCOUNT1', 'quantity': 1000000.00, 'positionEffect': 'O'}]` | ||
| `allocations[i].account` | string | Yes | `TRADEACCOUNT1` | ||
| `allocations[i].quantity` | double | No | `1000000.00` | ||
| `allocations[i].positionEffect` | string | No | `'O' \| 'C'` | ||
| `partyIdentifiers` | object[] | No | `[{'role': 'executingFirm', 'id': {'LEI': '549300UO56I4KIWC0U51'}]` | ||
| `partyIdentifiers[i].role` | string | Yes | `'executingFirm'` | ||
| `partyIdentifiers[i].id` | string | Yes | `{'LEI': '549300UO56I4KIWC0U51'}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/order.schema.json", | ||
"type": "object", | ||
"title": "Order", | ||
"allOf": [ | ||
{ | ||
"$ref": "context.schema.json#" | ||
} | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "fdc3.order" | ||
}, | ||
"id": { | ||
"properties": { | ||
"EMS": { | ||
"type": "string" | ||
}, | ||
"OMS": { | ||
"type": "string" | ||
}, | ||
"PMS": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"sendingTime": { | ||
"type": "string" | ||
}, | ||
"timeInForce": { | ||
"$ref": "timerange.schema.json#" | ||
}, | ||
"orderLegs": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "orderLeg.schema.json#" | ||
} | ||
}, | ||
"notes": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/orderLeg.schema.json", | ||
"type": "object", | ||
"title": "orderLeg", | ||
"allOf": [ | ||
{ | ||
"$ref": "context.schema.json#" | ||
} | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "fdc3.orderLeg" | ||
}, | ||
"id": { | ||
"properties": { | ||
"EMS": { | ||
"type": "string" | ||
}, | ||
"OMS": { | ||
"type": "string" | ||
}, | ||
"PMS": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"product": { | ||
"type": "object", | ||
"properties": { | ||
"oneof": { | ||
"instrument": { | ||
"$ref": "instrument.schema.json#" | ||
}, | ||
"productDefinition": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
}, | ||
"quantity": { | ||
"type": "object", | ||
"properties": { | ||
"oneof": { | ||
"units": { | ||
"type": "number" | ||
}, | ||
"cashValue": { | ||
"type": "number" | ||
}, | ||
"proceedsFrom": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"currency": { | ||
"$ref": "currency.schema.json#" | ||
}, | ||
"side": { | ||
"type": "string", | ||
"enum": [ | ||
"B", | ||
"S", | ||
"P", | ||
"R", | ||
"BS", | ||
"SS" | ||
] | ||
}, | ||
"price": { | ||
"type": "object", | ||
"properties": { | ||
"orderType": { | ||
"type": "string", | ||
"enum": [ | ||
"limit", | ||
"market", | ||
"stopMarket", | ||
"stopLimit" | ||
] | ||
}, | ||
"limitPrice": { | ||
"type": "number" | ||
}, | ||
"stopPrice": { | ||
"type": "number" | ||
}, | ||
"priceType": { | ||
"type": "string", | ||
"enum": [ | ||
"absolute", | ||
"percentage", | ||
"yield", | ||
"spread" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"orderType" | ||
] | ||
}, | ||
"settlement": { | ||
"type": "object", | ||
"properties": { | ||
"currency": { | ||
"$ref": "currency.schema.json#" | ||
}, | ||
"date": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"allocations": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"account": { | ||
"type": "string" | ||
}, | ||
"quantity": { | ||
"type": "number" | ||
}, | ||
"positionEffect": { | ||
"type": "string", | ||
"enum": [ | ||
"O", | ||
"C" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"account" | ||
] | ||
} | ||
}, | ||
"partyIdentifiers": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"role": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "object", | ||
"properties": { | ||
"LEI": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"id", | ||
"price", | ||
"side", | ||
"product", | ||
"quantity" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/order.schema.json", | ||
"type": "object", | ||
"title": "Order", | ||
"allOf": [ | ||
{ | ||
"$ref": "context.schema.json#" | ||
} | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "fdc3.order" | ||
}, | ||
"id": { | ||
"properties": { | ||
"EMS": { | ||
"type": "string" | ||
}, | ||
"OMS": { | ||
"type": "string" | ||
}, | ||
"PMS": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"sendingTime": { | ||
"type": "string" | ||
}, | ||
"timeInForce": { | ||
"$ref": "timerange.schema.json#" | ||
}, | ||
"orderLegs": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "orderLeg.schema.json#" | ||
} | ||
}, | ||
"notes": { | ||
"type": "string" | ||
} | ||
} | ||
} |
Oops, something went wrong.