@pendle/sdk-boros 0.3.27 → 0.3.29
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/backend/secrettune/BorosCoreSDK.d.ts +177 -77
- package/dist/backend/secrettune/BorosCoreSDK.js +90 -35
- package/dist/backend/secrettune/BorosCoreSDK.js.map +1 -1
- package/dist/backend/secrettune/BorosSendTxsBotSDK.d.ts +2 -0
- package/dist/backend/secrettune/BorosSendTxsBotSDK.js +17 -1
- package/dist/backend/secrettune/BorosSendTxsBotSDK.js.map +1 -1
- package/dist/contracts/viemAbis.d.ts +4 -0
- package/dist/contracts/viemAbis.js +1 -0
- package/dist/contracts/viemAbis.js.map +1 -1
- package/dist/entities/exchange/exchange.d.ts +1381 -1381
- package/dist/entities/exchange/exchange.js +52 -60
- package/dist/entities/exchange/exchange.js.map +1 -1
- package/dist/entities/exchange/types.d.ts +11 -10
- package/package.json +1 -1
|
@@ -186,9 +186,18 @@ export interface CashTransferPrePostSimulationResponse {
|
|
|
186
186
|
preUserState: CashTransferStateResponse;
|
|
187
187
|
postUserState: CashTransferStateResponse;
|
|
188
188
|
}
|
|
189
|
+
export interface FeeBreakdownResponse {
|
|
190
|
+
marketEntranceFee: string;
|
|
191
|
+
takerOtcFee: string;
|
|
192
|
+
opsFee: string;
|
|
193
|
+
marketEntranceFeeInUSD: number;
|
|
194
|
+
takerOtcFeeInUSD: number;
|
|
195
|
+
opsFeeInUSD: number;
|
|
196
|
+
}
|
|
189
197
|
export interface CashTransferSimulationResponse {
|
|
190
198
|
crossAccState: CashTransferPrePostSimulationResponse;
|
|
191
199
|
isolatedAccState: CashTransferPrePostSimulationResponse;
|
|
200
|
+
feeBreakdown: FeeBreakdownResponse;
|
|
192
201
|
}
|
|
193
202
|
export interface ContractSwapPositionResponse {
|
|
194
203
|
size: string;
|
|
@@ -202,36 +211,12 @@ export interface PlaceOrderSimulationResponseV2 {
|
|
|
202
211
|
liquidationApr?: number;
|
|
203
212
|
priceImpact: number;
|
|
204
213
|
fee: string;
|
|
214
|
+
feeBreakdown: FeeBreakdownResponse;
|
|
205
215
|
actualLeverage: number;
|
|
206
216
|
status: string;
|
|
207
217
|
}
|
|
208
|
-
export interface PlaceOrderStateResponse {
|
|
209
|
-
totalCash: string;
|
|
210
|
-
availableInitialMargin: string;
|
|
211
|
-
availableMaintMargin: string;
|
|
212
|
-
marginRatio: number;
|
|
213
|
-
activePositionSize: string;
|
|
214
|
-
}
|
|
215
|
-
export interface PlaceOrderSimulationResponse {
|
|
216
|
-
preUserInfo: PlaceOrderStateResponse;
|
|
217
|
-
postUserInfo: PlaceOrderStateResponse;
|
|
218
|
-
matched: ContractSwapPositionResponse;
|
|
219
|
-
marginRequired: string;
|
|
220
|
-
liquidationApr?: number;
|
|
221
|
-
profit25PercentApr: number;
|
|
222
|
-
priceImpact: number;
|
|
223
|
-
fee: string;
|
|
224
|
-
actualLeverage: number;
|
|
225
|
-
}
|
|
226
|
-
export interface UserInfoResponse {
|
|
227
|
-
totalCash: string;
|
|
228
|
-
availableInitialMargin: string;
|
|
229
|
-
availableMaintMargin: string;
|
|
230
|
-
marginRatio: number;
|
|
231
|
-
}
|
|
232
218
|
export interface CancelOrderSimulationResponse {
|
|
233
|
-
|
|
234
|
-
postUserInfo: UserInfoResponse;
|
|
219
|
+
feeBreakdown: FeeBreakdownResponse;
|
|
235
220
|
}
|
|
236
221
|
export interface AddLiquiditySingleCashStateResponse {
|
|
237
222
|
collateralBalance: string;
|
|
@@ -246,6 +231,7 @@ export interface AddLiquiditySingleCashSimulationResponse {
|
|
|
246
231
|
preUserInfo: AddLiquiditySingleCashStateResponse;
|
|
247
232
|
postUserInfo: AddLiquiditySingleCashStateResponse;
|
|
248
233
|
matched: AddLiquiditySingleCashMatchedResponse;
|
|
234
|
+
feeBreakdown: FeeBreakdownResponse;
|
|
249
235
|
}
|
|
250
236
|
export interface RemoveLiquiditySingleCashStateResponse {
|
|
251
237
|
collateralBalance: string;
|
|
@@ -259,6 +245,7 @@ export interface RemoveLiquiditySingleCashSimulationResponse {
|
|
|
259
245
|
preUserInfo: RemoveLiquiditySingleCashStateResponse;
|
|
260
246
|
postUserInfo: RemoveLiquiditySingleCashStateResponse;
|
|
261
247
|
matched: RemoveLiquiditySingleCashMatchedResponse;
|
|
248
|
+
feeBreakdown: FeeBreakdownResponse;
|
|
262
249
|
}
|
|
263
250
|
export interface AssetMetadataResponse {
|
|
264
251
|
proSymbol: string;
|
|
@@ -290,6 +277,10 @@ export interface AgentExecuteParamsResponse {
|
|
|
290
277
|
tag: string;
|
|
291
278
|
data: string;
|
|
292
279
|
}
|
|
280
|
+
export interface BulkAgentExecuteParamsResponse {
|
|
281
|
+
tag: string;
|
|
282
|
+
datas: string[];
|
|
283
|
+
}
|
|
293
284
|
export interface BulkPlaceOrderQueryDto {
|
|
294
285
|
marketAcc: string;
|
|
295
286
|
marketId: number;
|
|
@@ -301,16 +292,15 @@ export interface BulkPlaceOrderQueryDto {
|
|
|
301
292
|
tif: 0 | 1 | 2 | 3;
|
|
302
293
|
}
|
|
303
294
|
export interface BulkPlaceOrderQueryDtoV2 {
|
|
295
|
+
payTreasuryAmount?: string;
|
|
304
296
|
marketAcc: string;
|
|
305
297
|
marketId: number;
|
|
306
|
-
|
|
298
|
+
sides: (0 | 1)[];
|
|
307
299
|
sizes: string[];
|
|
308
300
|
limitTicks: number[];
|
|
309
301
|
tif: 0 | 1 | 2 | 3;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
tag: string;
|
|
313
|
-
datas: string[];
|
|
302
|
+
ammId?: number;
|
|
303
|
+
slippage?: number;
|
|
314
304
|
}
|
|
315
305
|
export interface SettingsByMarketResponse {
|
|
316
306
|
marketId: number;
|
|
@@ -328,6 +318,9 @@ export interface UpdateAccountSettingBodyDto {
|
|
|
328
318
|
agent: string;
|
|
329
319
|
timestamp: number;
|
|
330
320
|
}
|
|
321
|
+
export interface AccountGasBalanceResponse {
|
|
322
|
+
balanceInUSD: number;
|
|
323
|
+
}
|
|
331
324
|
export interface PnlTransactionResponse {
|
|
332
325
|
id: string;
|
|
333
326
|
marketId: number;
|
|
@@ -404,6 +397,59 @@ export interface RiskAllMarketsStatusesResponse {
|
|
|
404
397
|
export interface CalculateLNResponse {
|
|
405
398
|
totalOI: string;
|
|
406
399
|
}
|
|
400
|
+
export interface RiskGetAmmImpliedRateResponse {
|
|
401
|
+
address: string;
|
|
402
|
+
impliedRate: number;
|
|
403
|
+
}
|
|
404
|
+
export interface PriceDeviationItem {
|
|
405
|
+
time: string;
|
|
406
|
+
value: number;
|
|
407
|
+
}
|
|
408
|
+
export interface PriceDeviationResponse {
|
|
409
|
+
startTime: string;
|
|
410
|
+
endTime: string;
|
|
411
|
+
data: PriceDeviationItem[];
|
|
412
|
+
}
|
|
413
|
+
export interface UnhealthyVolumeItem {
|
|
414
|
+
time: string;
|
|
415
|
+
value: number;
|
|
416
|
+
}
|
|
417
|
+
export interface UnhealthyVolumeResponse {
|
|
418
|
+
startTime: string;
|
|
419
|
+
endTime: string;
|
|
420
|
+
data: UnhealthyVolumeItem[];
|
|
421
|
+
}
|
|
422
|
+
export interface LongShortCostItem {
|
|
423
|
+
long: number;
|
|
424
|
+
short: number;
|
|
425
|
+
}
|
|
426
|
+
export interface LiquidationCostItem {
|
|
427
|
+
time: string;
|
|
428
|
+
value: LongShortCostItem;
|
|
429
|
+
}
|
|
430
|
+
export interface LiquidationCostResponse {
|
|
431
|
+
startTime: string;
|
|
432
|
+
endTime: string;
|
|
433
|
+
data: LiquidationCostItem[];
|
|
434
|
+
}
|
|
435
|
+
export interface TradedVolumeItem {
|
|
436
|
+
time: string;
|
|
437
|
+
value: number;
|
|
438
|
+
}
|
|
439
|
+
export interface TradedVolumeResponse {
|
|
440
|
+
startTime: string;
|
|
441
|
+
endTime: string;
|
|
442
|
+
data: TradedVolumeItem[];
|
|
443
|
+
}
|
|
444
|
+
export interface LiquidityDepthItem {
|
|
445
|
+
time: string;
|
|
446
|
+
value: number;
|
|
447
|
+
}
|
|
448
|
+
export interface LiquidityDepthResponse {
|
|
449
|
+
startTime: string;
|
|
450
|
+
endTime: string;
|
|
451
|
+
data: LiquidityDepthItem[];
|
|
452
|
+
}
|
|
407
453
|
export interface SettlementResponse {
|
|
408
454
|
id: string;
|
|
409
455
|
timestamp: number;
|
|
@@ -590,10 +636,14 @@ export interface LiquidityDashboardTierInfo {
|
|
|
590
636
|
size: string;
|
|
591
637
|
}
|
|
592
638
|
export interface LiquidityDashboardPerMarketResponse {
|
|
639
|
+
marketId: number;
|
|
593
640
|
totalOI: string;
|
|
594
641
|
midApr: number;
|
|
595
642
|
spread: number;
|
|
643
|
+
longSize: string;
|
|
644
|
+
shortSize: string;
|
|
596
645
|
ammLiquidityWithinSpreadRange: string;
|
|
646
|
+
ammTvl: string;
|
|
597
647
|
skew: number;
|
|
598
648
|
tierInfos: LiquidityDashboardTierInfo[];
|
|
599
649
|
}
|
|
@@ -650,7 +700,7 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
650
700
|
}, params?: RequestParams) => Promise<AxiosResponse<MarketTradesResponse, any>>;
|
|
651
701
|
marketsControllerGetChartData: (query: {
|
|
652
702
|
marketId: number;
|
|
653
|
-
timeFrame: "5m" | "1h" | "1d" | "1w";
|
|
703
|
+
timeFrame: "1m" | "5m" | "1h" | "1d" | "1w";
|
|
654
704
|
startTimestamp?: number;
|
|
655
705
|
endTimestamp?: number;
|
|
656
706
|
}, params?: RequestParams) => Promise<AxiosResponse<ChartResponse, any>>;
|
|
@@ -671,18 +721,13 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
671
721
|
}, params?: RequestParams) => Promise<AxiosResponse<GetSingleVaultResponse, any>>;
|
|
672
722
|
ammControllerGetVaultApyChart: (query: {
|
|
673
723
|
marketId: number;
|
|
674
|
-
timeFrame: "5m" | "1h" | "1d" | "1w";
|
|
724
|
+
timeFrame: "1m" | "5m" | "1h" | "1d" | "1w";
|
|
675
725
|
startTimestamp?: number;
|
|
676
726
|
endTimestamp?: number;
|
|
677
727
|
}, params?: RequestParams) => Promise<AxiosResponse<GetVaultApyChartResponse, any>>;
|
|
678
728
|
ammControllerGetAmmInfoByAmmId: (ammId: number, params?: RequestParams) => Promise<AxiosResponse<GetAMMInfoByAmmIdResponse, any>>;
|
|
679
729
|
};
|
|
680
730
|
simulations: {
|
|
681
|
-
simulationsControllerGetDeposit: (query: {
|
|
682
|
-
userAddress: string;
|
|
683
|
-
tokenId: number;
|
|
684
|
-
amount: string;
|
|
685
|
-
}, params?: RequestParams) => Promise<AxiosResponse<DepositSimulationResponse, any>>;
|
|
686
731
|
simulationsControllerGetDepositV2: (query: {
|
|
687
732
|
userAddress: string;
|
|
688
733
|
tokenId: number;
|
|
@@ -702,29 +747,19 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
702
747
|
amount: string;
|
|
703
748
|
}, params?: RequestParams) => Promise<AxiosResponse<CashTransferSimulationResponse, any>>;
|
|
704
749
|
simulationsControllerGetPlaceOrderV2: (query: {
|
|
705
|
-
marketAcc?: string;
|
|
706
750
|
marketId: number;
|
|
707
751
|
side: 0 | 1;
|
|
708
752
|
size: string;
|
|
709
753
|
limitTick?: number;
|
|
710
754
|
tif: 0 | 1 | 2 | 3;
|
|
711
755
|
slippage?: number;
|
|
756
|
+
marketAcc?: string;
|
|
712
757
|
}, params?: RequestParams) => Promise<AxiosResponse<PlaceOrderSimulationResponseV2, any>>;
|
|
713
|
-
simulationsControllerGetPlaceOrder: (query: {
|
|
714
|
-
marketAcc: string;
|
|
715
|
-
marketId: number;
|
|
716
|
-
side: 0 | 1;
|
|
717
|
-
size: string;
|
|
718
|
-
limitTick?: number;
|
|
719
|
-
tif: 0 | 1 | 2 | 3;
|
|
720
|
-
slippage?: number;
|
|
721
|
-
isConnected?: boolean;
|
|
722
|
-
}, params?: RequestParams) => Promise<AxiosResponse<PlaceOrderSimulationResponse, any>>;
|
|
723
758
|
simulationsControllerGetCancelOrder: (query: {
|
|
724
759
|
marketAcc: string;
|
|
725
760
|
marketId: number;
|
|
726
761
|
cancelAll: boolean;
|
|
727
|
-
orderIds?: string
|
|
762
|
+
orderIds?: string;
|
|
728
763
|
}, params?: RequestParams) => Promise<AxiosResponse<CancelOrderSimulationResponse, any>>;
|
|
729
764
|
simulationsControllerCloseActiveMarketPositionV2: (query: {
|
|
730
765
|
marketId: number;
|
|
@@ -735,14 +770,6 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
735
770
|
slippage?: number;
|
|
736
771
|
marketAcc: string;
|
|
737
772
|
}, params?: RequestParams) => Promise<AxiosResponse<PlaceOrderSimulationResponseV2, any>>;
|
|
738
|
-
simulationsControllerCloseActiveMarketPosition: (query: {
|
|
739
|
-
marketAcc: string;
|
|
740
|
-
marketId: number;
|
|
741
|
-
type: "limit" | "market";
|
|
742
|
-
size: string;
|
|
743
|
-
rate?: number;
|
|
744
|
-
slippage?: number;
|
|
745
|
-
}, params?: RequestParams) => Promise<AxiosResponse<PlaceOrderSimulationResponse, any>>;
|
|
746
773
|
simulationsControllerGetAddLiquiditySingleCashToAmm: (query: {
|
|
747
774
|
userAddress: string;
|
|
748
775
|
accountId: number;
|
|
@@ -764,6 +791,8 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
764
791
|
userAddress: string;
|
|
765
792
|
tokenId: number;
|
|
766
793
|
amount: string;
|
|
794
|
+
accountId: number;
|
|
795
|
+
marketId: number;
|
|
767
796
|
}, params?: RequestParams) => Promise<AxiosResponse<GetCalldataResponse, any>>;
|
|
768
797
|
calldataControllerGetDepositCalldataV2: (query: {
|
|
769
798
|
userAddress: string;
|
|
@@ -772,11 +801,6 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
772
801
|
accountId: number;
|
|
773
802
|
marketId: number;
|
|
774
803
|
}, params?: RequestParams) => Promise<AxiosResponse<GetCalldataResponse, any>>;
|
|
775
|
-
calldataControllerGetWithdrawCalldata: (query: {
|
|
776
|
-
userAddress: string;
|
|
777
|
-
tokenId: number;
|
|
778
|
-
amount: string;
|
|
779
|
-
}, params?: RequestParams) => Promise<AxiosResponse<GetCalldataResponse, any>>;
|
|
780
804
|
calldataControllerGetWithdrawRequestCalldata: (query: {
|
|
781
805
|
userAddress: string;
|
|
782
806
|
tokenId: number;
|
|
@@ -791,6 +815,13 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
791
815
|
tokenId: number;
|
|
792
816
|
}, params?: RequestParams) => Promise<AxiosResponse<GetCalldataResponse, any>>;
|
|
793
817
|
calldataControllerGetPositionTransferCalldata: (query: {
|
|
818
|
+
payTreasuryAmount?: string;
|
|
819
|
+
marketId: number;
|
|
820
|
+
isDeposit: boolean;
|
|
821
|
+
amount: string;
|
|
822
|
+
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
823
|
+
calldataControllerGetPositionTransferCalldataV2: (query: {
|
|
824
|
+
payTreasuryAmount?: string;
|
|
794
825
|
marketId: number;
|
|
795
826
|
isDeposit: boolean;
|
|
796
827
|
amount: string;
|
|
@@ -803,24 +834,34 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
803
834
|
tif: 0 | 1 | 2 | 3;
|
|
804
835
|
slippage?: number;
|
|
805
836
|
marketAcc: string;
|
|
837
|
+
payTreasuryAmount?: string;
|
|
806
838
|
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
807
|
-
|
|
808
|
-
marketAcc: string;
|
|
839
|
+
calldataControllerGetPlaceOrderCalldataV3: (query: {
|
|
809
840
|
marketId: number;
|
|
810
841
|
side: 0 | 1;
|
|
811
842
|
size: string;
|
|
812
843
|
limitTick?: number;
|
|
813
|
-
slippage?: number;
|
|
814
844
|
tif: 0 | 1 | 2 | 3;
|
|
815
|
-
|
|
845
|
+
slippage?: number;
|
|
846
|
+
marketAcc: string;
|
|
847
|
+
payTreasuryAmount?: string;
|
|
848
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
816
849
|
calldataControllerGetBulkPlaceOrderCalldata: (data: BulkPlaceOrderQueryDto, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
817
850
|
calldataControllerGetBulkPlaceOrderCalldataV2: (data: BulkPlaceOrderQueryDtoV2, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
818
851
|
calldataControllerGetCancelOrderCalldata: (query: {
|
|
852
|
+
payTreasuryAmount?: string;
|
|
819
853
|
marketAcc: string;
|
|
820
854
|
marketId: number;
|
|
821
855
|
cancelAll: boolean;
|
|
822
856
|
orderIds?: string;
|
|
823
857
|
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
858
|
+
calldataControllerGetCancelOrderCalldataV2: (query: {
|
|
859
|
+
payTreasuryAmount?: string;
|
|
860
|
+
marketAcc: string;
|
|
861
|
+
marketId: number;
|
|
862
|
+
cancelAll: boolean;
|
|
863
|
+
orderIds?: string;
|
|
864
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
824
865
|
calldataControllerGetCloseActiveMarketPositionV2: (query: {
|
|
825
866
|
marketId: number;
|
|
826
867
|
side: 0 | 1;
|
|
@@ -829,31 +870,51 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
829
870
|
tif: 0 | 1 | 2 | 3;
|
|
830
871
|
slippage?: number;
|
|
831
872
|
marketAcc: string;
|
|
873
|
+
payTreasuryAmount?: string;
|
|
832
874
|
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
833
|
-
|
|
834
|
-
marketAcc: string;
|
|
875
|
+
calldataControllerGetCloseActiveMarketPositionV3: (query: {
|
|
835
876
|
marketId: number;
|
|
836
|
-
|
|
877
|
+
side: 0 | 1;
|
|
837
878
|
size: string;
|
|
838
|
-
|
|
879
|
+
limitTick?: number;
|
|
880
|
+
tif: 0 | 1 | 2 | 3;
|
|
839
881
|
slippage?: number;
|
|
840
|
-
|
|
882
|
+
marketAcc: string;
|
|
883
|
+
payTreasuryAmount?: string;
|
|
884
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
841
885
|
calldataControllerGetAddLiquiditySingleCashToAmmCalldata: (query: {
|
|
886
|
+
payTreasuryAmount?: string;
|
|
842
887
|
userAddress: string;
|
|
843
888
|
accountId: number;
|
|
844
889
|
marketId: number;
|
|
845
890
|
netCashIn: string;
|
|
846
891
|
minLpOut: string;
|
|
847
892
|
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
893
|
+
calldataControllerGetAddLiquiditySingleCashToAmmCalldataV2: (query: {
|
|
894
|
+
payTreasuryAmount?: string;
|
|
895
|
+
userAddress: string;
|
|
896
|
+
accountId: number;
|
|
897
|
+
marketId: number;
|
|
898
|
+
netCashIn: string;
|
|
899
|
+
minLpOut: string;
|
|
900
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
848
901
|
calldataControllerGetRemoveLiquiditySingleCashFromAmmCalldata: (query: {
|
|
902
|
+
payTreasuryAmount?: string;
|
|
849
903
|
marketId: number;
|
|
850
904
|
lpToRemove: string;
|
|
851
905
|
minCashOut: string;
|
|
852
906
|
}, params?: RequestParams) => Promise<AxiosResponse<AgentExecuteParamsResponse, any>>;
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
907
|
+
calldataControllerGetRemoveLiquiditySingleCashFromAmmCalldataV2: (query: {
|
|
908
|
+
payTreasuryAmount?: string;
|
|
909
|
+
marketId: number;
|
|
910
|
+
lpToRemove: string;
|
|
911
|
+
minCashOut: string;
|
|
912
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
913
|
+
calldataControllerGetPayTreasuryCalldata: (query: {
|
|
914
|
+
isCross: boolean;
|
|
915
|
+
marketId: number;
|
|
916
|
+
usdAmount: number;
|
|
917
|
+
}, params?: RequestParams) => Promise<AxiosResponse<BulkAgentExecuteParamsResponse, any>>;
|
|
857
918
|
};
|
|
858
919
|
accounts: {
|
|
859
920
|
accountsControllerGetUserSettings: (query: {
|
|
@@ -861,6 +922,10 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
861
922
|
accountId: number;
|
|
862
923
|
}, params?: RequestParams) => Promise<AxiosResponse<AccountSettingsResponse, any>>;
|
|
863
924
|
accountsControllerUpdateAccountSettings: (data: UpdateAccountSettingBodyDto, params?: RequestParams) => Promise<AxiosResponse<void, any>>;
|
|
925
|
+
accountsControllerGetAccountGasBalance: (query: {
|
|
926
|
+
userAddress: string;
|
|
927
|
+
accountId: number;
|
|
928
|
+
}, params?: RequestParams) => Promise<AxiosResponse<AccountGasBalanceResponse, any>>;
|
|
864
929
|
};
|
|
865
930
|
pnL: {
|
|
866
931
|
pnlControllerGetPnlTransactions: (query: {
|
|
@@ -874,7 +939,7 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
874
939
|
userAddress: string;
|
|
875
940
|
marketId: number;
|
|
876
941
|
accountId: number;
|
|
877
|
-
timeFrame?: "5m" | "1h" | "1d" | "1w";
|
|
942
|
+
timeFrame?: "1m" | "5m" | "1h" | "1d" | "1w";
|
|
878
943
|
startTimestamp?: number;
|
|
879
944
|
endTimestamp?: number;
|
|
880
945
|
}, params?: RequestParams) => Promise<AxiosResponse<HistoricalPnlChartResponse[], any>>;
|
|
@@ -910,6 +975,7 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
910
975
|
riskControllerGetRiskAllMarketsStatuses: (query?: {
|
|
911
976
|
marketId?: number;
|
|
912
977
|
userAddresses?: string[];
|
|
978
|
+
side?: 0 | 1;
|
|
913
979
|
accountId?: number;
|
|
914
980
|
}, params?: RequestParams) => Promise<AxiosResponse<RiskAllMarketsStatusesResponse[], any>>;
|
|
915
981
|
riskControllerCalculateLn: (query: {
|
|
@@ -918,6 +984,39 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
918
984
|
rateTo?: number;
|
|
919
985
|
side: 0 | 1;
|
|
920
986
|
}, params?: RequestParams) => Promise<AxiosResponse<CalculateLNResponse, any>>;
|
|
987
|
+
riskControllerGetAmmImpliedRate: (query: {
|
|
988
|
+
marketId: number;
|
|
989
|
+
}, params?: RequestParams) => Promise<AxiosResponse<RiskGetAmmImpliedRateResponse, any>>;
|
|
990
|
+
riskControllerGetPriceDeviation: (query: {
|
|
991
|
+
frequency: number;
|
|
992
|
+
marketId: number;
|
|
993
|
+
limit?: number;
|
|
994
|
+
timeWindow: number;
|
|
995
|
+
}, params?: RequestParams) => Promise<AxiosResponse<PriceDeviationResponse, any>>;
|
|
996
|
+
riskControllerGetUnhealthyVolume: (query: {
|
|
997
|
+
frequency: number;
|
|
998
|
+
marketId: number;
|
|
999
|
+
limit?: number;
|
|
1000
|
+
rate: number;
|
|
1001
|
+
}, params?: RequestParams) => Promise<AxiosResponse<UnhealthyVolumeResponse, any>>;
|
|
1002
|
+
riskControllerGetLiquidationCost: (query: {
|
|
1003
|
+
frequency: number;
|
|
1004
|
+
marketId: number;
|
|
1005
|
+
limit?: number;
|
|
1006
|
+
openInterestPercentage: number;
|
|
1007
|
+
}, params?: RequestParams) => Promise<AxiosResponse<LiquidationCostResponse, any>>;
|
|
1008
|
+
riskControllerGetTradedVolume: (query: {
|
|
1009
|
+
frequency: number;
|
|
1010
|
+
marketId: number;
|
|
1011
|
+
limit?: number;
|
|
1012
|
+
timeWindow: number;
|
|
1013
|
+
}, params?: RequestParams) => Promise<AxiosResponse<TradedVolumeResponse, any>>;
|
|
1014
|
+
riskControllerGetLiquidityDepth: (query: {
|
|
1015
|
+
frequency: number;
|
|
1016
|
+
marketId: number;
|
|
1017
|
+
limit?: number;
|
|
1018
|
+
deltaRate: number;
|
|
1019
|
+
}, params?: RequestParams) => Promise<AxiosResponse<LiquidityDepthResponse, any>>;
|
|
921
1020
|
};
|
|
922
1021
|
settlement: {
|
|
923
1022
|
settlementControllerGetSettlements: (query: {
|
|
@@ -980,5 +1079,6 @@ export declare class Sdk<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
980
1079
|
};
|
|
981
1080
|
dashboard: {
|
|
982
1081
|
dashboardControllerGetLiquidityMetrics: (params?: RequestParams) => Promise<AxiosResponse<LiquidityDashboardResponse, any>>;
|
|
1082
|
+
dashboardControllerGetLiquidityMetricsPerMarket: (marketId: number, params?: RequestParams) => Promise<AxiosResponse<LiquidityDashboardPerMarketResponse, any>>;
|
|
983
1083
|
};
|
|
984
1084
|
}
|
|
@@ -22,7 +22,7 @@ class HttpClient {
|
|
|
22
22
|
constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
|
|
23
23
|
this.instance = axios_1.default.create({
|
|
24
24
|
...axiosConfig,
|
|
25
|
-
baseURL: axiosConfig.baseURL || '
|
|
25
|
+
baseURL: axiosConfig.baseURL || 'http://localhost:8000',
|
|
26
26
|
});
|
|
27
27
|
this.secure = secure;
|
|
28
28
|
this.format = format;
|
|
@@ -162,13 +162,6 @@ class Sdk extends HttpClient {
|
|
|
162
162
|
}),
|
|
163
163
|
};
|
|
164
164
|
simulations = {
|
|
165
|
-
simulationsControllerGetDeposit: (query, params = {}) => this.request({
|
|
166
|
-
path: `/v1/simulations/deposit`,
|
|
167
|
-
method: 'GET',
|
|
168
|
-
query: query,
|
|
169
|
-
format: 'json',
|
|
170
|
-
...params,
|
|
171
|
-
}),
|
|
172
165
|
simulationsControllerGetDepositV2: (query, params = {}) => this.request({
|
|
173
166
|
path: `/v2/simulations/deposit`,
|
|
174
167
|
method: 'GET',
|
|
@@ -197,13 +190,6 @@ class Sdk extends HttpClient {
|
|
|
197
190
|
format: 'json',
|
|
198
191
|
...params,
|
|
199
192
|
}),
|
|
200
|
-
simulationsControllerGetPlaceOrder: (query, params = {}) => this.request({
|
|
201
|
-
path: `/v1/simulations/place-order`,
|
|
202
|
-
method: 'GET',
|
|
203
|
-
query: query,
|
|
204
|
-
format: 'json',
|
|
205
|
-
...params,
|
|
206
|
-
}),
|
|
207
193
|
simulationsControllerGetCancelOrder: (query, params = {}) => this.request({
|
|
208
194
|
path: `/v1/simulations/cancel-order`,
|
|
209
195
|
method: 'GET',
|
|
@@ -218,13 +204,6 @@ class Sdk extends HttpClient {
|
|
|
218
204
|
format: 'json',
|
|
219
205
|
...params,
|
|
220
206
|
}),
|
|
221
|
-
simulationsControllerCloseActiveMarketPosition: (query, params = {}) => this.request({
|
|
222
|
-
path: `/v1/simulations/close-active-position`,
|
|
223
|
-
method: 'GET',
|
|
224
|
-
query: query,
|
|
225
|
-
format: 'json',
|
|
226
|
-
...params,
|
|
227
|
-
}),
|
|
228
207
|
simulationsControllerGetAddLiquiditySingleCashToAmm: (query, params = {}) => this.request({
|
|
229
208
|
path: `/v1/simulations/add-liquidity-single-cash`,
|
|
230
209
|
method: 'GET',
|
|
@@ -263,13 +242,6 @@ class Sdk extends HttpClient {
|
|
|
263
242
|
format: 'json',
|
|
264
243
|
...params,
|
|
265
244
|
}),
|
|
266
|
-
calldataControllerGetWithdrawCalldata: (query, params = {}) => this.request({
|
|
267
|
-
path: `/v1/calldata/withdraw`,
|
|
268
|
-
method: 'GET',
|
|
269
|
-
query: query,
|
|
270
|
-
format: 'json',
|
|
271
|
-
...params,
|
|
272
|
-
}),
|
|
273
245
|
calldataControllerGetWithdrawRequestCalldata: (query, params = {}) => this.request({
|
|
274
246
|
path: `/v1/calldata/withdraw/request`,
|
|
275
247
|
method: 'GET',
|
|
@@ -298,6 +270,13 @@ class Sdk extends HttpClient {
|
|
|
298
270
|
format: 'json',
|
|
299
271
|
...params,
|
|
300
272
|
}),
|
|
273
|
+
calldataControllerGetPositionTransferCalldataV2: (query, params = {}) => this.request({
|
|
274
|
+
path: `/v2/calldata/cash-transfer`,
|
|
275
|
+
method: 'GET',
|
|
276
|
+
query: query,
|
|
277
|
+
format: 'json',
|
|
278
|
+
...params,
|
|
279
|
+
}),
|
|
301
280
|
calldataControllerGetPlaceOrderCalldataV2: (query, params = {}) => this.request({
|
|
302
281
|
path: `/v2/calldata/place-order`,
|
|
303
282
|
method: 'GET',
|
|
@@ -305,8 +284,8 @@ class Sdk extends HttpClient {
|
|
|
305
284
|
format: 'json',
|
|
306
285
|
...params,
|
|
307
286
|
}),
|
|
308
|
-
|
|
309
|
-
path: `/
|
|
287
|
+
calldataControllerGetPlaceOrderCalldataV3: (query, params = {}) => this.request({
|
|
288
|
+
path: `/v3/calldata/place-order`,
|
|
310
289
|
method: 'GET',
|
|
311
290
|
query: query,
|
|
312
291
|
format: 'json',
|
|
@@ -335,6 +314,13 @@ class Sdk extends HttpClient {
|
|
|
335
314
|
format: 'json',
|
|
336
315
|
...params,
|
|
337
316
|
}),
|
|
317
|
+
calldataControllerGetCancelOrderCalldataV2: (query, params = {}) => this.request({
|
|
318
|
+
path: `/v2/calldata/cancel-order`,
|
|
319
|
+
method: 'GET',
|
|
320
|
+
query: query,
|
|
321
|
+
format: 'json',
|
|
322
|
+
...params,
|
|
323
|
+
}),
|
|
338
324
|
calldataControllerGetCloseActiveMarketPositionV2: (query, params = {}) => this.request({
|
|
339
325
|
path: `/v2/calldata/close-active-position`,
|
|
340
326
|
method: 'GET',
|
|
@@ -342,8 +328,8 @@ class Sdk extends HttpClient {
|
|
|
342
328
|
format: 'json',
|
|
343
329
|
...params,
|
|
344
330
|
}),
|
|
345
|
-
|
|
346
|
-
path: `/
|
|
331
|
+
calldataControllerGetCloseActiveMarketPositionV3: (query, params = {}) => this.request({
|
|
332
|
+
path: `/v3/calldata/close-active-position`,
|
|
347
333
|
method: 'GET',
|
|
348
334
|
query: query,
|
|
349
335
|
format: 'json',
|
|
@@ -356,6 +342,13 @@ class Sdk extends HttpClient {
|
|
|
356
342
|
format: 'json',
|
|
357
343
|
...params,
|
|
358
344
|
}),
|
|
345
|
+
calldataControllerGetAddLiquiditySingleCashToAmmCalldataV2: (query, params = {}) => this.request({
|
|
346
|
+
path: `/v2/calldata/add-liquidity-single-cash-to-amm`,
|
|
347
|
+
method: 'GET',
|
|
348
|
+
query: query,
|
|
349
|
+
format: 'json',
|
|
350
|
+
...params,
|
|
351
|
+
}),
|
|
359
352
|
calldataControllerGetRemoveLiquiditySingleCashFromAmmCalldata: (query, params = {}) => this.request({
|
|
360
353
|
path: `/v1/calldata/remove-liquidity-single-cash-from-amm`,
|
|
361
354
|
method: 'GET',
|
|
@@ -363,8 +356,15 @@ class Sdk extends HttpClient {
|
|
|
363
356
|
format: 'json',
|
|
364
357
|
...params,
|
|
365
358
|
}),
|
|
366
|
-
|
|
367
|
-
path: `/
|
|
359
|
+
calldataControllerGetRemoveLiquiditySingleCashFromAmmCalldataV2: (query, params = {}) => this.request({
|
|
360
|
+
path: `/v2/calldata/remove-liquidity-single-cash-from-amm`,
|
|
361
|
+
method: 'GET',
|
|
362
|
+
query: query,
|
|
363
|
+
format: 'json',
|
|
364
|
+
...params,
|
|
365
|
+
}),
|
|
366
|
+
calldataControllerGetPayTreasuryCalldata: (query, params = {}) => this.request({
|
|
367
|
+
path: `/v1/calldata/pay-treasury`,
|
|
368
368
|
method: 'GET',
|
|
369
369
|
query: query,
|
|
370
370
|
format: 'json',
|
|
@@ -386,6 +386,13 @@ class Sdk extends HttpClient {
|
|
|
386
386
|
type: ContentType.Json,
|
|
387
387
|
...params,
|
|
388
388
|
}),
|
|
389
|
+
accountsControllerGetAccountGasBalance: (query, params = {}) => this.request({
|
|
390
|
+
path: `/v1/accounts/gas-balance`,
|
|
391
|
+
method: 'GET',
|
|
392
|
+
query: query,
|
|
393
|
+
format: 'json',
|
|
394
|
+
...params,
|
|
395
|
+
}),
|
|
389
396
|
};
|
|
390
397
|
pnL = {
|
|
391
398
|
pnlControllerGetPnlTransactions: (query, params = {}) => this.request({
|
|
@@ -439,6 +446,48 @@ class Sdk extends HttpClient {
|
|
|
439
446
|
format: 'json',
|
|
440
447
|
...params,
|
|
441
448
|
}),
|
|
449
|
+
riskControllerGetAmmImpliedRate: (query, params = {}) => this.request({
|
|
450
|
+
path: `/v1/risk/amm-implied-rate`,
|
|
451
|
+
method: 'GET',
|
|
452
|
+
query: query,
|
|
453
|
+
format: 'json',
|
|
454
|
+
...params,
|
|
455
|
+
}),
|
|
456
|
+
riskControllerGetPriceDeviation: (query, params = {}) => this.request({
|
|
457
|
+
path: `/v1/risk/price-deviation`,
|
|
458
|
+
method: 'GET',
|
|
459
|
+
query: query,
|
|
460
|
+
format: 'json',
|
|
461
|
+
...params,
|
|
462
|
+
}),
|
|
463
|
+
riskControllerGetUnhealthyVolume: (query, params = {}) => this.request({
|
|
464
|
+
path: `/v1/risk/unhealthy-volume`,
|
|
465
|
+
method: 'GET',
|
|
466
|
+
query: query,
|
|
467
|
+
format: 'json',
|
|
468
|
+
...params,
|
|
469
|
+
}),
|
|
470
|
+
riskControllerGetLiquidationCost: (query, params = {}) => this.request({
|
|
471
|
+
path: `/v1/risk/liquidation-cost`,
|
|
472
|
+
method: 'GET',
|
|
473
|
+
query: query,
|
|
474
|
+
format: 'json',
|
|
475
|
+
...params,
|
|
476
|
+
}),
|
|
477
|
+
riskControllerGetTradedVolume: (query, params = {}) => this.request({
|
|
478
|
+
path: `/v1/risk/traded-volume`,
|
|
479
|
+
method: 'GET',
|
|
480
|
+
query: query,
|
|
481
|
+
format: 'json',
|
|
482
|
+
...params,
|
|
483
|
+
}),
|
|
484
|
+
riskControllerGetLiquidityDepth: (query, params = {}) => this.request({
|
|
485
|
+
path: `/v1/risk/liquidity-depth`,
|
|
486
|
+
method: 'GET',
|
|
487
|
+
query: query,
|
|
488
|
+
format: 'json',
|
|
489
|
+
...params,
|
|
490
|
+
}),
|
|
442
491
|
};
|
|
443
492
|
settlement = {
|
|
444
493
|
settlementControllerGetSettlements: (query, params = {}) => this.request({
|
|
@@ -580,6 +629,12 @@ class Sdk extends HttpClient {
|
|
|
580
629
|
format: 'json',
|
|
581
630
|
...params,
|
|
582
631
|
}),
|
|
632
|
+
dashboardControllerGetLiquidityMetricsPerMarket: (marketId, params = {}) => this.request({
|
|
633
|
+
path: `/v1/dashboard/liquidity/${marketId}`,
|
|
634
|
+
method: 'GET',
|
|
635
|
+
format: 'json',
|
|
636
|
+
...params,
|
|
637
|
+
}),
|
|
583
638
|
};
|
|
584
639
|
}
|
|
585
640
|
exports.Sdk = Sdk;
|