@reyaxyz/api-v2-sdk 0.301.1 → 0.301.3

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.
Files changed (40) hide show
  1. package/dist/rest/apis/MarketDataApi.js +1 -1
  2. package/dist/rest/apis/MarketDataApi.js.map +1 -1
  3. package/dist/rest/apis/OrderEntryApi.js +1 -1
  4. package/dist/rest/apis/OrderEntryApi.js.map +1 -1
  5. package/dist/rest/apis/ReferenceDataApi.js +1 -1
  6. package/dist/rest/apis/ReferenceDataApi.js.map +1 -1
  7. package/dist/rest/apis/SpecsApi.js +189 -0
  8. package/dist/rest/apis/SpecsApi.js.map +1 -0
  9. package/dist/rest/apis/WalletDataApi.js +47 -1
  10. package/dist/rest/apis/WalletDataApi.js.map +1 -1
  11. package/dist/rest/apis/index.js +1 -0
  12. package/dist/rest/apis/index.js.map +1 -1
  13. package/dist/rest/models/index.js.map +1 -1
  14. package/dist/rest/runtime.js +1 -1
  15. package/dist/rest/runtime.js.map +1 -1
  16. package/dist/types/rest/apis/MarketDataApi.d.ts +1 -1
  17. package/dist/types/rest/apis/OrderEntryApi.d.ts +1 -1
  18. package/dist/types/rest/apis/ReferenceDataApi.d.ts +1 -1
  19. package/dist/types/rest/apis/SpecsApi.d.ts +38 -0
  20. package/dist/types/rest/apis/SpecsApi.d.ts.map +1 -0
  21. package/dist/types/rest/apis/WalletDataApi.d.ts +15 -2
  22. package/dist/types/rest/apis/WalletDataApi.d.ts.map +1 -1
  23. package/dist/types/rest/apis/index.d.ts +1 -0
  24. package/dist/types/rest/apis/index.d.ts.map +1 -1
  25. package/dist/types/rest/models/index.d.ts +27 -2
  26. package/dist/types/rest/models/index.d.ts.map +1 -1
  27. package/dist/types/rest/runtime.d.ts +1 -1
  28. package/dist/types/websocket/types.d.ts +2 -2
  29. package/dist/types/websocket/types.d.ts.map +1 -1
  30. package/dist/websocket/types.js.map +1 -1
  31. package/package.json +2 -2
  32. package/rest/apis/MarketDataApi.ts +1 -1
  33. package/rest/apis/OrderEntryApi.ts +1 -1
  34. package/rest/apis/ReferenceDataApi.ts +1 -1
  35. package/rest/apis/SpecsApi.ts +82 -0
  36. package/rest/apis/WalletDataApi.ts +38 -1
  37. package/rest/apis/index.ts +1 -0
  38. package/rest/models/index.ts +27 -2
  39. package/rest/runtime.ts +1 -1
  40. package/websocket/types.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["websocket/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+BAA+B;AAClB,QAAA,gBAAgB,GAAG;IAC9B,UAAU,EAAE,mBAAmB;IAC/B,OAAO,EAAE,2BAA2B;CAC5B,CAAC;AAEX,qCAAqC;AAErC,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4BAAW,CAAA;AACb,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAyED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAGD,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,sBAAS,CAAA;IACT,sBAAS,CAAA;AACX,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AA0ED,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,eAAO,CAAA;IACP,eAAO,CAAA;AACT,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAGD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,0BAAW,CAAA;AACb,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAwBD,qCAAqC;AAC9B,IAAM,eAAe,GAAG,UAAC,OAAyB;IACvD,OAAO,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC;AACzC,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,IAAM,aAAa,GAAG,UAAC,OAAyB;IACrD,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEK,IAAM,aAAa,GAAG,UAAC,OAAyB;IACrD,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB","sourcesContent":["/**\n * WebSocket Types for Reya DEX Trading API v2\n * \n * Generated from AsyncAPI specification using AsyncAPI Modelina.\n * These types can be used to implement WebSocket clients.\n * \n * AsyncAPI Spec: specs/asyncapi-trading-v2.yaml\n * Generated: $(date)\n */\n\n// WebSocket connection servers\nexport const WebSocketServers = {\n production: 'wss://ws.reya.xyz',\n staging: 'wss://ws-staging.reya.xyz'\n} as const;\n\n// Generated types from AsyncAPI spec\n\nexport enum ExecutionType {\n ORDER_MATCH = \"ORDER_MATCH\",\n LIQUIDATION = \"LIQUIDATION\",\n ADL = \"ADL\",\n}\n\nexport interface MarketPerpExecutionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: PerpExecution[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface MarketSummary {\n symbol: string;\n updatedAt: number;\n longOiQty: string;\n shortOiQty: string;\n oiQty: string;\n fundingRate: string;\n longFundingValue: string;\n shortFundingValue: string;\n fundingRateVelocity: string;\n volume24h: string;\n pxChange24h?: string;\n throttledOraclePrice?: string;\n throttledPoolPrice?: string;\n pricesUpdatedAt?: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface MarketSummaryUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: MarketSummary;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface MarketsSummaryUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: '/v2/markets/summary';\n data: MarketSummary[];\n additionalProperties?: Map<string, any>;\n}\n\nexport interface Order {\n exchangeId: number;\n symbol: string;\n accountId: number;\n orderId?: string;\n qty?: string;\n execQty?: string;\n side: Side;\n limitPx: string;\n orderType: OrderType;\n triggerPx?: string;\n timeInForce?: TimeInForce;\n reduceOnly?: boolean;\n status: OrderStatus;\n createdAt: number;\n lastUpdateAt: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface OrderChangeUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Order[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport enum OrderStatus {\n OPEN = \"OPEN\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\",\n}\n\n\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n TP = \"TP\",\n SL = \"SL\",\n}\n\nexport interface PerpExecution {\n exchangeId: number;\n symbol: string;\n accountId: number;\n qty: string;\n side: Side;\n price: string;\n fee: string;\n type: ExecutionType;\n timestamp: number;\n sequenceNumber: number;\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface PingMessage {\n type: 'ping';\n timestamp?: number;\n}\n\n\nexport interface PongMessage {\n type: 'pong';\n timestamp?: number;\n}\n\nexport interface Position {\n exchangeId: number;\n symbol: string;\n accountId: number;\n qty: string;\n side: Side;\n avgEntryPrice: string;\n avgEntryFundingValue: string;\n lastTradeSequenceNumber: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PositionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Position[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface Price {\n symbol: string;\n oraclePrice?: string;\n poolPrice?: string;\n updatedAt: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PriceUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Price;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PricesUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: '/v2/prices';\n data: Price[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport enum Side {\n B = \"B\",\n A = \"A\",\n}\n\n\nexport enum TimeInForce {\n IOC = \"IOC\",\n GTC = \"GTC\",\n}\n\nexport interface WalletPerpExecutionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: PerpExecution[];\n additionalProperties?: Map<string, any>;\n}\n\n\n// Union types for WebSocket messages\nexport type UpdatePayload = \n | MarketsSummaryUpdatePayload\n | MarketSummaryUpdatePayload\n | PositionUpdatePayload\n | OrderChangeUpdatePayload\n | MarketPerpExecutionUpdatePayload\n | WalletPerpExecutionUpdatePayload\n | PricesUpdatePayload\n | PriceUpdatePayload;\n\nexport type WebSocketMessage = UpdatePayload | PingMessage | PongMessage;\n\n// Type guards for WebSocket messages\nexport const isUpdatePayload = (message: WebSocketMessage): message is UpdatePayload => {\n return message.type === 'channel_data';\n};\n\nexport const isPingMessage = (message: WebSocketMessage): message is PingMessage => {\n return message.type === 'ping';\n};\n\nexport const isPongMessage = (message: WebSocketMessage): message is PongMessage => {\n return message.type === 'pong';\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["websocket/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+BAA+B;AAClB,QAAA,gBAAgB,GAAG;IAC9B,UAAU,EAAE,mBAAmB;IAC/B,OAAO,EAAE,2BAA2B;CAC5B,CAAC;AAEX,qCAAqC;AAErC,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4BAAW,CAAA;AACb,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAyED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAGD,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,sBAAS,CAAA;IACT,sBAAS,CAAA;AACX,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AA0ED,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,eAAO,CAAA;IACP,eAAO,CAAA;AACT,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAGD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,0BAAW,CAAA;AACb,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAwBD,qCAAqC;AAC9B,IAAM,eAAe,GAAG,UAAC,OAAyB;IACvD,OAAO,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC;AACzC,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,IAAM,aAAa,GAAG,UAAC,OAAyB;IACrD,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEK,IAAM,aAAa,GAAG,UAAC,OAAyB;IACrD,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB","sourcesContent":["/**\n * WebSocket Types for Reya DEX Trading API v2\n * \n * Generated from AsyncAPI specification using AsyncAPI Modelina.\n * These types can be used to implement WebSocket clients.\n * \n * AsyncAPI Spec: specs/asyncapi-trading-v2.yaml\n * Generated: $(date)\n */\n\n// WebSocket connection servers\nexport const WebSocketServers = {\n production: 'wss://ws.reya.xyz',\n staging: 'wss://ws-staging.reya.xyz'\n} as const;\n\n// Generated types from AsyncAPI spec\n\nexport enum ExecutionType {\n ORDER_MATCH = \"ORDER_MATCH\",\n LIQUIDATION = \"LIQUIDATION\",\n ADL = \"ADL\",\n}\n\nexport interface MarketPerpExecutionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: PerpExecution[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface MarketSummary {\n symbol: string;\n updatedAt: number;\n longOiQty: string;\n shortOiQty: string;\n oiQty: string;\n fundingRate: string;\n longFundingValue: string;\n shortFundingValue: string;\n fundingRateVelocity: string;\n volume24h: string;\n pxChange24h?: string;\n throttledOraclePrice?: string;\n throttledPoolPrice?: string;\n pricesUpdatedAt?: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface MarketSummaryUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: MarketSummary;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface MarketsSummaryUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: '/v2/markets/summary';\n data: MarketSummary[];\n additionalProperties?: Map<string, any>;\n}\n\nexport interface Order {\n exchangeId: number;\n symbol: string;\n accountId: number;\n orderId: string;\n qty?: string;\n execQty?: string;\n side: Side;\n limitPx: string;\n orderType: OrderType;\n triggerPx?: string;\n timeInForce?: TimeInForce;\n reduceOnly?: boolean;\n status: OrderStatus;\n createdAt: number;\n lastUpdateAt: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface OrderChangeUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Order[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport enum OrderStatus {\n OPEN = \"OPEN\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\",\n}\n\n\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n TP = \"TP\",\n SL = \"SL\",\n}\n\nexport interface PerpExecution {\n exchangeId: number;\n symbol: string;\n accountId: number;\n qty: string;\n side: Side;\n price: string;\n fee: string;\n type: ExecutionType;\n timestamp: number;\n sequenceNumber: number;\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface PingMessage {\n type: 'ping';\n timestamp?: number;\n}\n\n\nexport interface PongMessage {\n type: 'pong';\n timestamp?: number;\n}\n\nexport interface Position {\n exchangeId: number;\n symbol: string;\n accountId: number;\n qty: string;\n side: Side;\n avgEntryPrice: string;\n avgEntryFundingValue: string;\n lastTradeSequenceNumber: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PositionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Position[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport interface Price {\n symbol: string;\n oraclePrice: string;\n poolPrice?: string;\n updatedAt: number;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PriceUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: Price;\n additionalProperties?: Map<string, any>;\n}\n\nexport interface PricesUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: '/v2/prices';\n data: Price[];\n additionalProperties?: Map<string, any>;\n}\n\n\nexport enum Side {\n B = \"B\",\n A = \"A\",\n}\n\n\nexport enum TimeInForce {\n IOC = \"IOC\",\n GTC = \"GTC\",\n}\n\nexport interface WalletPerpExecutionUpdatePayload {\n type: 'channel_data';\n timestamp: number;\n channel: string;\n data: PerpExecution[];\n additionalProperties?: Map<string, any>;\n}\n\n\n// Union types for WebSocket messages\nexport type UpdatePayload = \n | MarketsSummaryUpdatePayload\n | MarketSummaryUpdatePayload\n | PositionUpdatePayload\n | OrderChangeUpdatePayload\n | MarketPerpExecutionUpdatePayload\n | WalletPerpExecutionUpdatePayload\n | PricesUpdatePayload\n | PriceUpdatePayload;\n\nexport type WebSocketMessage = UpdatePayload | PingMessage | PongMessage;\n\n// Type guards for WebSocket messages\nexport const isUpdatePayload = (message: WebSocketMessage): message is UpdatePayload => {\n return message.type === 'channel_data';\n};\n\nexport const isPingMessage = (message: WebSocketMessage): message is PingMessage => {\n return message.type === 'ping';\n};\n\nexport const isPongMessage = (message: WebSocketMessage): message is PongMessage => {\n return message.type === 'pong';\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/api-v2-sdk",
3
- "version": "0.301.1",
3
+ "version": "0.301.3",
4
4
  "description": "Generated TypeScript SDK for Reya DEX Trading API v2 (REST + WebSocket types)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -39,5 +39,5 @@
39
39
  "engines": {
40
40
  "node": ">=18.18.0"
41
41
  },
42
- "gitHead": "21246649ee88cbe93e2cbc7c2a4333ab63bb0893"
42
+ "gitHead": "32df6601528504040b2fe1d54d08435b1b9d96d3"
43
43
  }
@@ -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.0
7
+ * The version of the OpenAPI document: 2.0.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.0
7
+ * The version of the OpenAPI document: 2.0.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.0
7
+ * The version of the OpenAPI document: 2.0.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Reya DEX Trading API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.3
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ServerError,
19
+ } from '../models/index';
20
+
21
+ /**
22
+ *
23
+ */
24
+ export class SpecsApi extends runtime.BaseAPI {
25
+
26
+ /**
27
+ * Returns the complete AsyncAPI specification for WebSocket API in YAML format
28
+ * Get AsyncAPI specification
29
+ */
30
+ async getAsyncApiSpecRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
31
+ const queryParameters: any = {};
32
+
33
+ const headerParameters: runtime.HTTPHeaders = {};
34
+
35
+ const response = await this.request({
36
+ path: `/asyncapi-spec.yaml`,
37
+ method: 'GET',
38
+ headers: headerParameters,
39
+ query: queryParameters,
40
+ }, initOverrides);
41
+
42
+ return new runtime.BlobApiResponse(response);
43
+ }
44
+
45
+ /**
46
+ * Returns the complete AsyncAPI specification for WebSocket API in YAML format
47
+ * Get AsyncAPI specification
48
+ */
49
+ async getAsyncApiSpec(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
50
+ const response = await this.getAsyncApiSpecRaw(initOverrides);
51
+ return await response.value();
52
+ }
53
+
54
+ /**
55
+ * Returns the complete OpenAPI specification for this API in YAML format
56
+ * Get OpenAPI specification
57
+ */
58
+ async getOpenApiSpecRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
59
+ const queryParameters: any = {};
60
+
61
+ const headerParameters: runtime.HTTPHeaders = {};
62
+
63
+ const response = await this.request({
64
+ path: `/openapi-spec.yaml`,
65
+ method: 'GET',
66
+ headers: headerParameters,
67
+ query: queryParameters,
68
+ }, initOverrides);
69
+
70
+ return new runtime.BlobApiResponse(response);
71
+ }
72
+
73
+ /**
74
+ * Returns the complete OpenAPI specification for this API in YAML format
75
+ * Get OpenAPI specification
76
+ */
77
+ async getOpenApiSpec(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
78
+ const response = await this.getOpenApiSpecRaw(initOverrides);
79
+ return await response.value();
80
+ }
81
+
82
+ }
@@ -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.0
7
+ * The version of the OpenAPI document: 2.0.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  Account,
19
+ AccountBalance,
19
20
  Order,
