@reyaxyz/api-sdk 0.157.0 → 0.158.0
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/clients/api-client.js +0 -60
- package/dist/clients/api-client.js.map +1 -1
- package/dist/clients/modules/account/index.js +0 -89
- package/dist/clients/modules/account/index.js.map +1 -1
- package/dist/clients/modules/markets/index.js +0 -15
- package/dist/clients/modules/markets/index.js.map +1 -1
- package/dist/clients/modules/owner/index.js +0 -36
- package/dist/clients/modules/owner/index.js.map +1 -1
- package/dist/clients/types.js +0 -3
- package/dist/clients/types.js.map +1 -1
- package/dist/types/clients/api-client.d.ts +0 -42
- package/dist/types/clients/api-client.d.ts.map +1 -1
- package/dist/types/clients/modules/account/index.d.ts +2 -10
- package/dist/types/clients/modules/account/index.d.ts.map +1 -1
- package/dist/types/clients/modules/markets/index.d.ts +1 -2
- package/dist/types/clients/modules/markets/index.d.ts.map +1 -1
- package/dist/types/clients/modules/owner/index.d.ts +1 -5
- package/dist/types/clients/modules/owner/index.d.ts.map +1 -1
- package/dist/types/clients/socket-client.d.ts +1 -1
- package/dist/types/clients/types.d.ts +0 -3
- package/dist/types/clients/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/clients/api-client.ts +0 -58
- package/src/clients/modules/account/index.ts +1 -93
- package/src/clients/modules/markets/index.ts +1 -12
- package/src/clients/modules/owner/index.ts +0 -36
- package/src/clients/types.ts +0 -3
- package/dist/clients/modules/isolated-order.simulation/index.js +0 -302
- package/dist/clients/modules/isolated-order.simulation/index.js.map +0 -1
- package/dist/clients/modules/isolated-order.simulation/types.js +0 -3
- package/dist/clients/modules/isolated-order.simulation/types.js.map +0 -1
- package/dist/clients/modules/rage-trade/index.js +0 -99
- package/dist/clients/modules/rage-trade/index.js.map +0 -1
- package/dist/clients/modules/rage-trade/types.js +0 -3
- package/dist/clients/modules/rage-trade/types.js.map +0 -1
- package/dist/clients/modules/trade.simulation/index.js +0 -331
- package/dist/clients/modules/trade.simulation/index.js.map +0 -1
- package/dist/clients/modules/trade.simulation/types.js +0 -3
- package/dist/clients/modules/trade.simulation/types.js.map +0 -1
- package/dist/clients/modules/trade.simulation/utils.js +0 -35
- package/dist/clients/modules/trade.simulation/utils.js.map +0 -1
- package/dist/types/clients/modules/isolated-order.simulation/index.d.ts +0 -24
- package/dist/types/clients/modules/isolated-order.simulation/index.d.ts.map +0 -1
- package/dist/types/clients/modules/isolated-order.simulation/types.d.ts +0 -44
- package/dist/types/clients/modules/isolated-order.simulation/types.d.ts.map +0 -1
- package/dist/types/clients/modules/rage-trade/index.d.ts +0 -9
- package/dist/types/clients/modules/rage-trade/index.d.ts.map +0 -1
- package/dist/types/clients/modules/rage-trade/types.d.ts +0 -80
- package/dist/types/clients/modules/rage-trade/types.d.ts.map +0 -1
- package/dist/types/clients/modules/trade.simulation/index.d.ts +0 -22
- package/dist/types/clients/modules/trade.simulation/index.d.ts.map +0 -1
- package/dist/types/clients/modules/trade.simulation/types.d.ts +0 -85
- package/dist/types/clients/modules/trade.simulation/types.d.ts.map +0 -1
- package/dist/types/clients/modules/trade.simulation/utils.d.ts +0 -8
- package/dist/types/clients/modules/trade.simulation/utils.d.ts.map +0 -1
- package/src/clients/modules/isolated-order.simulation/index.ts +0 -490
- package/src/clients/modules/isolated-order.simulation/types.ts +0 -55
- package/src/clients/modules/rage-trade/index.ts +0 -38
- package/src/clients/modules/rage-trade/types.ts +0 -91
- package/src/clients/modules/trade.simulation/index.ts +0 -534
- package/src/clients/modules/trade.simulation/types.ts +0 -98
- package/src/clients/modules/trade.simulation/utils.ts +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"/","sources":["clients/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,aAAa,MAAM,mBAAmB,CAA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CAEnF;IAED;;;;;;;;;;;;OAYG;IAEH,WAAkB,oBAAoB,IAAI,0BAA0B,CAEnE;IAED;;;;;;;;;;;;OAYG;IAEH,WAAkB,6BAA6B,IAAI,mCAAmC,CAErF;IAED;;;;;;;;;;;;OAYG;IAEH,WAAkB,kCAAkC,IAAI,wCAAwC,CAE/F;IAED;;;;;;;;;;;;OAYG;IAEH,WAAkB,wBAAwB,IAAI,8BAA8B,CAE3E;IAED;;;;;;;;;OASG;IACH,WAAkB,EAAE,IAAI,QAAQ,CAE/B;IAED;;;;;;;;;OASG;IACH,WAAkB,MAAM,IAAI,YAAY,CAEvC;IAED;;;;;;;;;OASG;IACH,WAAkB,KAAK,IAAI,WAAW,CAErC;IAED;;;;;;OAMG;IACH,WAAkB,iBAAiB,IAAI,uBAAuB,CAE7D;IAED;;;;;;OAMG;IACH,WAAkB,QAAQ,IAAI,cAAc,CAE3C;IAED;;;;;;OAMG;IACH,WAAkB,IAAI,IAAI,UAAU,CAEnC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetMarginAccountParams, GetMarginAccountResult, GetMarginAccountsParams, GetMarginAccountsResult, GetMarginAccountTransactionHistoryParams, GetMarginAccountTransactionHistoryResult,
|
|
2
|
-
import { EditCollateralSimulationState,
|
|
1
|
+
import { GetMarginAccountParams, GetMarginAccountResult, GetMarginAccountsParams, GetMarginAccountsResult, GetMarginAccountTransactionHistoryParams, GetMarginAccountTransactionHistoryResult, GetMaxWithdrawBalanceForAccountParams, GetMaxWithdrawBalanceForAccountResult, EditMarginAccountParams, CloseMarginAccountParams, GetEditCollateralSimulationInitialDataParams, EditMarginAccountResult, CloseMarginAccountResult, GetMarginAccountOrderHistoryPaginatedParams, GetMarginAccountOrderHistoryPaginatedResult, GetLiquidationHistoryForOwnerAddressResult, GetLiquidationHistoryForOwnerAddressParams, GetAccountFeeRebatesHistoryParams, GetAccountFeeRebatesHistoryResult, GetAutoExchangeHistoryForOwnerAddressResult, GetAutoExchangeHistoryForOwnerAddressParams, UpdateLeverageForAccountAndMarketParams, UpdateLeverageForAccountAndMarketResult } from './types';
|
|
2
|
+
import { EditCollateralSimulationState, RestClient } from '@reyaxyz/common';
|
|
3
3
|
export default class AccountClient extends RestClient {
|
|
4
4
|
/**
|
|
5
5
|
* Asynchronously retrieves a list of margin accounts associated with a specific address.
|
|
@@ -26,21 +26,13 @@ export default class AccountClient extends RestClient {
|
|
|
26
26
|
* @memberof account
|
|
27
27
|
*/
|
|
28
28
|
getMarginAccount(params: GetMarginAccountParams): Promise<GetMarginAccountResult>;
|
|
29
|
-
getPositionsForMarginAccount(params: GetPositionsForMarginAccountParams): Promise<GetPositionsForMarginAccountResult>;
|
|
30
29
|
getMarginAccountOrderHistoryPaginated(params: GetMarginAccountOrderHistoryPaginatedParams): Promise<GetMarginAccountOrderHistoryPaginatedResult>;
|
|
31
30
|
getLiquidationHistoryForOwnerAddress(params: GetLiquidationHistoryForOwnerAddressParams): Promise<GetLiquidationHistoryForOwnerAddressResult>;
|
|
32
31
|
getAutoExchangeHistoryForOwnerAddress(params: GetAutoExchangeHistoryForOwnerAddressParams): Promise<GetAutoExchangeHistoryForOwnerAddressResult>;
|
|
33
|
-
getMaxOrderSizeAvailable(params: GetMaxOrderSizeAvailableParams): Promise<GetMaxOrderSizeAvailableResult>;
|
|
34
|
-
getIsolatedOrderMaxSizeAvailable(params: GetIsolatedOrderMaxSizeAvailableParams): Promise<GetIsolatedOrderMaxSizeAvailableResult>;
|
|
35
|
-
getTransactionSimulationInitialData(params: GetTransactionSimulationInitialDataParams): Promise<TradeSimulationState>;
|
|
36
32
|
getEditCollateralSimulationInitialData(params: GetEditCollateralSimulationInitialDataParams): Promise<EditCollateralSimulationState>;
|
|
37
33
|
getMarginAccountTransactionHistory(params: GetMarginAccountTransactionHistoryParams): Promise<GetMarginAccountTransactionHistoryResult>;
|
|
38
34
|
getAccountFeeRebatesHistory(params: GetAccountFeeRebatesHistoryParams): Promise<GetAccountFeeRebatesHistoryResult>;
|
|
39
35
|
getMaxWithdrawBalanceForAccount(params: GetMaxWithdrawBalanceForAccountParams): Promise<GetMaxWithdrawBalanceForAccountResult>;
|
|
40
|
-
getMarginAccountBalanceChartData(params: GetMarginAccountBalanceChartDataParams): Promise<GetMarginAccountBalanceChartDataResult>;
|
|
41
|
-
getMarginAccountCollateralsBalanceChartData(params: GetMarginAccountCollateralsBalanceChartDataParams): Promise<GetMarginAccountCollateralsBalanceChartDataResult>;
|
|
42
|
-
getAllMarginAccountsBalanceChart(params: GetAllMarginAccountsBalanceChartDataParams): Promise<GetAllMarginAccountsBalanceChartDataResult>;
|
|
43
|
-
getAllMarginAccountsSummary(params: GetAllMarginAccountsSummaryParams): Promise<GetAllMarginAccountsSummaryResult>;
|
|
44
36
|
editMarginAccount(params: EditMarginAccountParams): Promise<EditMarginAccountResult>;
|
|
45
37
|
closeMarginAccount(params: CloseMarginAccountParams): Promise<CloseMarginAccountResult>;
|
|
46
38
|
updateLeverageForAccountAndMarket(params: UpdateLeverageForAccountAndMarketParams): Promise<UpdateLeverageForAccountAndMarketResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wCAAwC,EACxC,wCAAwC,EACxC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wCAAwC,EACxC,wCAAwC,EACxC,qCAAqC,EACrC,qCAAqC,EACrC,uBAAuB,EACvB,wBAAwB,EACxB,4CAA4C,EAC5C,uBAAuB,EACvB,wBAAwB,EACxB,2CAA2C,EAC3C,2CAA2C,EAC3C,0CAA0C,EAC1C,0CAA0C,EAC1C,iCA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GetFundingRateChartDataParams, GetMarketParams, GetMarketResult, GetMarketsResult, GetMarketTradingHistoryParams,
|
|
1
|
+
import { GetCandlesParams, GetFundingRateChartDataParams, GetMarketParams, GetMarketResult, GetMarketsResult, GetMarketTradingHistoryParams, GetTradingHistoryResult, MarketCandlesResponse } from './types';
|
|
2
2
|
import { GetFundingRateChartDataResult, RestClient } from '@reyaxyz/common';
|
|
3
3
|
export default class MarketsClient extends RestClient {
|
|
4
4
|
/**
|
|
@@ -20,7 +20,6 @@ export default class MarketsClient extends RestClient {
|
|
|
20
20
|
*/
|
|
21
21
|
getMarkets(): Promise<GetMarketsResult>;
|
|
22
22
|
getMarket(params: GetMarketParams): Promise<GetMarketResult>;
|
|
23
|
-
getPoolPrice(params: GetMarketParams): Promise<GetPoolPriceResult>;
|
|
24
23
|
/**
|
|
25
24
|
* Retrieves candlestick data for a specified market.
|
|
26
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,6BAA6B,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE5E,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD;;;;;;;;;;;;;;;;OAgBG;IAEG,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAKlE;;;;;;;;;;;;OAYG;IAEG,gBAAgB,CACpB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,qBAAqB,CAAC;IAU3B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,uBAAuB,CAAC;IAQ7B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAO1C"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetOwnerLastSeenNotificationTimestampParams, GetOwnerLastSeenNotificationTimestampResult, GetOwnerMetadataParams, GetOwnerMetadataResult, SetOwnerLastSeenNotificationTimestampParams, SetOwnerLastSeenNotificationTimestampResult } from './types';
|
|
2
2
|
import { RestClient } from '@reyaxyz/common';
|
|
3
3
|
export default class OwnerClient extends RestClient {
|
|
4
4
|
getOwnerMetadata(params: GetOwnerMetadataParams): Promise<GetOwnerMetadataResult>;
|
|
5
|
-
getAccountOwnerMetadata(params: GetAccountOwnerMetadataParams): Promise<GetAccountOwnerMetadataResult>;
|
|
6
|
-
getOwnerConfigurationSettings(params: GetOwnerConfigurationSettingsParams): Promise<GetOwnerConfigurationSettingsResult>;
|
|
7
|
-
addFavoriteMarket(params: AddFavoriteMarketParams): Promise<AddFavoriteMarketResult>;
|
|
8
|
-
removeFavoriteMarket(params: RemoveFavoriteMarketParams): Promise<RemoveFavoriteMarketResult>;
|
|
9
5
|
getOwnerLastSeenNotificationTimestamp(params: GetOwnerLastSeenNotificationTimestampParams): Promise<GetOwnerLastSeenNotificationTimestampResult>;
|
|
10
6
|
setOwnerLastSeenNotificationTimestamp(params: SetOwnerLastSeenNotificationTimestampParams): Promise<SetOwnerLastSeenNotificationTimestampResult>;
|
|
11
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,EAC3C,2CAA2C,EAC3C,sBAAsB,EACtB,sBAAsB,EACtB,2CAA2C,EAC3C,2CAA2C,EAC5C,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IAC3C,gBAAgB,CACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IAK5B,qCAAqC,CACzC,MAAM,EAAE,2CAA2C,GAClD,OAAO,CAAC,2CAA2C,CAAC;IAKjD,qCAAqC,CACzC,MAAM,EAAE,2CAA2C,GAClD,OAAO,CAAC,2CAA2C,CAAC;CAWxD"}
|
|
@@ -100,7 +100,7 @@ export declare class SocketClient {
|
|
|
100
100
|
*
|
|
101
101
|
*/
|
|
102
102
|
set onMessage(callback: (event: SocketMessage) => void);
|
|
103
|
-
getReadyState(): 0 |
|
|
103
|
+
getReadyState(): 0 | 1 | 2 | 3 | undefined;
|
|
104
104
|
/**
|
|
105
105
|
* @description Send a subscribe message to the websocket connection.
|
|
106
106
|
*
|
|
@@ -4,7 +4,6 @@ export * from './modules/conditional-orders/types';
|
|
|
4
4
|
export * from './modules/lp/types';
|
|
5
5
|
export * from './modules/markets/types';
|
|
6
6
|
export * from './modules/tokens/types';
|
|
7
|
-
export * from './modules/trade.simulation/types';
|
|
8
7
|
export * from './modules/owner/types';
|
|
9
8
|
export * from './modules/deposit-existing-MA.simulation/types';
|
|
10
9
|
export * from './modules/deposit-new-MA.simulation/types';
|
|
@@ -17,6 +16,4 @@ export * from './modules/transfer-MA-Pool.simulation/types';
|
|
|
17
16
|
export * from './modules/funding-rate/types';
|
|
18
17
|
export * from './modules/depth-chart.simulation/types';
|
|
19
18
|
export * from './modules/deposit-passive-pool.simulation/types';
|
|
20
|
-
export * from './modules/isolated-order.simulation/types';
|
|
21
|
-
export * from './modules/rage-trade/types';
|
|
22
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mCAAmC,EACnC,qCAAqC,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,mCAAmC,EACnC,6BAA6B,EAC7B,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mCAAmC,EACnC,qCAAqC,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,mCAAmC,EACnC,6BAA6B,EAC7B,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/api-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.158.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"isomorphic-ws": "5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"packageManager": "pnpm@8.3.1",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "48c795585a82a1388f2868b80dee23151dd428de",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@reyaxyz/database": "0.149.6"
|
|
46
46
|
}
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
} from '@reyaxyz/common';
|
|
6
6
|
import MarketsClient from './modules/markets';
|
|
7
7
|
import AccountClient from './modules/account';
|
|
8
|
-
import TradeSimulationClient from './modules/trade.simulation';
|
|
9
8
|
import LpClient from './modules/lp';
|
|
10
9
|
import TokensClient from './modules/tokens';
|
|
11
10
|
import OwnerClient from './modules/owner';
|
|
@@ -19,11 +18,9 @@ import TransferMarginBetweenMAsSimulationClient from './modules/transfer-margin-
|
|
|
19
18
|
import TransferMAPoolSimulationClient from './modules/transfer-MA-Pool.simulation';
|
|
20
19
|
import DepthChartSimulationClient from './modules/depth-chart.simulation';
|
|
21
20
|
import FundingRateClient from './modules/funding-rate';
|
|
22
|
-
import IsolatedOrderSimulationClient from './modules/isolated-order.simulation';
|
|
23
21
|
import ConditionalOrdersClient from './modules/conditional-orders';
|
|
24
22
|
import ReferralClient from './modules/referral';
|
|
25
23
|
import AuthClient from './modules/auth';
|
|
26
|
-
import RageTradeClient from './modules/rage-trade';
|
|
27
24
|
|
|
28
25
|
/**
|
|
29
26
|
* @description Client for API
|
|
@@ -34,7 +31,6 @@ export class ApiClient {
|
|
|
34
31
|
private readonly _markets: MarketsClient;
|
|
35
32
|
private readonly _account: AccountClient;
|
|
36
33
|
private readonly _lp: LpClient;
|
|
37
|
-
private readonly _tradeSimulation: TradeSimulationClient;
|
|
38
34
|
private readonly _fundingRateHistory: FundingRateClient;
|
|
39
35
|
private readonly _editCollateralSimulation: EditCollateralSimulationClient;
|
|
40
36
|
private readonly _depositExistingMASimulation: DepositExistingMASimulationClient;
|
|
@@ -45,22 +41,16 @@ export class ApiClient {
|
|
|
45
41
|
private readonly _transferMarginBetweenMAsSimulation: TransferMarginBetweenMAsSimulationClient;
|
|
46
42
|
private readonly _transferMAPoolSimulation: TransferMAPoolSimulationClient;
|
|
47
43
|
private readonly _depthSimulation: DepthChartSimulationClient;
|
|
48
|
-
private readonly _isolatedOrderSimulation: IsolatedOrderSimulationClient;
|
|
49
44
|
private readonly _tokens: TokensClient;
|
|
50
45
|
private readonly _owner: OwnerClient;
|
|
51
46
|
private readonly _conditionalOrders: ConditionalOrdersClient;
|
|
52
47
|
private readonly _referral: ReferralClient;
|
|
53
|
-
private readonly _rageTrade: RageTradeClient;
|
|
54
48
|
private readonly _auth: AuthClient;
|
|
55
49
|
|
|
56
50
|
private constructor() {
|
|
57
51
|
this._markets = new MarketsClient(ApiClient.config.apiEndpoint);
|
|
58
52
|
this._account = new AccountClient(ApiClient.config.apiEndpoint);
|
|
59
53
|
this._lp = new LpClient(ApiClient.config.apiEndpoint);
|
|
60
|
-
this._tradeSimulation = new TradeSimulationClient(this._account);
|
|
61
|
-
this._isolatedOrderSimulation = new IsolatedOrderSimulationClient(
|
|
62
|
-
this._account,
|
|
63
|
-
);
|
|
64
54
|
this._fundingRateHistory = new FundingRateClient(this._markets);
|
|
65
55
|
this._editCollateralSimulation = new EditCollateralSimulationClient(
|
|
66
56
|
ApiClient.network,
|
|
@@ -103,7 +93,6 @@ export class ApiClient {
|
|
|
103
93
|
ApiClient.config.apiEndpoint,
|
|
104
94
|
);
|
|
105
95
|
this._referral = new ReferralClient(ApiClient.config.apiEndpoint);
|
|
106
|
-
this._rageTrade = new RageTradeClient(ApiClient.config.apiEndpoint);
|
|
107
96
|
this._auth = new AuthClient(ApiClient.config.apiEndpoint);
|
|
108
97
|
}
|
|
109
98
|
|
|
@@ -149,41 +138,6 @@ export class ApiClient {
|
|
|
149
138
|
return ApiClient.getInstance()._account;
|
|
150
139
|
}
|
|
151
140
|
|
|
152
|
-
/**
|
|
153
|
-
* Provides access to the TradeSimulationClient instance.
|
|
154
|
-
* This getter allows for interacting with trade simulation functionalities.
|
|
155
|
-
* It ensures a singleton pattern by fetching the instance from the ApiClient's
|
|
156
|
-
* private `_tradeSimulation` property, ensuring that trade simulation operations
|
|
157
|
-
* use a consistent client configuration and state.
|
|
158
|
-
*
|
|
159
|
-
* @returns {TradeSimulationClient} An instance of TradeSimulationClient for trade simulation operations.
|
|
160
|
-
* @memberof ApiClient
|
|
161
|
-
* @example
|
|
162
|
-
* // Access the trade simulation client from the ApiClient
|
|
163
|
-
* const tradeSimulationClient = ApiClient.tradeSimulation;
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
public static get tradeSimulation(): TradeSimulationClient {
|
|
167
|
-
return ApiClient.getInstance()._tradeSimulation;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Provides access to the IsolatedOrderSimulationClient instance.
|
|
172
|
-
* This getter allows for interacting with isolatedTrade simulation functionalities.
|
|
173
|
-
* It ensures a singleton pattern by fetching the instance from the ApiClient's
|
|
174
|
-
* private `_isolatedTradeSimulation` property, ensuring that isolatedTrade simulation operations
|
|
175
|
-
* use a consistent client configuration and state.
|
|
176
|
-
*
|
|
177
|
-
* @returns {IsolatedOrderSimulationClient} An instance of IsolatedOrderSimulationClient for isolatedTrade simulation operations.
|
|
178
|
-
* @memberof ApiClient
|
|
179
|
-
* @example
|
|
180
|
-
* // Access the isolatedTrade simulation client from the ApiClient
|
|
181
|
-
* const isolatedTradeSimulationClient = ApiClient.isolatedTradeSimulation;
|
|
182
|
-
*/
|
|
183
|
-
public static get isolatedSimulation(): IsolatedOrderSimulationClient {
|
|
184
|
-
return ApiClient.getInstance()._isolatedOrderSimulation;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
141
|
public static get fundingRateHistory(): FundingRateClient {
|
|
188
142
|
return ApiClient.getInstance()._fundingRateHistory;
|
|
189
143
|
}
|
|
@@ -407,18 +361,6 @@ export class ApiClient {
|
|
|
407
361
|
return ApiClient.getInstance()._referral;
|
|
408
362
|
}
|
|
409
363
|
|
|
410
|
-
/**
|
|
411
|
-
* Gets the current instance of the RageTradeClient from the ApiClient.
|
|
412
|
-
*
|
|
413
|
-
* This static getter allows access to the RageTradeClient instance managed within the ApiClient's singleton instance. It is a convenience method for retrieving the RageTradeClient directly, bypassing the need to manually access the internal `_rageTrade` property of the ApiClient instance.
|
|
414
|
-
*
|
|
415
|
-
* @returns {RageTradeClient} The RageTradeClient instance currently held by the ApiClient.
|
|
416
|
-
*/
|
|
417
|
-
|
|
418
|
-
public static get rageTrade(): RageTradeClient {
|
|
419
|
-
return ApiClient.getInstance()._rageTrade;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
364
|
/**
|
|
423
365
|
* Gets the current instance of the AuthClient from the ApiClient.
|
|
424
366
|
*
|
|
@@ -5,25 +5,13 @@ import {
|
|
|
5
5
|
GetMarginAccountsResult,
|
|
6
6
|
GetMarginAccountTransactionHistoryParams,
|
|
7
7
|
GetMarginAccountTransactionHistoryResult,
|
|
8
|
-
GetMaxOrderSizeAvailableParams,
|
|
9
|
-
GetMaxOrderSizeAvailableResult,
|
|
10
8
|
GetMaxWithdrawBalanceForAccountParams,
|
|
11
9
|
GetMaxWithdrawBalanceForAccountResult,
|
|
12
|
-
GetPositionsForMarginAccountParams,
|
|
13
|
-
GetPositionsForMarginAccountResult,
|
|
14
|
-
GetTransactionSimulationInitialDataParams,
|
|
15
|
-
GetMarginAccountBalanceChartDataParams,
|
|
16
|
-
GetMarginAccountCollateralsBalanceChartDataParams,
|
|
17
|
-
GetAllMarginAccountsBalanceChartDataParams,
|
|
18
10
|
EditMarginAccountParams,
|
|
19
11
|
CloseMarginAccountParams,
|
|
20
|
-
GetAllMarginAccountsSummaryResult,
|
|
21
|
-
GetAllMarginAccountsSummaryParams,
|
|
22
12
|
GetEditCollateralSimulationInitialDataParams,
|
|
23
13
|
EditMarginAccountResult,
|
|
24
14
|
CloseMarginAccountResult,
|
|
25
|
-
GetIsolatedOrderMaxSizeAvailableParams,
|
|
26
|
-
GetIsolatedOrderMaxSizeAvailableResult,
|
|
27
15
|
GetMarginAccountOrderHistoryPaginatedParams,
|
|
28
16
|
GetMarginAccountOrderHistoryPaginatedResult,
|
|
29
17
|
GetLiquidationHistoryForOwnerAddressResult,
|
|
@@ -35,14 +23,7 @@ import {
|
|
|
35
23
|
UpdateLeverageForAccountAndMarketParams,
|
|
36
24
|
UpdateLeverageForAccountAndMarketResult,
|
|
37
25
|
} from './types';
|
|
38
|
-
import {
|
|
39
|
-
EditCollateralSimulationState,
|
|
40
|
-
TradeSimulationState,
|
|
41
|
-
GetMarginAccountCollateralsBalanceChartDataResult,
|
|
42
|
-
GetMarginAccountBalanceChartDataResult,
|
|
43
|
-
GetAllMarginAccountsBalanceChartDataResult,
|
|
44
|
-
RestClient,
|
|
45
|
-
} from '@reyaxyz/common';
|
|
26
|
+
import { EditCollateralSimulationState, RestClient } from '@reyaxyz/common';
|
|
46
27
|
|
|
47
28
|
export default class AccountClient extends RestClient {
|
|
48
29
|
/**
|
|
@@ -89,13 +70,6 @@ export default class AccountClient extends RestClient {
|
|
|
89
70
|
return this.get(uri);
|
|
90
71
|
}
|
|
91
72
|
|
|
92
|
-
async getPositionsForMarginAccount(
|
|
93
|
-
params: GetPositionsForMarginAccountParams,
|
|
94
|
-
): Promise<GetPositionsForMarginAccountResult> {
|
|
95
|
-
const uri = `/api/accounts/${params.address}/marginAccount/${params.marginAccountId}/positions`;
|
|
96
|
-
return this.get(uri, { limit: params.limit });
|
|
97
|
-
}
|
|
98
|
-
|
|
99
73
|
async getMarginAccountOrderHistoryPaginated(
|
|
100
74
|
params: GetMarginAccountOrderHistoryPaginatedParams,
|
|
101
75
|
): Promise<GetMarginAccountOrderHistoryPaginatedResult> {
|
|
@@ -125,35 +99,6 @@ export default class AccountClient extends RestClient {
|
|
|
125
99
|
});
|
|
126
100
|
}
|
|
127
101
|
|
|
128
|
-
async getMaxOrderSizeAvailable(
|
|
129
|
-
params: GetMaxOrderSizeAvailableParams,
|
|
130
|
-
): Promise<GetMaxOrderSizeAvailableResult> {
|
|
131
|
-
const uri = `/api/accounts/${params.marginAccountId}/max-order-size`;
|
|
132
|
-
return this.get(uri, {
|
|
133
|
-
marketId: params.marketId,
|
|
134
|
-
direction: params.direction,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
async getIsolatedOrderMaxSizeAvailable(
|
|
139
|
-
params: GetIsolatedOrderMaxSizeAvailableParams,
|
|
140
|
-
): Promise<GetIsolatedOrderMaxSizeAvailableResult> {
|
|
141
|
-
const uri = `/api/accounts/${params.marginAccountId}/max-order-size-isolated`;
|
|
142
|
-
return this.get(uri, {
|
|
143
|
-
marketId: params.marketId,
|
|
144
|
-
direction: params.direction,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
async getTransactionSimulationInitialData(
|
|
149
|
-
params: GetTransactionSimulationInitialDataParams,
|
|
150
|
-
): Promise<TradeSimulationState> {
|
|
151
|
-
const uri = `/api/accounts/${params.marginAccountId}/trade-simulation-data`;
|
|
152
|
-
return this.get(uri, {
|
|
153
|
-
marketId: params.marketId,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
102
|
async getEditCollateralSimulationInitialData(
|
|
158
103
|
params: GetEditCollateralSimulationInitialDataParams,
|
|
159
104
|
): Promise<EditCollateralSimulationState> {
|
|
@@ -188,43 +133,6 @@ export default class AccountClient extends RestClient {
|
|
|
188
133
|
});
|
|
189
134
|
}
|
|
190
135
|
|
|
191
|
-
async getMarginAccountBalanceChartData(
|
|
192
|
-
params: GetMarginAccountBalanceChartDataParams,
|
|
193
|
-
): Promise<GetMarginAccountBalanceChartDataResult> {
|
|
194
|
-
const uri = `/api/accounts/${params.marginAccountId}/balance-chart-data`;
|
|
195
|
-
return this.get(uri, {
|
|
196
|
-
timeframeMs: params.filters.timeframeMs,
|
|
197
|
-
granularity: params.filters.granularity,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
async getMarginAccountCollateralsBalanceChartData(
|
|
202
|
-
params: GetMarginAccountCollateralsBalanceChartDataParams,
|
|
203
|
-
): Promise<GetMarginAccountCollateralsBalanceChartDataResult> {
|
|
204
|
-
const uri = `/api/accounts/${params.marginAccountId}/collaterals-balance-chart-data`;
|
|
205
|
-
return this.get(uri, {
|
|
206
|
-
timeframeMs: params.filters.timeframeMs,
|
|
207
|
-
granularity: params.filters.granularity,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async getAllMarginAccountsBalanceChart(
|
|
212
|
-
params: GetAllMarginAccountsBalanceChartDataParams,
|
|
213
|
-
): Promise<GetAllMarginAccountsBalanceChartDataResult> {
|
|
214
|
-
const uri = `/api/accounts/owner/${params.ownerAddress}/balance`;
|
|
215
|
-
return this.get(uri, {
|
|
216
|
-
timeframeMs: params.filters.timeframeMs,
|
|
217
|
-
granularity: params.filters.granularity,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
async getAllMarginAccountsSummary(
|
|
222
|
-
params: GetAllMarginAccountsSummaryParams,
|
|
223
|
-
): Promise<GetAllMarginAccountsSummaryResult> {
|
|
224
|
-
const uri = `/api/accounts/owner/${params.ownerAddress}/summary`;
|
|
225
|
-
return this.get(uri);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
136
|
// TODO: Milan validate
|
|
229
137
|
async editMarginAccount(
|
|
230
138
|
params: EditMarginAccountParams,
|
|
@@ -5,15 +5,10 @@ import {
|
|
|
5
5
|
GetMarketResult,
|
|
6
6
|
GetMarketsResult,
|
|
7
7
|
GetMarketTradingHistoryParams,
|
|
8
|
-
GetPoolPriceResult,
|
|
9
8
|
GetTradingHistoryResult,
|
|
10
9
|
MarketCandlesResponse,
|
|
11
10
|
} from './types';
|
|
12
|
-
import {
|
|
13
|
-
GetFundingRateChartDataResult,
|
|
14
|
-
RestClient,
|
|
15
|
-
GetInstantPoolPriceResult,
|
|
16
|
-
} from '@reyaxyz/common';
|
|
11
|
+
import { GetFundingRateChartDataResult, RestClient } from '@reyaxyz/common';
|
|
17
12
|
|
|
18
13
|
export default class MarketsClient extends RestClient {
|
|
19
14
|
/**
|
|
@@ -44,12 +39,6 @@ export default class MarketsClient extends RestClient {
|
|
|
44
39
|
return this.get(uri);
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
async getPoolPrice(params: GetMarketParams): Promise<GetPoolPriceResult> {
|
|
48
|
-
const uri = `/api/markets/${params.id}/pool-price/`;
|
|
49
|
-
const poolPriceInfo: GetInstantPoolPriceResult = await this.get(uri);
|
|
50
|
-
return { price: poolPriceInfo.poolPrice };
|
|
51
|
-
}
|
|
52
|
-
|
|
53
42
|
/**
|
|
54
43
|
* Retrieves candlestick data for a specified market.
|
|
55
44
|
*
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AddFavoriteMarketParams,
|
|
3
|
-
AddFavoriteMarketResult,
|
|
4
|
-
GetAccountOwnerMetadataParams,
|
|
5
|
-
GetAccountOwnerMetadataResult,
|
|
6
|
-
GetOwnerConfigurationSettingsParams,
|
|
7
|
-
GetOwnerConfigurationSettingsResult,
|
|
8
2
|
GetOwnerLastSeenNotificationTimestampParams,
|
|
9
3
|
GetOwnerLastSeenNotificationTimestampResult,
|
|
10
4
|
GetOwnerMetadataParams,
|
|
11
5
|
GetOwnerMetadataResult,
|
|
12
|
-
RemoveFavoriteMarketParams,
|
|
13
|
-
RemoveFavoriteMarketResult,
|
|
14
6
|
SetOwnerLastSeenNotificationTimestampParams,
|
|
15
7
|
SetOwnerLastSeenNotificationTimestampResult,
|
|
16
8
|
} from './types';
|
|
@@ -24,34 +16,6 @@ export default class OwnerClient extends RestClient {
|
|
|
24
16
|
return this.get(uri);
|
|
25
17
|
}
|
|
26
18
|
|
|
27
|
-
async getAccountOwnerMetadata(
|
|
28
|
-
params: GetAccountOwnerMetadataParams,
|
|
29
|
-
): Promise<GetAccountOwnerMetadataResult> {
|
|
30
|
-
const uri = `/api/owner/${params.accountId}/account-owner-metadata`;
|
|
31
|
-
return this.get(uri);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async getOwnerConfigurationSettings(
|
|
35
|
-
params: GetOwnerConfigurationSettingsParams,
|
|
36
|
-
): Promise<GetOwnerConfigurationSettingsResult> {
|
|
37
|
-
const uri = `/api/owner/${params.ownerAddress}/configuration/settings`;
|
|
38
|
-
return this.get(uri);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async addFavoriteMarket(
|
|
42
|
-
params: AddFavoriteMarketParams,
|
|
43
|
-
): Promise<AddFavoriteMarketResult> {
|
|
44
|
-
const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;
|
|
45
|
-
return this.post(uri, undefined, params);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async removeFavoriteMarket(
|
|
49
|
-
params: RemoveFavoriteMarketParams,
|
|
50
|
-
): Promise<RemoveFavoriteMarketResult> {
|
|
51
|
-
const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;
|
|
52
|
-
return this.delete(uri, undefined, params);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
19
|
async getOwnerLastSeenNotificationTimestamp(
|
|
56
20
|
params: GetOwnerLastSeenNotificationTimestampParams,
|
|
57
21
|
): Promise<GetOwnerLastSeenNotificationTimestampResult> {
|
package/src/clients/types.ts
CHANGED
|
@@ -33,7 +33,6 @@ export * from './modules/conditional-orders/types';
|
|
|
33
33
|
export * from './modules/lp/types';
|
|
34
34
|
export * from './modules/markets/types';
|
|
35
35
|
export * from './modules/tokens/types';
|
|
36
|
-
export * from './modules/trade.simulation/types';
|
|
37
36
|
export * from './modules/owner/types';
|
|
38
37
|
export * from './modules/deposit-existing-MA.simulation/types';
|
|
39
38
|
export * from './modules/deposit-new-MA.simulation/types';
|
|
@@ -46,5 +45,3 @@ export * from './modules/transfer-MA-Pool.simulation/types';
|
|
|
46
45
|
export * from './modules/funding-rate/types';
|
|
47
46
|
export * from './modules/depth-chart.simulation/types';
|
|
48
47
|
export * from './modules/deposit-passive-pool.simulation/types';
|
|
49
|
-
export * from './modules/isolated-order.simulation/types';
|
|
50
|
-
export * from './modules/rage-trade/types';
|