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

Add trade event and fix name #99

Merged
merged 2 commits into from
Dec 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 70 additions & 2 deletions assets/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,32 @@ components:
- status_to
- reason
- at
TradeUpdatesEvent:
description: ''
type: object
title: TradeUpdatesEvent
properties:
account_id:
type: string
minLength: 1
at:
type: string
minLength: 1
event:
type: string
event_id:
type: integer
execution_id:
type: integer
order:
$ref: '#/components/schemas/Order'
required:
- account_id
- at
- event
- event_id
- execution_id
- order
Watchlist:
title: Watchlist
type: object
Expand All @@ -1864,9 +1890,8 @@ components:
updated_at:
type: string
format: date-time
'':
name:
type: string
pattern: '^[a-zA-Z0-9]+$'
assets:
type: array
items:
Expand Down Expand Up @@ -2983,6 +3008,49 @@ paths:
schema:
$ref: '#/components/schemas/AccountStatusEvent'
examples: {}
/events/trades:
get:
security:
- BasicAuth: [ ]
summary: Subscribe to events related to trade updates (SSE).
tags:
- Trading
- Events
description: |
Query Params Rules:
- `since` required if `until` specified
- `since_id` required if `until_id` specified
- `since` and `since_id` can’t be used at the same time
Behavior:
- if `since` or `since_id` not specified this will not return any historic data
- if `until` or `until_id` reached stream will end (status 200)
parameters:
- name: since
in: query
schema:
type: string
format: date-time
- name: until
in: query
schema:
type: string
format: date-time
- name: since_id
in: query
schema:
type: integer
- name: until_id
in: query
schema:
type: integer
responses:
'200':
description: Connected.
content:
application/json:
schema:
$ref: '#/components/schemas/TradeUpdatesEvent'
examples: { }
/events/journals/status:
get:
security:
Expand Down