forked from finos/traderX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
107 lines (106 loc) · 2.59 KB
/
openapi.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
openapi: 3.0.1
info:
title: "Position Service - TraderX"
version: "1.0"
paths:
/health:
get:
operationId: health
responses:
"200":
description: Simple Healthcheck Endpoint
content:
"application/json":
schema:
type: object
example: { "State" : "HEALTHY" }
/trades:
get:
operationId: getTradesByAccount
description: "Gets trades for a specific account"
parameters:
- in: query
name: account_id
required: true
schema:
type: integer
format: int32
description: "The ID of the account"
responses:
'200':
description: An array of all trades for a specific account
content:
'application/json':
schema:
type: array
items:
$ref: '#/components/schemas/Trade'
/positions:
get:
operationId: getPositionsByAccount
description: "Gets all Positions for a specific account"
parameters:
- in: query
name: account_id
required: true
schema:
type: integer
format: int32
description: "The ID of the account"
responses:
'200':
description: An array of all positions for a specific account
content:
'application/json':
schema:
type: array
items:
$ref: '#/components/schemas/Position'
components:
schemas:
Position:
type: object
properties:
accountId:
type: integer
format: int32
example: 10001
quantity:
type: integer
format: int32
example: -2000
security:
type: string
example: "XXXY"
updated:
type: string
format: date-time
Trade:
type: object
properties:
accountId:
type: integer
format: int32
example: 100001
id:
type: string
description: "Trade ID (unique ID)"
example: "01AN4Z07BY79KA1307SR9X4MV3"
created:
type: string
format: date-time
quantity:
type: integer
format: int32
security:
type: string
example: 'XXXY'
state:
type: string
example: 'Settled'
side:
type: string
example: 'Buy or Sell'
updated:
type: string
format: date-time