@evedex/exchange-api 1.0.40 → 1.0.42

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.
@@ -1,6 +1,6 @@
1
1
  import * as crypto from "@evedex/exchange-crypto";
2
2
  import { SignedTpSl } from "@evedex/exchange-crypto";
3
- import { AvailableBalance, CoinList, DxFeedAuthToken, FundingList, HttpClient, InstrumentList, InstrumentMetricsList, MarketDepth, MarketInfo, Order, OrderBookRoundPrices, OrderGroup, OrderList, OrderStatus, OrderType, PaginatedQuery, Position, PositionList, TpSl, TpSlList, TpSlStatus, Trade, Transfer, User, WalletBalanceList, type OpenedOrdersList, type RecentTrade } from "./utils";
3
+ import { AvailableBalance, CoinList, DxFeedAuthToken, FundingList, HttpClient, InstrumentList, InstrumentMetricsList, MarketDepth, MarketInfo, Order, OrderBookRoundPrices, OrderGroup, OrderList, OrderStatus, OrderType, PaginatedQuery, Position, PositionList, TpSl, TpSlList, TpSlStatus, Trade, Transfer, User, WalletBalanceList, type OpenedOrdersList, type Power, type RecentTrade } from "./utils";
4
4
  export declare enum InstrumentListQueryField {
5
5
  Metrics = "metrics"
6
6
  }
@@ -50,6 +50,9 @@ export interface ExchangeRestGatewayOptions {
50
50
  exchangeURI: string;
51
51
  httpClient: HttpClient;
52
52
  }
53
+ export interface PowerQuery {
54
+ instrument: string;
55
+ }
53
56
  export declare class ExchangeRestGateway {
54
57
  readonly options: ExchangeRestGatewayOptions;
55
58
  constructor(options: ExchangeRestGatewayOptions);
@@ -68,6 +71,7 @@ export declare class ExchangeRestGateway {
68
71
  getWalletBalances(): Promise<WalletBalanceList>;
69
72
  getFunding(): Promise<FundingList>;
70
73
  getAvailableBalance(): Promise<AvailableBalance>;
74
+ getPower({ instrument }: PowerQuery): Promise<Power>;
71
75
  getPositions(): Promise<PositionList>;
72
76
  getOrders(query: OrderListQuery): Promise<OrderList>;
73
77
  getOpenedOrders(): Promise<OpenedOrdersList>;
@@ -104,6 +104,9 @@ class ExchangeRestGateway {
104
104
  getAvailableBalance() {
105
105
  return this.authGet("/api/market/available-balance");
106
106
  }
107
+ getPower({ instrument }) {
108
+ return this.authGet(`/api/market/power?instrument=${instrument}`);
109
+ }
107
110
  getPositions() {
108
111
  return this.authGet("/api/position");
109
112
  }
@@ -81,6 +81,14 @@ export interface AvailableBalance {
81
81
  openOrders: UnfilledOrdersVolume;
82
82
  positions: Record<string, number>;
83
83
  }
84
+ export interface Power {
85
+ buy: {
86
+ power: number;
87
+ };
88
+ sell: {
89
+ power: number;
90
+ };
91
+ }
84
92
  export interface Position {
85
93
  id: string;
86
94
  user: string;
@@ -1,6 +1,6 @@
1
1
  import * as crypto from "@evedex/exchange-crypto";
2
2
  import { SignedTpSl } from "@evedex/exchange-crypto";
3
- import { AvailableBalance, CoinList, DxFeedAuthToken, FundingList, HttpClient, InstrumentList, InstrumentMetricsList, MarketDepth, MarketInfo, Order, OrderBookRoundPrices, OrderGroup, OrderList, OrderStatus, OrderType, PaginatedQuery, Position, PositionList, TpSl, TpSlList, TpSlStatus, Trade, Transfer, User, WalletBalanceList, type OpenedOrdersList, type RecentTrade } from "./utils";
3
+ import { AvailableBalance, CoinList, DxFeedAuthToken, FundingList, HttpClient, InstrumentList, InstrumentMetricsList, MarketDepth, MarketInfo, Order, OrderBookRoundPrices, OrderGroup, OrderList, OrderStatus, OrderType, PaginatedQuery, Position, PositionList, TpSl, TpSlList, TpSlStatus, Trade, Transfer, User, WalletBalanceList, type OpenedOrdersList, type Power, type RecentTrade } from "./utils";
4
4
  export declare enum InstrumentListQueryField {
5
5
  Metrics = "metrics"
6
6
  }
@@ -50,6 +50,9 @@ export interface ExchangeRestGatewayOptions {
50
50
  exchangeURI: string;
51
51
  httpClient: HttpClient;
52
52
  }
53
+ export interface PowerQuery {
54
+ instrument: string;
55
+ }
53
56
  export declare class ExchangeRestGateway {
54
57
  readonly options: ExchangeRestGatewayOptions;
55
58
  constructor(options: ExchangeRestGatewayOptions);
@@ -68,6 +71,7 @@ export declare class ExchangeRestGateway {
68
71
  getWalletBalances(): Promise<WalletBalanceList>;
69
72
  getFunding(): Promise<FundingList>;
70
73
  getAvailableBalance(): Promise<AvailableBalance>;
74
+ getPower({ instrument }: PowerQuery): Promise<Power>;
71
75
  getPositions(): Promise<PositionList>;
72
76
  getOrders(query: OrderListQuery): Promise<OrderList>;
73
77
  getOpenedOrders(): Promise<OpenedOrdersList>;
@@ -102,6 +102,9 @@ export class ExchangeRestGateway {
102
102
  getAvailableBalance() {
103
103
  return this.authGet("/api/market/available-balance");
104
104
  }
105
+ getPower({ instrument }) {
106
+ return this.authGet(`/api/market/power?instrument=${instrument}`);
107
+ }
105
108
  getPositions() {
106
109
  return this.authGet("/api/position");
107
110
  }
@@ -81,6 +81,14 @@ export interface AvailableBalance {
81
81
  openOrders: UnfilledOrdersVolume;
82
82
  positions: Record<string, number>;
83
83
  }
84
+ export interface Power {
85
+ buy: {
86
+ power: number;
87
+ };
88
+ sell: {
89
+ power: number;
90
+ };
91
+ }
84
92
  export interface Position {
85
93
  id: string;
86
94
  user: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evedex/exchange-api",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",