-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathforeign-exchange-single-legs.yaml
1286 lines (1142 loc) · 48.5 KB
/
foreign-exchange-single-legs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Bankable Assets API - FX Spots, Forwards and Non Deliverable Forwards
version: 0.1.0
description: >-
# Summary
Foreign exchange trade initiation and execution for FX spot, FX forward and non-deliverable forwards.
The API is to initiate and execute foreign exchange transactions. A foreign exchange transaction is an agreement between
two parties to buy one currency against selling another currency.
The FX spot transaction is an agreement to exchange currencies for settlement on the spot date.
The FX forward transaction is a contractual agreement to exchange a pair of currencies at a set rate on a future date.
The non-deliverable forward (NDF) functionality offers the possibility to cash-settle forward contracts of nonconvertible
foreign currencies. An NDF differs from a normal FX forward contract in that there is no physical settlement of the two
currencies at maturity. Instead, the contract is settled by calculating the difference between the contracted exchange
rate and the prevailing spot rate for an agreed upon notional amount of funds.
# Use Cases
This API covers the following use cases for **private clients** and **external asset managers**:
1. Retrieve all available information regarding current and completed orders, including their status
2. Request foreign exchange trade for a single client account
3. Request the cancellation of a not executed foreign exchange order.
# General Remarks
* This API definition is inspired by the ISO 20022 standard messages
[ForeignExchangeTradeCaptureReportV01 (fxtr.031)](https://www.iso20022.org/standardsrepository/type/fxtr.031.001.01),
[ForeignExchangeTradeInstructionV04 (fxtr.014)](https://www.iso20022.org/standardsrepository/type/fxtr.014.001.04) and
in coordination with the Bankable Assets API for Securities Orders.
* Schemas are generally based on datatype definitions with the same name in the
[ISO 20022 Repository](https://www.iso20022.org/standardsrepository).
In some cases, schemas may correspond to a restrictive version of the standard datatype definition without some
or all optional fields.
Any other deviations to the standard datatype definition are explicitly described below.
* Pagination is not described in any defined
[Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object).
A productive implementation of this API may support additional query parameters for implementing pagination
according to the possibilities of the underlying systems.
These additional query parameters must be optional and they must not clash with any parameter here defined.
To allow implementing pagination and avoid clashes, this API will not use the following parameters names
in this or future versions of the API: `limit`, `offset` and `cursor`.
* According to the definition of
[Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-object)
in the OpenAPI Specification:
*If `in` is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter
definition SHALL be ignored.* Therefore:
* The parameter `"Accept"` will not be defined in this file at any place.
* The parameters `"Content-Type"` and `"Authorization"` are implicitly defined by the fields `content` in
[Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#response-object)
and `security` in
[Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object).
contact:
name: Open Banking Project Switzerland
url: https://www.openbankingproject.ch
email: [email protected]
servers:
# --------------------------------------------------------------------------------------------------------------------
# SERVERS
# --------------------------------------------------------------------------------------------------------------------
- url: /api1/foreign-exchange-single-legs
description: Development server
paths:
# --------------------------------------------------------------------------------------------------------------------
# PATHS
# --------------------------------------------------------------------------------------------------------------------
/orders:
get: # OrderCollection
tags:
- Orders
summary: Get all foreign exchange orders
description: >-
Get a collection of foreign exchange orders.
operationId: getOrders
parameters:
- $ref: '#/components/parameters/Accept-Language'
responses:
'200':
$ref: '#/components/responses/OK_200_OrderCollection'
'400':
$ref: '#/components/responses/BAD_REQUEST_400'
'401':
$ref: '#/components/responses/UNAUTHORIZED_401'
post: # OrderCreation
tags:
- Orders
summary: Add new foreign exchange order
description: >-
Generate new foreign exchange order
operationId: postOrder
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ForeignExchangeSingleLeg'
responses:
'201':
$ref: '#/components/responses/CREATED_201_OrderCreation'
'202':
$ref: '#/components/responses/ACCEPTED_202_OrderCreation'
'400':
$ref: '#/components/responses/BAD_REQUEST_400'
'401':
$ref: '#/components/responses/UNAUTHORIZED_401'
'403':
$ref: '#/components/responses/FORBIDDEN_403_Post'
'405':
$ref: '#/components/responses/METHOD_NOT_ALLOWED_405_Post'
/orders/{orderIdentification}:
get: # Order
tags:
- Orders
summary: Get single foreign exchange order
description: >-
*Get foreign exchange order identified by `orderIdentification`*.
operationId: getOrder
parameters:
- $ref: '#/components/parameters/OrderIdentification'
- $ref: '#/components/parameters/Accept-Language'
responses:
'200':
$ref: '#/components/responses/OK_200_Order'
'400':
$ref: '#/components/responses/BAD_REQUEST_400'
'401':
$ref: '#/components/responses/UNAUTHORIZED_401'
'403':
$ref: '#/components/responses/FORBIDDEN_403'
'404':
$ref: '#/components/responses/NOT_FOUND_404'
put: # OrderModification
tags:
- Orders
summary: Update single foreign exchange order
description: >-
*Update foreign exchange order identified by `orderIdentification`.*
operationId: putOrder
parameters:
- $ref: '#/components/parameters/OrderIdentification'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ForeignExchangeSingleLeg'
responses:
'200':
$ref: '#/components/responses/OK_200_OrderModification'
'202':
$ref: '#/components/responses/ACCEPTED_202_OrderModification'
'400':
$ref: '#/components/responses/BAD_REQUEST_400'
'401':
$ref: '#/components/responses/UNAUTHORIZED_401'
'403':
$ref: '#/components/responses/FORBIDDEN_403'
'404':
$ref: '#/components/responses/NOT_FOUND_404'
'405':
$ref: '#/components/responses/METHOD_NOT_ALLOWED_405_Put'
delete: # OrderCancellation
tags:
- Orders
summary: Delete single foreign exchange order
description: >-
*Delete single foreign exchange order identified by `orderIdentification`.*
operationId: deleteOrder
parameters:
- $ref: '#/components/parameters/OrderIdentification'
responses:
'200':
$ref: '#/components/responses/OK_200_OrderCancellation'
'202':
$ref: '#/components/responses/ACCEPTED_202_OrderCancellation'
'400':
$ref: '#/components/responses/BAD_REQUEST_400'
'401':
$ref: '#/components/responses/UNAUTHORIZED_401'
'403':
$ref: '#/components/responses/FORBIDDEN_403'
'404':
$ref: '#/components/responses/NOT_FOUND_404'
'405':
$ref: '#/components/responses/METHOD_NOT_ALLOWED_405_Delete'
components:
# --------------------------------------------------------------------------------------------------------------------
# COMPONENTS
# --------------------------------------------------------------------------------------------------------------------
headers:
# ------------------------------------------------------------------------------------------------------------------
# COMPONENTS/HEADERS
# ------------------------------------------------------------------------------------------------------------------
Accept-Language:
description: >-
List of acceptable human languages for response.
[RFC 7231, Section 5.3.5]
schema:
type: string
example: da, en-gb;q=0.8, en;q=0.7
Content-Language:
description: >-
The natural language or languages of the intended audience for the enclosed content.
[RFC 7231, Section 3.1.3.2]
schema:
type: string
example: da
Last-Modified:
description: >-
Timestamp indicating the date and time at which the origin server believes the selected representation
was last modified, as determined at the conclusion of handling the request.
[RFC 7232, Section 2.2]
schema:
type: string
example: 'Tue, 15 Nov 1994 12:45:26 GMT' # HTTP-date
Location:
description: >-
Used in redirection, or when a new resource has been created.
[RFC 7231, Section 7.1.2]
schema:
type: string
example: '/pub/WWW/People.html'
WWW-Authenticate:
description: >-
Indicates the authentication scheme that should be used to access the requested entity.
[RFC 7235, Section 4.1]
schema:
type: string
example: 'Basic'
parameters:
# ------------------------------------------------------------------------------------------------------------------
# COMPONENTS/PARAMETERS
# ------------------------------------------------------------------------------------------------------------------
OrderIdentification:
name: orderIdentification
in: path
description: Identification for the order as assigned by the receiving party.
required: true
schema:
$ref: '#/components/schemas/Max35Text'
Accept-Language:
name: Accept-Language
in: header
description: List of acceptable human languages for response. [RFC 7231, Section 5.3.5]
schema:
type: string
example: da, en-gb;q=0.8, en;q=0.7
responses:
# ------------------------------------------------------------------------------------------------------------------
# COMPONENTS/RESPONSES
# ------------------------------------------------------------------------------------------------------------------
OK_200_OrderCollection:
description: >-
The requested collection of foreign exchange order orders is delivered in the response.
*The 200 (OK) status code indicates that the request has succeeded.*
[RFC 7231, Section 6.3.1]
headers:
Content-Language:
$ref: '#/components/headers/Content-Language'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ForeignExchangeSingleLeg'
OK_200_Order:
description: >-
The requested foreign exchange order is delivered in the response.
*The 200 (OK) status code indicates that the request has succeeded.*
[RFC 7231, Section 6.3.1]
headers:
Content-Language:
$ref: '#/components/headers/Content-Language'
Last-Modified:
$ref: '#/components/headers/Last-Modified'
content:
application/json:
schema:
$ref: '#/components/schemas/ForeignExchangeSingleLeg'
OK_200_OrderModification:
description: >-
The foreign exchange order has been modified.
*The 200 (OK) status code indicates that the request has succeeded.*
[RFC 7231, Section 6.3.1]
OK_200_OrderCancellation:
description: >-
The foreign exchange order has been cancelled.
*The 200 (OK) status code indicates that the request has succeeded.*
[RFC 7231, Section 6.3.1]
CREATED_201_OrderCreation:
description: >-
The foreign exchange order has been accepted, processed and it is now available at the
URI delivered in the Location header field of this response.
*The 201 (Created) status code indicates that the request has been
fulfilled and has resulted in one resource being
created. The resource created by the request is identified
by a Location header field in the response.*
[RFC7231, Section 6.3.2]
headers:
Location:
$ref: '#/components/headers/Location'
ACCEPTED_202_OrderCreation:
description: >-
The foreign exchange order has been accepted and will be processed asynchronously.
*The 202 (Accepted) status code indicates that the request has been
accepted for processing, but the processing has not been completed.
The request might or might not eventually be acted upon, as it might
be disallowed when processing actually takes place. There is no
facility in HTTP for re-sending a status code from an asynchronous
operation.*
[RFC 7231, Section 6.3.3]
ACCEPTED_202_OrderModification:
description: >-
The order modification has been requested and the foreign exchange order is now waiting for the broker to accept
or reject the modification.
*The 202 (Accepted) status code indicates that the request has been
accepted for processing, but the processing has not been completed.
The request might or might not eventually be acted upon, as it might
be disallowed when processing actually takes place. There is no
facility in HTTP for re-sending a status code from an asynchronous
operation.*
[RFC 7231, Section 6.3.3]
ACCEPTED_202_OrderCancellation:
description: >-
The order cancellation has been requested and the foreign exchange order is now waiting for the broker to accept
or reject the cancellation.
*The 202 (Accepted) status code indicates that the request has been
accepted for processing, but the processing has not been completed.
The request might or might not eventually be acted upon, as it might
be disallowed when processing actually takes place. There is no
facility in HTTP for re-sending a status code from an asynchronous
operation.*
[RFC 7231, Section 6.3.3]
BAD_REQUEST_400:
description: >-
The request indicates that the server was unable to process the request sent by the client due to invalid syntax.
*The 400 (Bad Request) status code indicates that the server cannot or
will not process the request due to something that is perceived to be
a client error (e.g., malformed request syntax, invalid request
message framing, or deceptive request routing).*
[RFC 7231, Section 6.5.1]
content:
application/json:
schema:
type: object
properties:
message:
type: string
UNAUTHORIZED_401:
description: >-
The request has no authentication credentials for the target resource or the authentication credentials
are not valid.
*The 401 (Unauthorized) status code indicates that the request has not
been applied because it lacks valid authentication credentials for
the target resource. The server generating a 401 response MUST send
a WWW-Authenticate header field (Section 4.1) containing at least one
challenge applicable to the target resource.*
[RFC 7235, Section 3.1]
headers:
WWW-Authenticate:
$ref: '#/components/headers/WWW-Authenticate'
FORBIDDEN_403:
description: >-
The request has valid authentication credentials but they are not sufficient for the server to grant access
to the target resource.
In case that the server wants to hide the fact that the target resource even exists it may send a
404 (Not Found) status code instead of this 403 (Forbidden) status code.
*The 403 (Forbidden) status code indicates that the server understood
the request but refuses to authorize it. A server that wishes to
make public why the request has been forbidden can describe that
reason in the response payload (if any).*
[RFC 7231, Section 6.5.3]
FORBIDDEN_403_Post:
description: >-
The request has valid authentication credentials but they are not sufficient for the server to allow the
creation of the target resource.
*The 403 (Forbidden) status code indicates that the server understood
the request but refuses to authorize it. A server that wishes to
make public why the request has been forbidden can describe that
reason in the response payload (if any).*
[RFC 7231, Section 6.5.3]
NOT_FOUND_404:
description: >-
The target resource could not be found or the authentication credentials are not sufficient for the server
to grant access to it.
*The 404 (Not Found) status code indicates that the origin server did
not find a current representation for the target resource or is not
willing to disclose that one exists. A 404 status code does not
indicate whether this lack of representation is temporary or
permanent.*
[RFC 7231, Section 6.5.4]
METHOD_NOT_ALLOWED_405_Post:
description: >-
The creation of the target resource is not possible at this time.
*The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource. The origin server MUST generate an
Allow header field in a 405 response containing a list of the target
resource's currently supported methods.*
[RFC 7231, Section 6.5.5]
METHOD_NOT_ALLOWED_405_Put:
description: >-
The modification of the target resource is not possible at this time.
*The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource. The origin server MUST generate an
Allow header field in a 405 response containing a list of the target
resource's currently supported methods.*
[RFC 7231, Section 6.5.5]
METHOD_NOT_ALLOWED_405_Delete:
description: >-
The deletion of the target resource is not possible at this time.
*The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource. The origin server MUST generate an
Allow header field in a 405 response containing a list of the target
resource's currently supported methods.*
[RFC 7231, Section 6.5.5]
schemas:
# ------------------------------------------------------------------------------------------------------------------
# COMPONENTS/SCHEMAS
# ------------------------------------------------------------------------------------------------------------------
AccountIdentification4Choice:
description: Specifies the unique identification of an account as assigned by the account servicer.
oneOf:
- title: IBAN
type: object
description: >-
International Bank Account Number (IBAN) - identifier used internationally by financial institutions to
uniquely identify the account of a customer. Further specifications of the format and content of the IBAN
can be found in the standard ISO 13616 "Banking and related financial services - International Bank Account
Number (IBAN)" version 1997-10-01, or later revisions.
properties:
iban:
$ref: '#/components/schemas/IBAN2007Identifier'
required:
- iban
- title: Other
type: object
description: >-
Unique identification of an account, as assigned by the account servicer, using an identification scheme.
properties:
other:
$ref: '#/components/schemas/GenericAccountIdentification1'
required:
- other
AccountSchemeName1Choice:
description: Sets of elements to identify a name of the identification scheme.
oneOf:
- type: object
title: Code
description: Name of the identification scheme, in a coded form as published in an external list.
properties:
code:
$ref: '#/components/schemas/ExternalAccountIdentification1Code'
required:
- code
- type: object
title: Proprietary
description: Name of the identification scheme, in a free tex.
properties:
proprietary:
$ref: '#/components/schemas/Max35Text'
required:
- proprietary
ActiveCurrencyAndAmount:
type: object
description: >-
A number of monetary units specified in an active currency where the unit of currency is explicit
and compliant with ISO 4217.
properties:
currency:
$ref: '#/components/schemas/ActiveCurrencyCode'
amount:
$ref: '#/components/schemas/ImpliedCurrencyAndAmount'
required:
- currency
- amount
ActiveCurrencyCode:
type: string
description: >-
A code allocated to a currency by a Maintenance Agency under an international identification scheme,
as described in the latest edition of the international standard ISO 4217 "Codes for the representation
of currencies and funds".
Validation Rules:
* ActiveCurrency: The currency code must be a valid active currency code, not yet withdrawn on the day
the message containing the currency is exchanged. Valid active currency codes are registered with the
ISO 4217 Maintenance Agency, consist of three (3) contiguous letters, and are not yet withdrawn on the
day the message containing the Currency is exchanged.
pattern: '^[A-Z]{3}$'
minLength: 3
maxLength: 3
ActiveOrHistoricCurrencyAndAmount:
type: object
description: >-
A number of monetary units specified in an active or a historic currency where the unit of currency
is explicit and compliant with ISO 4217.
properties:
currency:
$ref: '#/components/schemas/ActiveOrHistoricCurrencyCode'
amount:
$ref: '#/components/schemas/ImpliedCurrencyAndAmount'
required:
- currency
- amount
ActiveOrHistoricCurrencyCode:
type: string
description: >-
A code allocated to a currency by a Maintenance Agency under an international identification scheme,
as described in the latest edition of the international standard ISO 4217 "Codes for the representation
of currencies and funds".
Validation Rules:
* ActiveOrHistoricCurrency: The Currency Code must be registered, or have already been registered.
Valid active or historic currency codes are registered with the ISO 4217 Maintenance Agency,
consist of three (3) contiguous letters, and may be or not be withdrawn on the day the message containing
the Currency is exchanged.
pattern: '^[A-Z]{3}$'
minLength: 3
maxLength: 3
CashAccount38:
type: object
description: >-
Unique and unambiguous identification for the cash account between the account owner
and the account servicer.
properties:
identification:
$ref: '#/components/schemas/AccountIdentification4Choice'
required:
- identification
DecimalNumber:
type: string
description: >-
Number of objects represented as a decimal number, for example 0.75 or 45.6.
* Total number of digits: 18
* Number of digits in fractional part: 17
pattern: '^-?[0-9]{1,18}(\.[0-9]{1,17})?$'
minLength: 1
maxLength: 20
Exact4AlphaNumericText:
type: string
description: Specifies an alphanumeric string with a length of 4 characters.
pattern: '^[a-zA-Z0-9]{4}$'
minLength: 4
maxLength: 4
ExternalAccountIdentification1Code:
type: string
description: >-
Specifies the external account identification scheme name code in the format of character string with a
maximum length of 4 characters. The list of valid codes is an external code list published separately.
External code sets can be downloaded from www.iso20022.org.
minLength: 1
maxLength: 4
GenericAccountIdentification1:
type: object
properties:
identification:
description: Identification assigned by an institution.
allOf:
- $ref: '#/components/schemas/Max34Text'
schemeName:
description: Name of the identification scheme.
allOf:
- $ref: '#/components/schemas/AccountSchemeName1Choice'
issuer:
description: Entity that assigns the identification.
allOf:
- $ref: '#/components/schemas/Max35Text'
required:
- identification
IBAN2007Identifier:
type: string
description: >-
An identifier used internationally by financial institutions to uniquely identify the account of a customer
at a financial institution, as described in the latest edition of the international standard ISO 13616:
2007 - "Banking and related financial services - International Bank Account Number (IBAN)".
Validation Rules:
* IBAN: A valid IBAN consists of all three of the following components: Country Code, check digits and BBAN.
pattern: '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$'
minLength: 5
maxLength: 34
ImpliedCurrencyAndAmount:
type: string
description: >-
Number of monetary units specified in a currency where the unit of currency is implied by the context and
compliant with ISO 4217. The decimal separator is a dot.
Note: a zero amount is considered a positive amount.
* Total number of digits: 18
* Number of digits in fractional part: 5
* minInclusive: 0
pattern: '^[0-9]{1,18}(\.[0-9]{1,5})?$'
minLength: 1
maxLength: 19
InvestmentAccount58:
type: object
properties:
accountIdentification:
description: >-
Unique and unambiguous identification for the account between the account owner and the account servicer.
allOf:
- $ref: '#/components/schemas/Max35Text'
required:
- accountIdentification
GenericIdentification38:
type: object
description: Identification expressed as a proprietary type and narrative description.
properties:
identification:
description: Proprietary information, often a code, issued by the data source scheme issuer.
allOf:
- $ref: '#/components/schemas/Exact4AlphaNumericText'
issuer:
description: Entity that assigns the identification.
allOf:
- $ref: '#/components/schemas/Max35Text'
schemeName:
description: Short textual description of the scheme.
allOf:
- $ref: '#/components/schemas/Max35Text'
required:
- identification
- issuer
OrderStatusAndReason:
# Not part of the ISO 20022 Repository.
type: object
description: Specifies the current status of the order including a reason if applicable.
properties:
status:
$ref: '#/components/schemas/OrderStatusChoice'
reason:
$ref: '#/components/schemas/OrderStatusReasonChoice'
description:
description: Additional information regarding the current status of the order, in free text form.
allOf:
- $ref: '#/components/schemas/Max35Text'
required:
- status
OrderStatusChoice:
# Not part of the ISO 20022 Repository.
description: Choice of format for the order status.
oneOf:
- title: Code
type: object
description: Order status expressed as an ISO 20022 code.
properties:
code:
$ref: '#/components/schemas/OrderStatusCode'
required:
- code
- title: Proprietary
type: object
description: Order status expressed as a proprietary code.
properties:
proprietary:
$ref: '#/components/schemas/GenericIdentification38'
required:
- proprietary
OrderStatusCode:
type: string
description: Specifies the current status of the order.
enum:
- NEWW # New
- PENN # PendingNew
- DONE # Done
- CANP # PendingCancel
- CANC # Cancelled
- REJT # Rejected
- EXPI # Expired
- SETT # Settled
OrderStatusReasonChoice:
description: >-
Choice of format for the order status reason.
Note: Not part of the ISO 20022 Repository.
oneOf:
- title: Code
type: object
description: Order status reason expressed as an ISO 20022 code.
properties:
code:
$ref: '#/components/schemas/OrderStatusReasonCode'
required:
- code
- title: Proprietary
type: object
description: Order status reason expressed as a proprietary code.
properties:
proprietary:
$ref: '#/components/schemas/GenericIdentification38'
required:
- proprietary
OrderStatusReasonCode:
type: string
description: >-
Specifies the reason for the current status of the order.
Note: This is a combination of the ISO 20022 defitions CancelledStatusReasonV2Code and
RejectedStatusReasonCode.
enum:
# Cancellation
- CANI # CancelledByYourself
- CANS # CancelledBySystem
- CSUB # CancelledByAgent
- CANH # CancelledByHub
- CANP # CancelledByInstructingParty
- CANO # CancelledByOther
- CNTA # CancelledByTransferAgent
- CNCL # CancelledByClient
- CNIN # CancelledByIntermediary
- CANT # CancelledDueToTransformation
- CANZ # CancelledSplitPartialSettlement
- CORP # CancelledDueToCorporateAction
- CREG # CancelledByIssuerRegistrar
- CTHP # CancelledByThirdParty
- BYIY # CancelledDueToBuyIn
- SCEX # SecuritiesNoLongerEligible
- CXLR # EndOfLife
- NARR # NarrativeReason
- OTHR # Other
# Rejection
- DDAT # SettlementDate
- IAQD # AcquisitionDate
- POIN # DifferentValuationPoints
- ICAG # DeliveringAgent
- IDDB # DirectDebit
- INTE # Intermediary
- SAFE # InvestmentAccount
- IPAY # PaymentCard
- ICTR # InvalidCreditTransfer
- DEPT # SettlementPlace
- IVAG # ReceivingAgent
- ISAF # SafekeepingPlace
- DFOR # InvalidSecurityForm
- DSEC # FinancialInstrumentIdentification
- BLCA # AccountBlockedForCorporateAction
- BLTR # AccountBlockedForTransfer
- DOCC # AccountBlockedMissingDocuments
- MONY # NotEnoughCash
- SECU # NotEnoughFinancialInstrument
- IDNA # FinancialInstrumentIdentificationAndName
- UWAI # UnacceptedCommissionWaiving
- UDCY # UnacceptedDealCurrency
- UNAV # UnacceptedNAVCurrency
- UPAY # UnacceptedPaymentMethod
- URSC # UnacceptedRequestedSettlementCurrency
- SHIG # TooHighUnitsOrAmountToSubscribe
- SLOW # TooLowUnitsOrAmountToSubscribe
- ULNK # UnknownLinkagesReference
- DLVY # PhysicalDeliveryImpossible
- ORRF # DuplicateOrderReference
- IPAC # InstructingPartyNotAllowedForAccount
- IOTP # InvalidOrderType
- NSLA # NotCompliantWithSLA
- CUTO # CutOffTime
- REFE # InvalidOrUnrecognisedReference
- NALO # NotAllowedRequest
- COSE # AlreadyExecuted
- NALC # NotAllowedToCancel
- LEGL # LegallyImpossible
- OTHR # Other
- DQUA # FinancialInstrumentQuantity
- ICTN # CertificateNumber
- ISTP # SettlementParties
- LATE # TooLate
- ADEA # AfterDeadline
- DTRD # TradeDate
- FEEE # FeeOrCommission
- IEXE # SubscriberOrRedeemer
- NCRR # SettlementAmountCurrency
- PHYS # PhysicalSettlement
- PLCE # PlaceOfTrade
- SETR # SettlementTransaction
- RTGS # RTGSSystem
- NRGM # NoCancellationMatch
- INUK # InvestorNameAddressUnknown
- INID # InsufficientInvestorData
- INAC # InvalidAccountServicer
- INNA # InvalidNomineeAccount
- INPM # InvalidNewPlanManager
- CYPA # CurrentYearPartial
- PTNS # PartialNotSupported
- FTAX # FinancialInstrumentTaxYear
- ISAT # InvalidISAType
- CASH # InvalidCashAccount
- TREF # DuplicateTransferReference
- DMON # InvalidSettlementAmount
- ORDR # InvalidOrderedAmount
- BMIN # BelowMinimumInitialInvestmentAmount
- BMTO # BelowMinimumTopUpAmount
- INSU # InsufficientCapacity
- PRCT # PercentageHoldingBreach
- BMRA # BelowMinimumRedemptionAmount
- BMRV # BelowMinimumRetainedAmount
- LOCK # LockUp
- ILLI # AssetsIlliquid
- DINV # DataInvalid
- CLOS # FundClosed
- UNSC # UnacceptableSwitchCombination
- NCON # NotConvertable
- ACLO # AssetClosed
- NQTY # QuantityBelowMinimum
- NASS # AssetNotSupported
ISODate:
type: string
description: >-
A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This
representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October
2004" which is aligned with ISO 8601.
format: date
ISODateTime:
type: string
description: >-
A particular point in the progression of time defined by a mandatory date and a mandatory time component,
expressed in either UTC time format (YYYY-MM-DDThh:mm:ss.sssZ), local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm),
or local time format (YYYY-MM-DDThh:mm:ss.sss). These representations are defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
Beginning / end of calendar day:
00:00:00 = the beginning of a calendar day
24:00:00 = the end of a calendar day
Fractions of second in time format: Decimal fractions of seconds may be included. In this case, the involved parties shall agree
on the maximum number of digits that are allowed.
Max34Text:
type: string
description: Specifies a character string with a maximum length of 34 characters.
minLength: 1
maxLength: 34
Max35Text:
type: string
description: Specifies a character string with a maximum length of 35 characters.
minLength: 1
maxLength: 35
Side1Code:
type: string
description: Side1Code (BUYI,SELL), View from Instructing Party, buy/sell the trading currency/amount.
minLength: 4
maxLength: 4
enum:
- BUYI # Buy
- SELL # Sell
RateSourceText:
type: string
description: >-
Specifies a rate source for the non deliverable trade.
The values to be used for the settlement rate source are published in Annex A of the 1998 FX and Currency
Option Definitions (the FX definitions, as published by the International Swaps and Derivatives Association,
Inc., the Emerging Markets Traders Association and the Foreign Exchange Committee) as amended and
supplemented from time to time.
pattern: '^[a-zA-Z]{3}[0-9]{1,2}$'
Exact4NumericText:
type: string
description: Specifies the time "HHMM" associated with the rate source with an exact length of 4 digits.
pattern: '^[0-9]{4}$'
CountryCode:
type: string
description: Specifies the country code for the quoted rate source. Code to identify a country, a dependency, or another area of particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code).
pattern: '^[A-Z]{2,2}$'
UnderlyingProductIdentifier1Code:
type: string
description: Indicates the underlying product type for reporting to trade repositories. These product codes must be in line with the ISDA Product Taxonomy.
minLength: 4
maxLength: 4
enum:
- SPOT # ForeignExchangeSpot
- FORW # ForeignExchangeForward
- NDFO # ForeignExchangeNonDeliverableForward
OrderType2Code:
type: string
description: Specifies a type of order based on the Financial Information Exchange Protocol.
enum:
- MRKT # Market
- LMTO # Limit
- STOP # Stop
- STLI # StopLimit
# Later Release
# - PRQT # PreviouslyQuoted
# - PRID # PreviouslyIndicated
# Not used in FX
# - LIWI # LimitWith
# - LIWO # LimitWithout
# - BAPR # OnBasisPrice
# - MATH # MarketTouched
# - WTWO # WithOrWithout
# - FXSW # ForexSwap