20
21
  PerpExecutionList,
21
22
  Position,
@@ -25,6 +26,10 @@ import type {
25
26
  WalletConfiguration,
26
27
  } from '../models/index';
27
28
 
29
+ export interface GetWalletAccountBalancesRequest {
30
+ address: string;
31
+ }
32
+
28
33
  export interface GetWalletAccountsRequest {
29
34
  address: string;
30
35
  }
@@ -58,6 +63,38 @@ export interface GetWalletSpotExecutionsRequest {
58
63
  */
59
64
  export class WalletDataApi extends runtime.BaseAPI {
60
65
 
66
+ /**
67
+ * Returns all account real balances for a wallet.
68
+ * Get wallet account balances
69
+ */
70
+ async getWalletAccountBalancesRaw(requestParameters: GetWalletAccountBalancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountBalance>>> {
71
+ if (requestParameters.address === null || requestParameters.address === undefined) {
72
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling getWalletAccountBalances.');
73
+ }
74
+
75
+ const queryParameters: any = {};
76
+
77
+ const headerParameters: runtime.HTTPHeaders = {};
78
+
79
+ const response = await this.request({
80
+ path: `/wallet/{address}/accountBalances`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
81
+ method: 'GET',
82
+ headers: headerParameters,
83
+ query: queryParameters,
84
+ }, initOverrides);
85
+
86
+ return new runtime.JSONApiResponse(response);
87
+ }
88
+
89
+ /**
90
+ * Returns all account real balances for a wallet.
91
+ * Get wallet account balances
92
+ */
93
+ async getWalletAccountBalances(requestParameters: GetWalletAccountBalancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountBalance>> {
94
+ const response = await this.getWalletAccountBalancesRaw(requestParameters, initOverrides);
95
+ return await response.value();
96
+ }
97
+
61
98
  /**
62
99
  * Get wallet accounts
63
100
  */
@@ -3,4 +3,5 @@
3
3
  export * from './MarketDataApi';
4
4
  export * from './OrderEntryApi';
5
5
  export * from './ReferenceDataApi';
6
+ export * from './SpecsApi';
6
7
  export * from './WalletDataApi';
@@ -25,6 +25,31 @@ export interface Account {
25
25
  */
26
26
  lastUpdateAt: number;
27
27
  }
28
+ /**
29
+ *
30
+ * @export
31
+ * @interface AccountBalance
32
+ */
33
+ export interface AccountBalance {
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof AccountBalance
38
+ */
39
+ accountId: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccountBalance
44
+ */
45
+ asset: string;
46
+ /**
47
+ * Sum of account net deposits (transfers, deposits and withdrawals) and realized pnl from closed positions. Realized pnl only applies to RUSD given it is the only settlement asset
48
+ * @type {string}
49
+ * @memberof AccountBalance
50
+ */
51
+ realBalance: string;
52
+ }
28
53
  /**
29
54
  *
30
55
  * @export
@@ -591,7 +616,7 @@ export interface Order {
591
616
  * @type {string}
592
617
  * @memberof Order
593
618
  */
594
- orderId?: string;
619
+ orderId: string;
595
620
  /**
596
621
  *
597
622
  * @type {string}
@@ -1065,7 +1090,7 @@ export interface Price {
1065
1090
  * @type {string}
1066
1091
  * @memberof Price
1067
1092
  */
1068
- oraclePrice?: string;
1093
+ oraclePrice: string;
1069
1094
  /**
1070
1095
  * The price currently quoted by the AMM for zero volume, from which trades are priced (equivalent to mid price in an order book); a trade of any size will be move this price up or down depending on the direction.
1071
1096
  * @type {string}
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.0
7
+ * The version of the OpenAPI document: 2.0.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -69,7 +69,7 @@ export interface Order {
69
69
  exchangeId: number;
70
70
  symbol: string;
71
71
  accountId: number;
72
- orderId?: string;
72
+ orderId: string;
73
73
  qty?: string;
74
74
  execQty?: string;
75
75
  side: Side;
@@ -156,7 +156,7 @@ export interface PositionUpdatePayload {
156
156
 
157
157
  export interface Price {
158
158
  symbol: string;
159
- oraclePrice?: string;
159
+ oraclePrice: string;
160
160
  poolPrice?: string;
161
161
  updatedAt: number;
162
162
  additionalProperties?: Map<string, any>;