@reyaxyz/api-v2-sdk 0.301.3 → 0.301.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rest/apis/MarketDataApi.js +1 -1
- package/dist/rest/apis/MarketDataApi.js.map +1 -1
- package/dist/rest/apis/OrderEntryApi.js +1 -1
- package/dist/rest/apis/OrderEntryApi.js.map +1 -1
- package/dist/rest/apis/ReferenceDataApi.js +1 -1
- package/dist/rest/apis/ReferenceDataApi.js.map +1 -1
- package/dist/rest/apis/SpecsApi.js +1 -1
- package/dist/rest/apis/SpecsApi.js.map +1 -1
- package/dist/rest/apis/WalletDataApi.js +1 -1
- package/dist/rest/apis/WalletDataApi.js.map +1 -1
- package/dist/rest/models/index.js +5 -152
- package/dist/rest/models/index.js.map +1 -1
- package/dist/rest/runtime.js +1 -1
- package/dist/rest/runtime.js.map +1 -1
- package/dist/types/rest/apis/MarketDataApi.d.ts +1 -1
- package/dist/types/rest/apis/OrderEntryApi.d.ts +1 -1
- package/dist/types/rest/apis/ReferenceDataApi.d.ts +1 -1
- package/dist/types/rest/apis/SpecsApi.d.ts +1 -1
- package/dist/types/rest/apis/WalletDataApi.d.ts +1 -1
- package/dist/types/rest/models/index.d.ts +153 -454
- package/dist/types/rest/models/index.d.ts.map +1 -1
- package/dist/types/rest/runtime.d.ts +1 -1
- package/dist/types/websocket/types.d.ts +53 -51
- package/dist/types/websocket/types.d.ts.map +1 -1
- package/dist/websocket/types.js +4 -47
- package/dist/websocket/types.js.map +1 -1
- package/package.json +2 -2
- package/rest/apis/MarketDataApi.ts +1 -1
- package/rest/apis/OrderEntryApi.ts +1 -1
- package/rest/apis/ReferenceDataApi.ts +1 -1
- package/rest/apis/SpecsApi.ts +1 -1
- package/rest/apis/WalletDataApi.ts +1 -1
- package/rest/models/index.ts +153 -496
- package/rest/runtime.ts +1 -1
- package/websocket/types.ts +63 -77
package/rest/runtime.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reya DEX Trading API v2
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.0.
|
|
7
|
+
* The version of the OpenAPI document: 2.0.6
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/websocket/types.ts
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WebSocket Types for Reya DEX Trading API v2
|
|
3
3
|
*
|
|
4
|
-
* Generated from AsyncAPI specification using AsyncAPI Modelina.
|
|
4
|
+
* Generated from AsyncAPI specification using AsyncAPI CLI + Modelina.
|
|
5
5
|
* These types can be used to implement WebSocket clients.
|
|
6
6
|
*
|
|
7
7
|
* AsyncAPI Spec: specs/asyncapi-trading-v2.yaml
|
|
8
|
-
* Generated: $(date)
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
10
|
// WebSocket connection servers
|
|
12
11
|
export const WebSocketServers = {
|
|
13
12
|
production: 'wss://ws.reya.xyz',
|
|
14
|
-
staging: 'wss://ws-staging.reya.xyz'
|
|
13
|
+
staging: 'wss://ws-staging.reya.xyz',
|
|
14
|
+
test: 'wss://websocket-testnet.reya.xyz'
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
export type ChannelDataMessageType = "channel_data";
|
|
18
18
|
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
export interface ErrorMessagePayload {
|
|
20
|
+
type: ErrorMessageType;
|
|
21
|
+
message: string;
|
|
22
|
+
channel?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export type ErrorMessageType = "error";
|
|
26
|
+
|
|
27
|
+
export type ExecutionType = "ORDER_MATCH" | "LIQUIDATION" | "ADL";
|
|
28
|
+
|
|
25
29
|
export interface MarketPerpExecutionUpdatePayload {
|
|
26
|
-
type:
|
|
30
|
+
type: ChannelDataMessageType;
|
|
27
31
|
timestamp: number;
|
|
28
32
|
channel: string;
|
|
29
33
|
data: PerpExecution[];
|
|
30
|
-
additionalProperties?: Map<string, any>;
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
36
|
export interface MarketSummary {
|
|
35
37
|
symbol: string;
|
|
36
38
|
updatedAt: number;
|
|
@@ -50,19 +52,19 @@ export interface MarketSummary {
|
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export interface MarketSummaryUpdatePayload {
|
|
53
|
-
type:
|
|
55
|
+
type: ChannelDataMessageType;
|
|
54
56
|
timestamp: number;
|
|
55
57
|
channel: string;
|
|
56
58
|
data: MarketSummary;
|
|
57
|
-
additionalProperties?: Map<string, any>;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
export type MarketsSummaryChannel = "/v2/markets/summary";
|
|
62
|
+
|
|
60
63
|
export interface MarketsSummaryUpdatePayload {
|
|
61
|
-
type:
|
|
64
|
+
type: ChannelDataMessageType;
|
|
62
65
|
timestamp: number;
|
|
63
|
-
channel:
|
|
66
|
+
channel: MarketsSummaryChannel;
|
|
64
67
|
data: MarketSummary[];
|
|
65
|
-
additionalProperties?: Map<string, any>;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
export interface Order {
|
|
@@ -85,27 +87,15 @@ export interface Order {
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export interface OrderChangeUpdatePayload {
|
|
88
|
-
type:
|
|
90
|
+
type: ChannelDataMessageType;
|
|
89
91
|
timestamp: number;
|
|
90
92
|
channel: string;
|
|
91
93
|
data: Order[];
|
|
92
|
-
additionalProperties?: Map<string, any>;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export enum OrderStatus {
|
|
97
|
-
OPEN = "OPEN",
|
|
98
|
-
FILLED = "FILLED",
|
|
99
|
-
CANCELLED = "CANCELLED",
|
|
100
|
-
REJECTED = "REJECTED",
|
|
101
94
|
}
|
|
102
95
|
|
|
96
|
+
export type OrderStatus = "OPEN" | "FILLED" | "CANCELLED" | "REJECTED";
|
|
103
97
|
|
|
104
|
-
export
|
|
105
|
-
LIMIT = "LIMIT",
|
|
106
|
-
TP = "TP",
|
|
107
|
-
SL = "SL",
|
|
108
|
-
}
|
|
98
|
+
export type OrderType = "LIMIT" | "TP" | "SL";
|
|
109
99
|
|
|
110
100
|
export interface PerpExecution {
|
|
111
101
|
exchangeId: number;
|
|
@@ -121,18 +111,20 @@ export interface PerpExecution {
|
|
|
121
111
|
additionalProperties?: Map<string, any>;
|
|
122
112
|
}
|
|
123
113
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
type: 'ping';
|
|
114
|
+
export interface PingMessagePayload {
|
|
115
|
+
type: PingMessageType;
|
|
127
116
|
timestamp?: number;
|
|
128
117
|
}
|
|
129
118
|
|
|
119
|
+
export type PingMessageType = "ping";
|
|
130
120
|
|
|
131
|
-
export interface
|
|
132
|
-
type:
|
|
121
|
+
export interface PongMessagePayload {
|
|
122
|
+
type: PongMessageType;
|
|
133
123
|
timestamp?: number;
|
|
134
124
|
}
|
|
135
125
|
|
|
126
|
+
export type PongMessageType = "pong";
|
|
127
|
+
|
|
136
128
|
export interface Position {
|
|
137
129
|
exchangeId: number;
|
|
138
130
|
symbol: string;
|
|
@@ -146,14 +138,12 @@ export interface Position {
|
|
|
146
138
|
}
|
|
147
139
|
|
|
148
140
|
export interface PositionUpdatePayload {
|
|
149
|
-
type:
|
|
141
|
+
type: ChannelDataMessageType;
|
|
150
142
|
timestamp: number;
|
|
151
143
|
channel: string;
|
|
152
144
|
data: Position[];
|
|
153
|
-
additionalProperties?: Map<string, any>;
|
|
154
145
|
}
|
|
155
146
|
|
|
156
|
-
|
|
157
147
|
export interface Price {
|
|
158
148
|
symbol: string;
|
|
159
149
|
oraclePrice: string;
|
|
@@ -163,64 +153,60 @@ export interface Price {
|
|
|
163
153
|
}
|
|
164
154
|
|
|
165
155
|
export interface PriceUpdatePayload {
|
|
166
|
-
type:
|
|
156
|
+
type: ChannelDataMessageType;
|
|
167
157
|
timestamp: number;
|
|
168
158
|
channel: string;
|
|
169
159
|
data: Price;
|
|
170
|
-
additionalProperties?: Map<string, any>;
|
|
171
160
|
}
|
|
172
161
|
|
|
162
|
+
export type PricesChannel = "/v2/prices";
|
|
163
|
+
|
|
173
164
|
export interface PricesUpdatePayload {
|
|
174
|
-
type:
|
|
165
|
+
type: ChannelDataMessageType;
|
|
175
166
|
timestamp: number;
|
|
176
|
-
channel:
|
|
167
|
+
channel: PricesChannel;
|
|
177
168
|
data: Price[];
|
|
178
|
-
additionalProperties?: Map<string, any>;
|
|
179
169
|
}
|
|
180
170
|
|
|
171
|
+
export type Side = "B" | "A";
|
|
181
172
|
|
|
182
|
-
export
|
|
183
|
-
|
|
184
|
-
|
|
173
|
+
export interface SubscribeMessagePayload {
|
|
174
|
+
type: SubscribeMessageType;
|
|
175
|
+
channel: string;
|
|
176
|
+
id?: string;
|
|
185
177
|
}
|
|
186
178
|
|
|
179
|
+
export type SubscribeMessageType = "subscribe";
|
|
187
180
|
|
|
188
|
-
export
|
|
189
|
-
|
|
190
|
-
|
|
181
|
+
export interface SubscribedMessagePayload {
|
|
182
|
+
type: SubscribedMessageType;
|
|
183
|
+
channel: string;
|
|
184
|
+
contents?: Map<string, any>;
|
|
191
185
|
}
|
|
192
186
|
|
|
193
|
-
export
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
export type SubscribedMessageType = "subscribed";
|
|
188
|
+
|
|
189
|
+
export type TimeInForce = "IOC" | "GTC";
|
|
190
|
+
|
|
191
|
+
export interface UnsubscribeMessagePayload {
|
|
192
|
+
type: UnsubscribeMessageType;
|
|
196
193
|
channel: string;
|
|
197
|
-
|
|
198
|
-
additionalProperties?: Map<string, any>;
|
|
194
|
+
id?: string;
|
|
199
195
|
}
|
|
200
196
|
|
|
197
|
+
export type UnsubscribeMessageType = "unsubscribe";
|
|
201
198
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
| PositionUpdatePayload
|
|
207
|
-
| OrderChangeUpdatePayload
|
|
208
|
-
| MarketPerpExecutionUpdatePayload
|
|
209
|
-
| WalletPerpExecutionUpdatePayload
|
|
210
|
-
| PricesUpdatePayload
|
|
211
|
-
| PriceUpdatePayload;
|
|
212
|
-
|
|
213
|
-
export type WebSocketMessage = UpdatePayload | PingMessage | PongMessage;
|
|
199
|
+
export interface UnsubscribedMessagePayload {
|
|
200
|
+
type: UnsubscribedMessageType;
|
|
201
|
+
channel: string;
|
|
202
|
+
}
|
|
214
203
|
|
|
215
|
-
|
|
216
|
-
export const isUpdatePayload = (message: WebSocketMessage): message is UpdatePayload => {
|
|
217
|
-
return message.type === 'channel_data';
|
|
218
|
-
};
|
|
204
|
+
export type UnsubscribedMessageType = "unsubscribed";
|
|
219
205
|
|
|
220
|
-
export
|
|
221
|
-
|
|
222
|
-
|
|
206
|
+
export interface WalletPerpExecutionUpdatePayload {
|
|
207
|
+
type: ChannelDataMessageType;
|
|
208
|
+
timestamp: number;
|
|
209
|
+
channel: string;
|
|
210
|
+
data: PerpExecution[];
|
|
211
|
+
}
|
|
223
212
|
|
|
224
|
-
export const isPongMessage = (message: WebSocketMessage): message is PongMessage => {
|
|
225
|
-
return message.type === 'pong';
|
|
226
|
-
};
|