@injectivelabs/sdk-ts 1.20.52 → 1.20.53
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/cjs/{AbacusGrpcApi-DwBUuoqV.cjs → AbacusGrpcApi-DexBiQxy.cjs} +1 -1
- package/dist/cjs/{BaseGrpcConsumer-Ppsh5NLZ.cjs → BaseGrpcConsumer-C1mk2V_9.cjs} +2 -2
- package/dist/cjs/{BaseIndexerGrpcConsumer-BYur8R3D.cjs → BaseIndexerGrpcConsumer-DVa_aYMU.cjs} +1 -1
- package/dist/cjs/{ChainGrpcExchangeApi-Cxcph7iG.cjs → ChainGrpcExchangeApi-CYPPc8yS.cjs} +3 -3
- package/dist/cjs/{ChainRestTendermintApi-lBt4Bo9-.cjs → ChainRestTendermintApi-BfE-2rtB.cjs} +2 -2
- package/dist/cjs/{SocialTradingGrpcApi-UXcBw3hy.cjs → ChartsTradingViewGrpcApi-BYuTrxWO.cjs} +187 -1
- package/dist/cjs/{DirectEthSecp256k1Wallet-DBw-GssU.cjs → DirectEthSecp256k1Wallet-KzazWAat.cjs} +1 -1
- package/dist/cjs/{ExecArgNeptuneWithdraw-DyJyZke3.cjs → ExecArgNeptuneWithdraw-C8xXDAvE.cjs} +2 -2
- package/dist/cjs/{IndexerGrpcWeb3GwApi-Du3x0BEl.cjs → IndexerGrpcWeb3GwApi-CPixqm9l.cjs} +2 -2
- package/dist/cjs/{MsgSetDenomMetadata-CJO2AZPg.cjs → MsgSetDenomMetadata-Bzu3UDR7.cjs} +6 -6
- package/dist/cjs/{OLPGrpcApi-B4Nk34KA.cjs → OLPGrpcApi-DMzqzTp-.cjs} +1 -1
- package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-DKD7pQUB.cjs → QueryTradingStrategyContractTotalStrategies-XOXsMgT9.cjs} +2 -2
- package/dist/cjs/{StreamManagerV2-DRXlho03.cjs → StreamManagerV2-dDz3sHWi.cjs} +5 -5
- package/dist/cjs/{TcAbacusGrpcApi-OXtCK4u8.cjs → TcAbacusGrpcApi-By_xt_w-.cjs} +1 -1
- package/dist/cjs/{accounts-Bhuko7RT.cjs → accounts-CEEO_tAS.cjs} +3 -3
- package/dist/cjs/{chain-DFYBhsui.cjs → chain-Vaqb4Vrm.cjs} +4 -4
- package/dist/cjs/client/abacus.cjs +4 -4
- package/dist/cjs/client/chain.cjs +9 -9
- package/dist/cjs/client/chain.d.cts +2 -2
- package/dist/cjs/client/indexer.cjs +9 -9
- package/dist/cjs/client/indexer.d.cts +2 -2
- package/dist/cjs/client/olp.cjs +5 -5
- package/dist/cjs/client/platformServices.cjs +7 -5
- package/dist/cjs/client/platformServices.d.cts +2 -2
- package/dist/cjs/client/tcAbacus.cjs +4 -4
- package/dist/cjs/client/wasm.cjs +12 -12
- package/dist/cjs/core/accounts.cjs +7 -6
- package/dist/cjs/core/accounts.d.cts +2 -2
- package/dist/cjs/core/modules.cjs +15 -15
- package/dist/cjs/core/modules.d.cts +2 -2
- package/dist/cjs/core/tx.cjs +12 -12
- package/dist/cjs/core/tx.d.cts +2 -2
- package/dist/cjs/cosmjs.cjs +13 -13
- package/dist/cjs/exports.cjs +13 -13
- package/dist/cjs/{index-Bml8CUoG.d.cts → index-BADdhB_k.d.cts} +405 -2
- package/dist/cjs/{index-BRi1PZdd.d.cts → index-He9ky3uA.d.cts} +19 -1
- package/dist/cjs/index.cjs +28 -24
- package/dist/cjs/index.d.cts +3 -3
- package/dist/cjs/{service-DAfIXxMj.cjs → service-UQHM4Fa_.cjs} +2 -2
- package/dist/cjs/service.cjs +6 -6
- package/dist/cjs/{tx-BbHKcjZg.cjs → tx-DHI9sPwo.cjs} +27 -13
- package/dist/cjs/types/light.cjs +1 -1
- package/dist/cjs/types.cjs +1 -1
- package/dist/cjs/utils/address.cjs +1 -1
- package/dist/cjs/utils/light.cjs +2 -2
- package/dist/cjs/{utils-CIqMZQ2o.cjs → utils-SKHr0NOv.cjs} +96 -0
- package/dist/cjs/utils.cjs +7 -4
- package/dist/cjs/utils.d.cts +3 -3
- package/dist/esm/{AbacusGrpcApi-BIHq_AVs.js → AbacusGrpcApi-CLdXH5bZ.js} +1 -1
- package/dist/esm/{BaseGrpcConsumer-DEDRwnCk.js → BaseGrpcConsumer-B2qNaBaq.js} +2 -2
- package/dist/esm/{BaseIndexerGrpcConsumer-DkRSQkU9.js → BaseIndexerGrpcConsumer-DKboflD4.js} +1 -1
- package/dist/esm/{ChainGrpcExchangeApi-TO68UPsx.js → ChainGrpcExchangeApi-AvCJkW7O.js} +3 -3
- package/dist/esm/{ChainRestTendermintApi-BnJPMbSU.js → ChainRestTendermintApi-CXHeGWjk.js} +2 -2
- package/dist/esm/{SocialTradingGrpcApi-Bax2F760.js → ChartsTradingViewGrpcApi-DDUNU_IX.js} +174 -2
- package/dist/esm/{DirectEthSecp256k1Wallet-D3DNBjSy.js → DirectEthSecp256k1Wallet-X82EheqC.js} +1 -1
- package/dist/esm/{ExecArgNeptuneWithdraw-BM5u-FxH.js → ExecArgNeptuneWithdraw-BzyfMVSe.js} +2 -2
- package/dist/esm/{IndexerGrpcWeb3GwApi-Dzaq-nAM.js → IndexerGrpcWeb3GwApi-DAMdV0I4.js} +2 -2
- package/dist/esm/{MsgSetDenomMetadata-DGzlaIXS.js → MsgSetDenomMetadata-CLenywd3.js} +6 -6
- package/dist/esm/{OLPGrpcApi-BaeWd600.js → OLPGrpcApi-CFbYM2qH.js} +1 -1
- package/dist/esm/{QueryTradingStrategyContractTotalStrategies-B3eiQdnj.js → QueryTradingStrategyContractTotalStrategies-D8-dSDkE.js} +2 -2
- package/dist/esm/{StreamManagerV2-Dnq2AWna.js → StreamManagerV2-DkBlluoc.js} +5 -5
- package/dist/esm/{TcAbacusGrpcApi-jJvLuo3L.js → TcAbacusGrpcApi-l8vyZCck.js} +1 -1
- package/dist/esm/{accounts-bOFI_1wE.js → accounts-CSXPhB6W.js} +3 -3
- package/dist/esm/{chain-Jr63sBTP.js → chain-B1k6xknc.js} +4 -4
- package/dist/esm/client/abacus.js +4 -4
- package/dist/esm/client/chain.d.ts +2 -2
- package/dist/esm/client/chain.js +9 -9
- package/dist/esm/client/indexer.d.ts +2 -2
- package/dist/esm/client/indexer.js +9 -9
- package/dist/esm/client/olp.js +5 -5
- package/dist/esm/client/platformServices.d.ts +2 -2
- package/dist/esm/client/platformServices.js +5 -5
- package/dist/esm/client/tcAbacus.js +4 -4
- package/dist/esm/client/wasm.js +12 -12
- package/dist/esm/core/accounts.d.ts +2 -2
- package/dist/esm/core/accounts.js +7 -6
- package/dist/esm/core/modules.d.ts +2 -2
- package/dist/esm/core/modules.js +15 -15
- package/dist/esm/core/tx.d.ts +2 -2
- package/dist/esm/core/tx.js +12 -12
- package/dist/esm/cosmjs.js +13 -13
- package/dist/esm/exports.js +13 -13
- package/dist/esm/{index-uEknWjpx.d.ts → index-Bq0LFse7.d.ts} +19 -1
- package/dist/esm/{index-tgSyqu1L.d.ts → index-DMei-AO6.d.ts} +405 -2
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +24 -24
- package/dist/esm/{service-ByVrhiMR.js → service-BJtGNIsI.js} +2 -2
- package/dist/esm/service.js +6 -6
- package/dist/esm/{tx-BxMH4W6J.js → tx-CVLB4qip.js} +27 -13
- package/dist/esm/types/light.js +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/utils/address.js +1 -1
- package/dist/esm/utils/light.js +2 -2
- package/dist/esm/{utils-BvlndkVI.js → utils-gwPCLHN6.js} +85 -1
- package/dist/esm/utils.d.ts +3 -3
- package/dist/esm/utils.js +6 -5
- package/package.json +6 -6
- /package/dist/cjs/{MsgBase-BrhVMws0.cjs → MsgBase-BqZWKNPE.cjs} +0 -0
- /package/dist/cjs/{address-light-C_a6b8yF.cjs → address-light-DUoYqdPQ.cjs} +0 -0
- /package/dist/cjs/{coins-DRrEtaSG.cjs → coins-DBj8089z.cjs} +0 -0
- /package/dist/cjs/{grpc-3Z8ffFdZ.cjs → grpc-D_3PKEFB.cjs} +0 -0
- /package/dist/cjs/{light-CrajlUvd.cjs → light-zeGviAVI.cjs} +0 -0
- /package/dist/esm/{MsgBase-CmMIxNsl.js → MsgBase-BQlZFcm-.js} +0 -0
- /package/dist/esm/{address-light-B2JvY3Or.js → address-light-CwLNB73Y.js} +0 -0
- /package/dist/esm/{coins-MO-ob9NV.js → coins-DTdsvmX2.js} +0 -0
- /package/dist/esm/{grpc-D2EQHGkK.js → grpc-CSo1TcHx.js} +0 -0
- /package/dist/esm/{light-BBrX6IRm.js → light-BUFhVek8.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-C4GGGY9p.js";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@injectivelabs+platform-services-proto-ts-v2@1.0.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+platform-services-proto-ts-v2@1.0.8/node_modules/@injectivelabs/platform-services-proto-ts-v2/generated/goagen_api_positions_service_pb.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Persisted derivative position
|
|
@@ -119,6 +119,13 @@ interface Position {
|
|
|
119
119
|
* @generated from protobuf field: string exit_price = 28
|
|
120
120
|
*/
|
|
121
121
|
exitPrice: string;
|
|
122
|
+
/**
|
|
123
|
+
* Realized PNL converted to USD, each realizing trade at the quote asset USD
|
|
124
|
+
* oracle price in force at its block.
|
|
125
|
+
*
|
|
126
|
+
* @generated from protobuf field: string pnl_usd = 29
|
|
127
|
+
*/
|
|
128
|
+
pnlUsd: string;
|
|
122
129
|
}
|
|
123
130
|
/**
|
|
124
131
|
* A trade applied to a position
|
|
@@ -150,6 +157,13 @@ interface PositionTrade {
|
|
|
150
157
|
* @generated from protobuf field: string pnl = 6
|
|
151
158
|
*/
|
|
152
159
|
pnl: string;
|
|
160
|
+
/**
|
|
161
|
+
* Realized PNL of the trade converted to USD at the quote asset USD oracle
|
|
162
|
+
* price in force at its block.
|
|
163
|
+
*
|
|
164
|
+
* @generated from protobuf field: string pnl_usd = 7
|
|
165
|
+
*/
|
|
166
|
+
pnlUsd: string;
|
|
153
167
|
}
|
|
154
168
|
/**
|
|
155
169
|
* Daily realized PNL
|
|
@@ -291,6 +305,255 @@ declare const DailyPNL = new DailyPNL$Type();
|
|
|
291
305
|
*/
|
|
292
306
|
declare const AccountPositionStats = new AccountPositionStats$Type();
|
|
293
307
|
//#endregion
|
|
308
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+platform-services-proto-ts-v2@1.0.8/node_modules/@injectivelabs/platform-services-proto-ts-v2/generated/goagen_api_injective_archiver_rpc_pb.d.ts
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @generated from protobuf message injective_archiver_rpc.HistoricalTrade
|
|
312
|
+
*/
|
|
313
|
+
interface HistoricalTrade {
|
|
314
|
+
/**
|
|
315
|
+
* Account address
|
|
316
|
+
*
|
|
317
|
+
* @generated from protobuf field: string account = 1
|
|
318
|
+
*/
|
|
319
|
+
account: string;
|
|
320
|
+
/**
|
|
321
|
+
* The subaccountId that executed the trade
|
|
322
|
+
*
|
|
323
|
+
* @generated from protobuf field: string subaccount_id = 2
|
|
324
|
+
*/
|
|
325
|
+
subaccountId: string;
|
|
326
|
+
/**
|
|
327
|
+
* The ID of the market that this trade is in
|
|
328
|
+
*
|
|
329
|
+
* @generated from protobuf field: string market_id = 3
|
|
330
|
+
*/
|
|
331
|
+
marketId: string;
|
|
332
|
+
/**
|
|
333
|
+
* The direction the trade
|
|
334
|
+
*
|
|
335
|
+
* @generated from protobuf field: string trade_direction = 4
|
|
336
|
+
*/
|
|
337
|
+
tradeDirection: string;
|
|
338
|
+
/**
|
|
339
|
+
* Price level at which trade has been executed
|
|
340
|
+
*
|
|
341
|
+
* @generated from protobuf field: injective_archiver_rpc.PriceLevel price = 5
|
|
342
|
+
*/
|
|
343
|
+
price?: PriceLevel;
|
|
344
|
+
/**
|
|
345
|
+
* The fee associated with the trade (quote asset denom)
|
|
346
|
+
*
|
|
347
|
+
* @generated from protobuf field: string fee = 6
|
|
348
|
+
*/
|
|
349
|
+
fee: string;
|
|
350
|
+
/**
|
|
351
|
+
* Timestamp of trade execution in UNIX millis
|
|
352
|
+
*
|
|
353
|
+
* @generated from protobuf field: sint64 executed_at = 7
|
|
354
|
+
*/
|
|
355
|
+
executedAt: bigint;
|
|
356
|
+
/**
|
|
357
|
+
* Block height of trade execution
|
|
358
|
+
*
|
|
359
|
+
* @generated from protobuf field: uint64 executed_height = 8
|
|
360
|
+
*/
|
|
361
|
+
executedHeight: bigint;
|
|
362
|
+
/**
|
|
363
|
+
* Fee recipient address
|
|
364
|
+
*
|
|
365
|
+
* @generated from protobuf field: string fee_recipient = 9
|
|
366
|
+
*/
|
|
367
|
+
feeRecipient: string;
|
|
368
|
+
/**
|
|
369
|
+
* Trade's execution side, maker,taker,n/a (n/a = not applicable)
|
|
370
|
+
*
|
|
371
|
+
* @generated from protobuf field: string execution_side = 10
|
|
372
|
+
*/
|
|
373
|
+
executionSide: string;
|
|
374
|
+
/**
|
|
375
|
+
* USD value of the trade at the time of execution
|
|
376
|
+
*
|
|
377
|
+
* @generated from protobuf field: string usd_value = 11
|
|
378
|
+
*/
|
|
379
|
+
usdValue: string;
|
|
380
|
+
/**
|
|
381
|
+
* A list of flag assigned to the trade
|
|
382
|
+
*
|
|
383
|
+
* @generated from protobuf field: repeated string flags = 12
|
|
384
|
+
*/
|
|
385
|
+
flags: string[];
|
|
386
|
+
/**
|
|
387
|
+
* Type of market
|
|
388
|
+
*
|
|
389
|
+
* @generated from protobuf field: string market_type = 13
|
|
390
|
+
*/
|
|
391
|
+
marketType: string;
|
|
392
|
+
/**
|
|
393
|
+
* Unique trade ID
|
|
394
|
+
*
|
|
395
|
+
* @generated from protobuf field: string trade_id = 14
|
|
396
|
+
*/
|
|
397
|
+
tradeId: string;
|
|
398
|
+
/**
|
|
399
|
+
* The execution type of the trade
|
|
400
|
+
*
|
|
401
|
+
* @generated from protobuf field: string execution_type = 15
|
|
402
|
+
*/
|
|
403
|
+
executionType: string;
|
|
404
|
+
/**
|
|
405
|
+
* Client-provided unique identifier for the order
|
|
406
|
+
*
|
|
407
|
+
* @generated from protobuf field: string cid = 16
|
|
408
|
+
*/
|
|
409
|
+
cid: string;
|
|
410
|
+
/**
|
|
411
|
+
* The funding rate at the time of the trade execution, applicable only for
|
|
412
|
+
* derivative trades
|
|
413
|
+
*
|
|
414
|
+
* @generated from protobuf field: string funding_rate = 17
|
|
415
|
+
*/
|
|
416
|
+
fundingRate: string;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* @generated from protobuf message injective_archiver_rpc.PriceLevel
|
|
420
|
+
*/
|
|
421
|
+
interface PriceLevel {
|
|
422
|
+
/**
|
|
423
|
+
* Price number of the price level.
|
|
424
|
+
*
|
|
425
|
+
* @generated from protobuf field: string price = 1
|
|
426
|
+
*/
|
|
427
|
+
price: string;
|
|
428
|
+
/**
|
|
429
|
+
* Quantity of the price level.
|
|
430
|
+
*
|
|
431
|
+
* @generated from protobuf field: string quantity = 2
|
|
432
|
+
*/
|
|
433
|
+
quantity: string;
|
|
434
|
+
/**
|
|
435
|
+
* Price level last updated timestamp in UNIX millis.
|
|
436
|
+
*
|
|
437
|
+
* @generated from protobuf field: sint64 timestamp = 3
|
|
438
|
+
*/
|
|
439
|
+
timestamp: bigint;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* @generated MessageType for protobuf message injective_archiver_rpc.HistoricalTrade
|
|
443
|
+
*/
|
|
444
|
+
declare const HistoricalTrade = new HistoricalTrade$Type();
|
|
445
|
+
/**
|
|
446
|
+
* @generated MessageType for protobuf message injective_archiver_rpc.PriceLevel
|
|
447
|
+
*/
|
|
448
|
+
declare const PriceLevel = new PriceLevel$Type();
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+platform-services-proto-ts-v2@1.0.8/node_modules/@injectivelabs/platform-services-proto-ts-v2/generated/goagen_api_charts_trading_view_service_pb.d.ts
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* @generated from protobuf message charts_trading_view_service.SpotMarketHistoryResponse
|
|
454
|
+
*/
|
|
455
|
+
interface SpotMarketHistoryResponse {
|
|
456
|
+
/**
|
|
457
|
+
* Status of the request: ok | no_data | error.
|
|
458
|
+
*
|
|
459
|
+
* @generated from protobuf field: string s = 1
|
|
460
|
+
*/
|
|
461
|
+
s: string;
|
|
462
|
+
/**
|
|
463
|
+
* Bar open times, Unix timestamp (UTC).
|
|
464
|
+
*
|
|
465
|
+
* @generated from protobuf field: repeated sint32 t = 2
|
|
466
|
+
*/
|
|
467
|
+
t: number[];
|
|
468
|
+
/**
|
|
469
|
+
* Open prices.
|
|
470
|
+
*
|
|
471
|
+
* @generated from protobuf field: repeated double o = 3
|
|
472
|
+
*/
|
|
473
|
+
o: number[];
|
|
474
|
+
/**
|
|
475
|
+
* High prices.
|
|
476
|
+
*
|
|
477
|
+
* @generated from protobuf field: repeated double h = 4
|
|
478
|
+
*/
|
|
479
|
+
h: number[];
|
|
480
|
+
/**
|
|
481
|
+
* Low prices.
|
|
482
|
+
*
|
|
483
|
+
* @generated from protobuf field: repeated double l = 5
|
|
484
|
+
*/
|
|
485
|
+
l: number[];
|
|
486
|
+
/**
|
|
487
|
+
* Close prices.
|
|
488
|
+
*
|
|
489
|
+
* @generated from protobuf field: repeated double c = 6
|
|
490
|
+
*/
|
|
491
|
+
c: number[];
|
|
492
|
+
/**
|
|
493
|
+
* Quote-notional volumes.
|
|
494
|
+
*
|
|
495
|
+
* @generated from protobuf field: repeated double v = 7
|
|
496
|
+
*/
|
|
497
|
+
v: number[];
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Rolling market summary for a resolution window.
|
|
501
|
+
*
|
|
502
|
+
* @generated from protobuf message charts_trading_view_service.MarketSummaryResp
|
|
503
|
+
*/
|
|
504
|
+
interface MarketSummaryResp {
|
|
505
|
+
/**
|
|
506
|
+
* Market ID.
|
|
507
|
+
*
|
|
508
|
+
* @generated from protobuf field: string market_id = 1
|
|
509
|
+
*/
|
|
510
|
+
marketId: string;
|
|
511
|
+
/**
|
|
512
|
+
* Open price.
|
|
513
|
+
*
|
|
514
|
+
* @generated from protobuf field: double open = 2
|
|
515
|
+
*/
|
|
516
|
+
open: number;
|
|
517
|
+
/**
|
|
518
|
+
* High price.
|
|
519
|
+
*
|
|
520
|
+
* @generated from protobuf field: double high = 3
|
|
521
|
+
*/
|
|
522
|
+
high: number;
|
|
523
|
+
/**
|
|
524
|
+
* Low price.
|
|
525
|
+
*
|
|
526
|
+
* @generated from protobuf field: double low = 4
|
|
527
|
+
*/
|
|
528
|
+
low: number;
|
|
529
|
+
/**
|
|
530
|
+
* Quote-notional volume over the window.
|
|
531
|
+
*
|
|
532
|
+
* @generated from protobuf field: double volume = 5
|
|
533
|
+
*/
|
|
534
|
+
volume: number;
|
|
535
|
+
/**
|
|
536
|
+
* Latest close price.
|
|
537
|
+
*
|
|
538
|
+
* @generated from protobuf field: double price = 6
|
|
539
|
+
*/
|
|
540
|
+
price: number;
|
|
541
|
+
/**
|
|
542
|
+
* Change percent from opening price.
|
|
543
|
+
*
|
|
544
|
+
* @generated from protobuf field: double change = 7
|
|
545
|
+
*/
|
|
546
|
+
change: number;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* @generated MessageType for protobuf message charts_trading_view_service.SpotMarketHistoryResponse
|
|
550
|
+
*/
|
|
551
|
+
declare const SpotMarketHistoryResponse = new SpotMarketHistoryResponse$Type();
|
|
552
|
+
/**
|
|
553
|
+
* @generated MessageType for protobuf message charts_trading_view_service.MarketSummaryResp
|
|
554
|
+
*/
|
|
555
|
+
declare const MarketSummaryResp = new MarketSummaryResp$Type();
|
|
556
|
+
//#endregion
|
|
294
557
|
//#region src/client/platformServices/types/platformServices.d.ts
|
|
295
558
|
type PlatformServicesPositionsStatsWindow = '24h' | '7d' | '30d' | 'all_time';
|
|
296
559
|
type PlatformServicesPositionsSortBy = 'pnl' | 'trade_count' | 'num_trades' | 'win_rate' | 'avg_duration' | 'avg_hold_duration';
|
|
@@ -349,6 +612,7 @@ interface PlatformServicesGetAccountCountParams {
|
|
|
349
612
|
interface PlatformServicesPosition {
|
|
350
613
|
id: string;
|
|
351
614
|
pnl: string;
|
|
615
|
+
pnlUsd: string;
|
|
352
616
|
side: string;
|
|
353
617
|
fees: string;
|
|
354
618
|
state: string;
|
|
@@ -381,6 +645,7 @@ interface PlatformServicesListPositionsResponse {
|
|
|
381
645
|
}
|
|
382
646
|
interface PlatformServicesPositionTrade {
|
|
383
647
|
pnl: string;
|
|
648
|
+
pnlUsd: string;
|
|
384
649
|
amount: string;
|
|
385
650
|
timestamp: string;
|
|
386
651
|
eventType: string;
|
|
@@ -432,6 +697,134 @@ type GrpcPlatformServicesPosition = Position;
|
|
|
432
697
|
type GrpcPlatformServicesPositionTrade = PositionTrade;
|
|
433
698
|
type GrpcPlatformServicesAccountPositionStats = AccountPositionStats;
|
|
434
699
|
type GrpcPlatformServicesDailyPNL = DailyPNL;
|
|
700
|
+
interface PlatformServicesMarketHistoryParams {
|
|
701
|
+
resolution: string;
|
|
702
|
+
to: number;
|
|
703
|
+
symbol?: string;
|
|
704
|
+
marketId?: string;
|
|
705
|
+
from?: number;
|
|
706
|
+
countback?: number;
|
|
707
|
+
}
|
|
708
|
+
interface PlatformServicesSpotMarketHistoryParams extends PlatformServicesMarketHistoryParams {
|
|
709
|
+
fillGaps?: boolean;
|
|
710
|
+
}
|
|
711
|
+
interface PlatformServicesSpotMarketSummaryParams {
|
|
712
|
+
marketId: string;
|
|
713
|
+
resolution?: string;
|
|
714
|
+
}
|
|
715
|
+
interface PlatformServicesAllSpotMarketSummariesParams {
|
|
716
|
+
resolution?: string;
|
|
717
|
+
}
|
|
718
|
+
interface PlatformServicesMarketHistory {
|
|
719
|
+
s: string;
|
|
720
|
+
t: number[];
|
|
721
|
+
o: number[];
|
|
722
|
+
h: number[];
|
|
723
|
+
l: number[];
|
|
724
|
+
c: number[];
|
|
725
|
+
v: number[];
|
|
726
|
+
}
|
|
727
|
+
interface PlatformServicesSpotMarketSummary {
|
|
728
|
+
marketId: string;
|
|
729
|
+
open: number;
|
|
730
|
+
high: number;
|
|
731
|
+
low: number;
|
|
732
|
+
volume: number;
|
|
733
|
+
price: number;
|
|
734
|
+
change: number;
|
|
735
|
+
}
|
|
736
|
+
interface PlatformServicesArchiverAccountParams {
|
|
737
|
+
account: string;
|
|
738
|
+
resolution?: string;
|
|
739
|
+
}
|
|
740
|
+
interface PlatformServicesArchiverAccountStatsParams {
|
|
741
|
+
account: string;
|
|
742
|
+
period?: string;
|
|
743
|
+
}
|
|
744
|
+
interface PlatformServicesHistoricalTradesParams {
|
|
745
|
+
fromBlock?: bigint;
|
|
746
|
+
endBlock?: bigint;
|
|
747
|
+
fromTime?: bigint;
|
|
748
|
+
endTime?: bigint;
|
|
749
|
+
perPage?: number;
|
|
750
|
+
token?: string;
|
|
751
|
+
account?: string;
|
|
752
|
+
executionTypes?: string[];
|
|
753
|
+
}
|
|
754
|
+
interface PlatformServicesHistoricalDetailedBalance {
|
|
755
|
+
spot: number;
|
|
756
|
+
perp: number;
|
|
757
|
+
staking: number;
|
|
758
|
+
}
|
|
759
|
+
interface PlatformServicesHistoricalBalance {
|
|
760
|
+
t: number[];
|
|
761
|
+
v: number[];
|
|
762
|
+
dv: PlatformServicesHistoricalDetailedBalance[];
|
|
763
|
+
}
|
|
764
|
+
interface PlatformServicesBalanceResponse {
|
|
765
|
+
historicalBalance?: PlatformServicesHistoricalBalance;
|
|
766
|
+
}
|
|
767
|
+
interface PlatformServicesArchiverAccountStats {
|
|
768
|
+
account: string;
|
|
769
|
+
pnl: number;
|
|
770
|
+
volume: number;
|
|
771
|
+
stake: string;
|
|
772
|
+
}
|
|
773
|
+
interface PlatformServicesHistoricalDetailedPnl {
|
|
774
|
+
rpnl: number;
|
|
775
|
+
upnl: number;
|
|
776
|
+
}
|
|
777
|
+
interface PlatformServicesHistoricalRpnl {
|
|
778
|
+
t: number[];
|
|
779
|
+
v: number[];
|
|
780
|
+
dv: PlatformServicesHistoricalDetailedPnl[];
|
|
781
|
+
}
|
|
782
|
+
interface PlatformServicesRpnlResponse {
|
|
783
|
+
historicalRpnl?: PlatformServicesHistoricalRpnl;
|
|
784
|
+
}
|
|
785
|
+
interface PlatformServicesArchiverPriceLevel {
|
|
786
|
+
price: string;
|
|
787
|
+
quantity: string;
|
|
788
|
+
timestamp: string;
|
|
789
|
+
}
|
|
790
|
+
interface PlatformServicesHistoricalTrade {
|
|
791
|
+
account: string;
|
|
792
|
+
subaccountId: string;
|
|
793
|
+
marketId: string;
|
|
794
|
+
tradeDirection: string;
|
|
795
|
+
price?: PlatformServicesArchiverPriceLevel;
|
|
796
|
+
fee: string;
|
|
797
|
+
executedAt: string;
|
|
798
|
+
executedHeight: string;
|
|
799
|
+
feeRecipient: string;
|
|
800
|
+
executionSide: string;
|
|
801
|
+
usdValue: string;
|
|
802
|
+
flags: string[];
|
|
803
|
+
marketType: string;
|
|
804
|
+
tradeId: string;
|
|
805
|
+
executionType: string;
|
|
806
|
+
cid: string;
|
|
807
|
+
fundingRate: string;
|
|
808
|
+
}
|
|
809
|
+
interface PlatformServicesHistoricalTradesResponse {
|
|
810
|
+
trades: PlatformServicesHistoricalTrade[];
|
|
811
|
+
lastHeight: string;
|
|
812
|
+
lastTime: string;
|
|
813
|
+
next: string[];
|
|
814
|
+
}
|
|
815
|
+
type GrpcPlatformServicesChartMarketHistory = SpotMarketHistoryResponse;
|
|
816
|
+
type GrpcPlatformServicesChartMarketSummary = MarketSummaryResp;
|
|
817
|
+
type GrpcPlatformServicesHistoricalTrade = HistoricalTrade;
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/client/platformServices/grpc/ArchiverGrpcApi.d.ts
|
|
820
|
+
declare class ArchiverGrpcApi extends BaseGrpcConsumer {
|
|
821
|
+
protected module: string;
|
|
822
|
+
private get client();
|
|
823
|
+
fetchBalance(params: PlatformServicesArchiverAccountParams): Promise<PlatformServicesBalanceResponse>;
|
|
824
|
+
fetchAccountStats(params: PlatformServicesArchiverAccountStatsParams): Promise<PlatformServicesArchiverAccountStats>;
|
|
825
|
+
fetchRpnl(params: PlatformServicesArchiverAccountParams): Promise<PlatformServicesRpnlResponse>;
|
|
826
|
+
fetchHistoricalTrades(params?: PlatformServicesHistoricalTradesParams): Promise<PlatformServicesHistoricalTradesResponse>;
|
|
827
|
+
}
|
|
435
828
|
//#endregion
|
|
436
829
|
//#region src/client/platformServices/grpc/SocialTradingGrpcApi.d.ts
|
|
437
830
|
declare class SocialTradingGrpcApi extends BaseGrpcConsumer {
|
|
@@ -446,4 +839,14 @@ declare class SocialTradingGrpcApi extends BaseGrpcConsumer {
|
|
|
446
839
|
fetchAccountPositionStatsList(params?: PlatformServicesListAccountPositionStatsParams): Promise<PlatformServicesListAccountPositionStatsResponse>;
|
|
447
840
|
}
|
|
448
841
|
//#endregion
|
|
449
|
-
|
|
842
|
+
//#region src/client/platformServices/grpc/ChartsTradingViewGrpcApi.d.ts
|
|
843
|
+
declare class ChartsTradingViewGrpcApi extends BaseGrpcConsumer {
|
|
844
|
+
protected module: string;
|
|
845
|
+
private get client();
|
|
846
|
+
fetchDerivativeMarketHistory(params: PlatformServicesMarketHistoryParams): Promise<PlatformServicesMarketHistory>;
|
|
847
|
+
fetchSpotMarketHistory(params: PlatformServicesSpotMarketHistoryParams): Promise<PlatformServicesMarketHistory>;
|
|
848
|
+
fetchSpotMarketSummary(params: PlatformServicesSpotMarketSummaryParams): Promise<PlatformServicesSpotMarketSummary>;
|
|
849
|
+
fetchAllSpotMarketSummaries(params?: PlatformServicesAllSpotMarketSummariesParams): Promise<PlatformServicesSpotMarketSummary[]>;
|
|
850
|
+
}
|
|
851
|
+
//#endregion
|
|
852
|
+
export { PlatformServicesHistoricalTradesResponse as A, PlatformServicesPosition as B, PlatformServicesGetAccountPositionStatsParams as C, PlatformServicesHistoricalRpnl as D, PlatformServicesHistoricalDetailedPnl as E, PlatformServicesListPositionTradesResponse as F, PlatformServicesRpnlResponse as G, PlatformServicesPositionsSortBy as H, PlatformServicesListPositionsParams as I, PlatformServicesSpotMarketSummaryParams as J, PlatformServicesSpotMarketHistoryParams as K, PlatformServicesListPositionsResponse as L, PlatformServicesListAccountPositionStatsResponse as M, PlatformServicesListAccountTagsResponse as N, PlatformServicesHistoricalTrade as O, PlatformServicesListPositionTradesParams as P, PlatformServicesMarketHistory as R, PlatformServicesGetAccountDailyPNLResponse as S, PlatformServicesHistoricalDetailedBalance as T, PlatformServicesPositionsSortDirection as U, PlatformServicesPositionTrade as V, PlatformServicesPositionsStatsWindow as W, PlatformServicesBalanceResponse as _, GrpcPlatformServicesChartMarketHistory as a, PlatformServicesGetAccountCountResponse as b, GrpcPlatformServicesHistoricalTrade as c, PlatformServicesAccountPositionStats as d, PlatformServicesAllSpotMarketSummariesParams as f, PlatformServicesArchiverPriceLevel as g, PlatformServicesArchiverAccountStatsParams as h, GrpcPlatformServicesAccountPositionStats as i, PlatformServicesListAccountPositionStatsParams as j, PlatformServicesHistoricalTradesParams as k, GrpcPlatformServicesPosition as l, PlatformServicesArchiverAccountStats as m, SocialTradingGrpcApi as n, GrpcPlatformServicesChartMarketSummary as o, PlatformServicesArchiverAccountParams as p, PlatformServicesSpotMarketSummary as q, ArchiverGrpcApi as r, GrpcPlatformServicesDailyPNL as s, ChartsTradingViewGrpcApi as t, GrpcPlatformServicesPositionTrade as u, PlatformServicesDailyPNL as v, PlatformServicesHistoricalBalance as w, PlatformServicesGetAccountDailyPNLParams as x, PlatformServicesGetAccountCountParams as y, PlatformServicesMarketHistoryParams as z };
|