@evedex/exchange-api 1.0.70-dev.4 → 1.0.70-dev.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.
@@ -59,6 +59,10 @@ export interface ExchangeRestGatewayOptions {
59
59
  export interface PowerQuery {
60
60
  instrument: string;
61
61
  }
62
+ export interface InstrumentListQuery {
63
+ limit?: number;
64
+ offset?: number;
65
+ }
62
66
  export declare class ExchangeRestGateway {
63
67
  readonly options: ExchangeRestGatewayOptions;
64
68
  constructor(options: ExchangeRestGatewayOptions);
@@ -85,8 +89,8 @@ export declare class ExchangeRestGateway {
85
89
  getOpenedOrders(): Promise<OpenedOrdersList>;
86
90
  getTpSl(query: TpSlListQuery): Promise<TpSlList>;
87
91
  getCoins(): Promise<CoinList>;
88
- getInstruments(): Promise<InstrumentList>;
89
- getInstrumentsMetrics(): Promise<InstrumentMetricsList>;
92
+ getInstruments(query?: InstrumentListQuery): Promise<InstrumentList>;
93
+ getInstrumentsMetrics(query?: InstrumentListQuery): Promise<InstrumentMetricsList>;
90
94
  withdraw(query: crypto.SignedTradingBalanceWithdraw): Promise<Transfer>;
91
95
  updatePosition(query: PositionUpdateQuery): Promise<PositionUpdateResponse>;
92
96
  closePosition(query: crypto.SignedPositionCloseOrder): Promise<Order>;
@@ -132,12 +132,17 @@ class ExchangeRestGateway {
132
132
  getCoins() {
133
133
  return this.get("/api/coin");
134
134
  }
135
- getInstruments() {
136
- return this.get("/api/market/instrument");
135
+ getInstruments(query = {}) {
136
+ return this.get("/api/market/instrument", (0, utils_1.serializeQueryParams)({
137
+ limit: query.limit !== undefined ? query.limit : undefined,
138
+ offset: query.offset !== undefined ? query.offset : undefined,
139
+ }));
137
140
  }
138
- getInstrumentsMetrics() {
141
+ getInstrumentsMetrics(query = {}) {
139
142
  return this.get(`/api/market/instrument`, (0, utils_1.serializeQueryParams)({
140
143
  fields: InstrumentListQueryField.Metrics,
144
+ limit: query.limit !== undefined ? query.limit : undefined,
145
+ offset: query.offset !== undefined ? query.offset : undefined,
141
146
  }));
142
147
  }
143
148
  // Actions
@@ -59,6 +59,10 @@ export interface ExchangeRestGatewayOptions {
59
59
  export interface PowerQuery {
60
60
  instrument: string;
61
61
  }
62
+ export interface InstrumentListQuery {
63
+ limit?: number;
64
+ offset?: number;
65
+ }
62
66
  export declare class ExchangeRestGateway {
63
67
  readonly options: ExchangeRestGatewayOptions;
64
68
  constructor(options: ExchangeRestGatewayOptions);
@@ -85,8 +89,8 @@ export declare class ExchangeRestGateway {
85
89
  getOpenedOrders(): Promise<OpenedOrdersList>;
86
90
  getTpSl(query: TpSlListQuery): Promise<TpSlList>;
87
91
  getCoins(): Promise<CoinList>;
88
- getInstruments(): Promise<InstrumentList>;
89
- getInstrumentsMetrics(): Promise<InstrumentMetricsList>;
92
+ getInstruments(query?: InstrumentListQuery): Promise<InstrumentList>;
93
+ getInstrumentsMetrics(query?: InstrumentListQuery): Promise<InstrumentMetricsList>;
90
94
  withdraw(query: crypto.SignedTradingBalanceWithdraw): Promise<Transfer>;
91
95
  updatePosition(query: PositionUpdateQuery): Promise<PositionUpdateResponse>;
92
96
  closePosition(query: crypto.SignedPositionCloseOrder): Promise<Order>;
@@ -136,12 +136,17 @@ export class ExchangeRestGateway {
136
136
  getCoins() {
137
137
  return this.get("/api/coin");
138
138
  }
139
- getInstruments() {
140
- return this.get("/api/market/instrument");
139
+ getInstruments(query = {}) {
140
+ return this.get("/api/market/instrument", serializeQueryParams({
141
+ limit: query.limit !== undefined ? query.limit : undefined,
142
+ offset: query.offset !== undefined ? query.offset : undefined,
143
+ }));
141
144
  }
142
- getInstrumentsMetrics() {
145
+ getInstrumentsMetrics(query = {}) {
143
146
  return this.get(`/api/market/instrument`, serializeQueryParams({
144
147
  fields: InstrumentListQueryField.Metrics,
148
+ limit: query.limit !== undefined ? query.limit : undefined,
149
+ offset: query.offset !== undefined ? query.offset : undefined,
145
150
  }));
146
151
  }
147
152
  // Actions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evedex/exchange-api",
3
- "version": "1.0.70-dev.4",
3
+ "version": "1.0.70-dev.5",
4
4
  "packageManager": "pnpm@11.0.9",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.js",