Skip to content
This repository was archived by the owner on Mar 23, 2022. It is now read-only.

Commit 0715036

Browse files
authored
Merge pull request #99 from zhangbanger/patch-1
Add trade event and fix name in openapi
2 parents cbabcbc + b16e4cd commit 0715036

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

assets/openapi.yaml

+69-1
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,32 @@ components:
18431843
- status_to
18441844
- reason
18451845
- at
1846+
TradeUpdatesEvent:
1847+
description: ''
1848+
type: object
1849+
title: TradeUpdatesEvent
1850+
properties:
1851+
account_id:
1852+
type: string
1853+
minLength: 1
1854+
at:
1855+
type: string
1856+
minLength: 1
1857+
event:
1858+
type: string
1859+
event_id:
1860+
type: integer
1861+
execution_id:
1862+
type: integer
1863+
order:
1864+
$ref: '#/components/schemas/Order'
1865+
required:
1866+
- account_id
1867+
- at
1868+
- event
1869+
- event_id
1870+
- execution_id
1871+
- order
18461872
Watchlist:
18471873
title: Watchlist
18481874
type: object
@@ -1866,7 +1892,6 @@ components:
18661892
format: date-time
18671893
name:
18681894
type: string
1869-
pattern: '^[a-zA-Z0-9]+$'
18701895
assets:
18711896
type: array
18721897
items:
@@ -2983,6 +3008,49 @@ paths:
29833008
schema:
29843009
$ref: '#/components/schemas/AccountStatusEvent'
29853010
examples: {}
3011+
/events/trades:
3012+
get:
3013+
security:
3014+
- BasicAuth: [ ]
3015+
summary: Subscribe to events related to trade updates (SSE).
3016+
tags:
3017+
- Trading
3018+
- Events
3019+
description: |
3020+
Query Params Rules:
3021+
- `since` required if `until` specified
3022+
- `since_id` required if `until_id` specified
3023+
- `since` and `since_id` can’t be used at the same time
3024+
Behavior:
3025+
- if `since` or `since_id` not specified this will not return any historic data
3026+
- if `until` or `until_id` reached stream will end (status 200)
3027+
parameters:
3028+
- name: since
3029+
in: query
3030+
schema:
3031+
type: string
3032+
format: date-time
3033+
- name: until
3034+
in: query
3035+
schema:
3036+
type: string
3037+
format: date-time
3038+
- name: since_id
3039+
in: query
3040+
schema:
3041+
type: integer
3042+
- name: until_id
3043+
in: query
3044+
schema:
3045+
type: integer
3046+
responses:
3047+
'200':
3048+
description: Connected.
3049+
content:
3050+
application/json:
3051+
schema:
3052+
$ref: '#/components/schemas/TradeUpdatesEvent'
3053+
examples: { }
29863054
/events/journals/status:
29873055
get:
29883056
security:

0 commit comments

Comments
 (0)