@n1xyz/nord-ts 0.6.1 → 0.6.2
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/gen/openapi.d.ts +115 -95
- package/dist/index.browser.js +79 -67
- package/dist/index.common.js +91 -76
- package/dist/types.d.ts +13 -10
- package/dist/websocket/NordWebSocketClient.d.ts +6 -0
- package/dist/websocket/events.d.ts +2 -1
- package/package.json +2 -2
package/dist/gen/openapi.d.ts
CHANGED
|
@@ -4057,7 +4057,6 @@ export interface components {
|
|
|
4057
4057
|
openInterest: number;
|
|
4058
4058
|
};
|
|
4059
4059
|
MarketNotFound: {
|
|
4060
|
-
/** Format: uint32 */
|
|
4061
4060
|
market_id: number;
|
|
4062
4061
|
};
|
|
4063
4062
|
AcceptedMediaType: {
|
|
@@ -4111,10 +4110,7 @@ export interface components {
|
|
|
4111
4110
|
* Fee is taken from user without return.
|
|
4112
4111
|
* Please note that some operations need some deposit which will be returned - these are not part of fees. */
|
|
4113
4112
|
FillRole: "maker" | "taker";
|
|
4114
|
-
/**
|
|
4115
|
-
* Format: uint32
|
|
4116
|
-
* @description 31 bit account id
|
|
4117
|
-
*/
|
|
4113
|
+
/** @description 31 bit account id */
|
|
4118
4114
|
AccountId: number;
|
|
4119
4115
|
UserNotFound: null;
|
|
4120
4116
|
OrderbookL2Info: {
|
|
@@ -4232,7 +4228,6 @@ export interface components {
|
|
|
4232
4228
|
/** Format: uint64 */
|
|
4233
4229
|
tradeId: number;
|
|
4234
4230
|
traderId: components["schemas"]["AccountId"];
|
|
4235
|
-
/** Format: uint32 */
|
|
4236
4231
|
marketId: number;
|
|
4237
4232
|
/** Format: uint64 */
|
|
4238
4233
|
orderId: number;
|
|
@@ -4251,7 +4246,7 @@ export interface components {
|
|
|
4251
4246
|
originalSizeLimit?: number | null;
|
|
4252
4247
|
/** Format: double */
|
|
4253
4248
|
originalPriceLimit?: number | null;
|
|
4254
|
-
|
|
4249
|
+
placementRole: components["schemas"]["PlacementRole"];
|
|
4255
4250
|
finalizationReason?: components["schemas"]["FinalizationReason"] | null;
|
|
4256
4251
|
marketSymbol: string;
|
|
4257
4252
|
tokenSymbol: string;
|
|
@@ -4548,7 +4543,6 @@ export interface components {
|
|
|
4548
4543
|
*/
|
|
4549
4544
|
pageSize: number | null;
|
|
4550
4545
|
/**
|
|
4551
|
-
* Format: uint32
|
|
4552
4546
|
* @description Optional market filter by market id.
|
|
4553
4547
|
* @default null
|
|
4554
4548
|
*/
|
|
@@ -4573,10 +4567,7 @@ export interface components {
|
|
|
4573
4567
|
actionId: number;
|
|
4574
4568
|
/** @description Sub-action id of the update. Used with action id for pagination. */
|
|
4575
4569
|
subActionId: components["schemas"]["SubActionId"];
|
|
4576
|
-
/**
|
|
4577
|
-
* Format: uint32
|
|
4578
|
-
* @description Market id of the position update.
|
|
4579
|
-
*/
|
|
4570
|
+
/** @description Market id of the position update. */
|
|
4580
4571
|
marketId: number;
|
|
4581
4572
|
/**
|
|
4582
4573
|
* Format: double
|
|
@@ -4632,7 +4623,6 @@ export interface components {
|
|
|
4632
4623
|
*/
|
|
4633
4624
|
pageSize: number | null;
|
|
4634
4625
|
/**
|
|
4635
|
-
* Format: uint32
|
|
4636
4626
|
* @description Optional market filter by market id.
|
|
4637
4627
|
* @default null
|
|
4638
4628
|
*/
|
|
@@ -4656,10 +4646,7 @@ export interface components {
|
|
|
4656
4646
|
actionId: number;
|
|
4657
4647
|
/** @description Sub-action id of the update. Used with action id for pagination. */
|
|
4658
4648
|
subActionId: components["schemas"]["SubActionId"];
|
|
4659
|
-
/**
|
|
4660
|
-
* Format: uint32
|
|
4661
|
-
* @description Market id of the position update.
|
|
4662
|
-
*/
|
|
4649
|
+
/** @description Market id of the position update. */
|
|
4663
4650
|
marketId: number;
|
|
4664
4651
|
/**
|
|
4665
4652
|
* Format: double
|
|
@@ -4696,7 +4683,6 @@ export interface components {
|
|
|
4696
4683
|
*/
|
|
4697
4684
|
until: string;
|
|
4698
4685
|
/**
|
|
4699
|
-
* Format: uint32
|
|
4700
4686
|
* @description Optional market filter by market id.
|
|
4701
4687
|
* @default null
|
|
4702
4688
|
*/
|
|
@@ -4709,7 +4695,6 @@ export interface components {
|
|
|
4709
4695
|
lastUpdatedAtActionId: number;
|
|
4710
4696
|
};
|
|
4711
4697
|
AccountPnlSummaryInfo: {
|
|
4712
|
-
/** Format: uint32 */
|
|
4713
4698
|
marketId: number;
|
|
4714
4699
|
/** Format: double */
|
|
4715
4700
|
tradingPnl: number;
|
|
@@ -4736,7 +4721,6 @@ export interface components {
|
|
|
4736
4721
|
*/
|
|
4737
4722
|
pageSize: number | null;
|
|
4738
4723
|
/**
|
|
4739
|
-
* Format: uint32
|
|
4740
4724
|
* @description Optional market filter by market id.
|
|
4741
4725
|
* @default null
|
|
4742
4726
|
*/
|
|
@@ -4758,10 +4742,7 @@ export interface components {
|
|
|
4758
4742
|
* @description Action id of the update. Used for pagination.
|
|
4759
4743
|
*/
|
|
4760
4744
|
actionId: number;
|
|
4761
|
-
/**
|
|
4762
|
-
* Format: uint32
|
|
4763
|
-
* @description Market id of the position update.
|
|
4764
|
-
*/
|
|
4745
|
+
/** @description Market id of the position update. */
|
|
4765
4746
|
marketId: number;
|
|
4766
4747
|
/**
|
|
4767
4748
|
* Format: double
|
|
@@ -4858,7 +4839,6 @@ export interface components {
|
|
|
4858
4839
|
/** Format: uint64 */
|
|
4859
4840
|
actionId: number;
|
|
4860
4841
|
subActionId: components["schemas"]["SubActionId"];
|
|
4861
|
-
/** Format: uint32 */
|
|
4862
4842
|
marketId: number;
|
|
4863
4843
|
triggerPrice: components["schemas"]["PositivePriceMantissa"];
|
|
4864
4844
|
limitPrice?: components["schemas"]["PositivePriceMantissa"] | null;
|
|
@@ -4923,7 +4903,6 @@ export interface components {
|
|
|
4923
4903
|
accountId: components["schemas"]["AccountId"];
|
|
4924
4904
|
/** Format: uint64 */
|
|
4925
4905
|
actionId: number;
|
|
4926
|
-
/** Format: uint32 */
|
|
4927
4906
|
marketId: number;
|
|
4928
4907
|
triggerPrice: components["schemas"]["PositivePriceMantissa"];
|
|
4929
4908
|
limitPrice?: components["schemas"]["PositivePriceMantissa"] | null;
|
|
@@ -5000,7 +4979,6 @@ export interface components {
|
|
|
5000
4979
|
takerId: components["schemas"]["AccountId"];
|
|
5001
4980
|
takerSide: components["schemas"]["Side"];
|
|
5002
4981
|
makerId: components["schemas"]["AccountId"];
|
|
5003
|
-
/** Format: uint32 */
|
|
5004
4982
|
marketId: number;
|
|
5005
4983
|
/** Format: uint64 */
|
|
5006
4984
|
orderId: number;
|
|
@@ -5171,16 +5149,12 @@ export interface components {
|
|
|
5171
5149
|
* @default null
|
|
5172
5150
|
*/
|
|
5173
5151
|
until: string;
|
|
5174
|
-
/**
|
|
5175
|
-
* Format: uint32
|
|
5176
|
-
* @description DEPRECATED, use `market_ids` instead.
|
|
5177
|
-
*/
|
|
5152
|
+
/** @description DEPRECATED, use `market_ids` instead. */
|
|
5178
5153
|
marketId?: number | null;
|
|
5179
5154
|
/** @default */
|
|
5180
5155
|
marketIds: number[];
|
|
5181
5156
|
};
|
|
5182
5157
|
AccountVolumeInfo: {
|
|
5183
|
-
/** Format: uint32 */
|
|
5184
5158
|
marketId: number;
|
|
5185
5159
|
/** Format: double */
|
|
5186
5160
|
volumeBase: number;
|
|
@@ -5449,7 +5423,6 @@ export interface components {
|
|
|
5449
5423
|
/** Format: double */
|
|
5450
5424
|
fee: number;
|
|
5451
5425
|
liquidationKind: components["schemas"]["LiquidationKind"];
|
|
5452
|
-
/** Format: uint32 */
|
|
5453
5426
|
marketId?: number | null;
|
|
5454
5427
|
tokenId?: components["schemas"]["TokenId"] | null;
|
|
5455
5428
|
/** Format: uint64 */
|
|
@@ -5497,7 +5470,6 @@ export interface components {
|
|
|
5497
5470
|
actionId: number;
|
|
5498
5471
|
takerAccountId: components["schemas"]["AccountId"];
|
|
5499
5472
|
takerSide: components["schemas"]["Side"];
|
|
5500
|
-
/** Format: uint32 */
|
|
5501
5473
|
marketId: number;
|
|
5502
5474
|
/** Format: double */
|
|
5503
5475
|
settlementPrice: number;
|
|
@@ -5571,7 +5543,6 @@ export interface components {
|
|
|
5571
5543
|
* * `market_id` - raw market identifier
|
|
5572
5544
|
* * `symbol` - market symbol from original spec, picks first market which matches it */
|
|
5573
5545
|
TvHistoryQuery: {
|
|
5574
|
-
/** Format: uint32 */
|
|
5575
5546
|
market_id?: number | null;
|
|
5576
5547
|
symbol?: string | null;
|
|
5577
5548
|
from?: string;
|
|
@@ -5705,7 +5676,6 @@ export interface components {
|
|
|
5705
5676
|
nextStartInclusive?: number | null;
|
|
5706
5677
|
};
|
|
5707
5678
|
MarketHistoryInfo: {
|
|
5708
|
-
/** Format: uint32 */
|
|
5709
5679
|
marketId: number;
|
|
5710
5680
|
time: string;
|
|
5711
5681
|
/** Format: uint64 */
|
|
@@ -5729,63 +5699,38 @@ export interface components {
|
|
|
5729
5699
|
*/
|
|
5730
5700
|
FundingIndexMantissa: number;
|
|
5731
5701
|
UpdatePayload: {
|
|
5732
|
-
delta:
|
|
5733
|
-
/** Format: uint64 */
|
|
5734
|
-
last_update_id: number;
|
|
5735
|
-
/** Format: uint64 */
|
|
5736
|
-
update_id: number;
|
|
5737
|
-
market_symbol: string;
|
|
5738
|
-
asks: [
|
|
5739
|
-
number,
|
|
5740
|
-
number
|
|
5741
|
-
][];
|
|
5742
|
-
bids: [
|
|
5743
|
-
number,
|
|
5744
|
-
number
|
|
5745
|
-
][];
|
|
5746
|
-
};
|
|
5702
|
+
delta: components["schemas"]["DeltaUpdatePayload"];
|
|
5747
5703
|
} | {
|
|
5748
|
-
trades:
|
|
5749
|
-
/** Format: uint64 */
|
|
5750
|
-
last_update_id: number;
|
|
5751
|
-
/** Format: uint64 */
|
|
5752
|
-
update_id: number;
|
|
5753
|
-
market_symbol: string;
|
|
5754
|
-
trades: components["schemas"]["TradeUpdate"][];
|
|
5755
|
-
};
|
|
5704
|
+
trades: components["schemas"]["TradesUpdatePayload"];
|
|
5756
5705
|
} | {
|
|
5757
|
-
account:
|
|
5758
|
-
/** Format: uint64 */
|
|
5759
|
-
last_update_id: number;
|
|
5760
|
-
/** Format: uint64 */
|
|
5761
|
-
update_id: number;
|
|
5762
|
-
account_id: components["schemas"]["AccountId"];
|
|
5763
|
-
fills: Record<string, never>;
|
|
5764
|
-
places: Record<string, never>;
|
|
5765
|
-
cancels: Record<string, never>;
|
|
5766
|
-
/** @description Reduce orders: fully cancelled or partially cancelled (shrunk in-place). */
|
|
5767
|
-
reduced_orders?: Record<string, never>;
|
|
5768
|
-
/** @description Maker orders removed by self-trade prevention. */
|
|
5769
|
-
self_trade_cancels?: Record<string, never>;
|
|
5770
|
-
balances: Record<string, never>;
|
|
5771
|
-
};
|
|
5706
|
+
account: components["schemas"]["AccountUpdatePayload"];
|
|
5772
5707
|
} | {
|
|
5773
|
-
liquidation:
|
|
5774
|
-
/** Format: uint64 */
|
|
5775
|
-
last_update_id: number;
|
|
5776
|
-
/** Format: uint64 */
|
|
5777
|
-
update_id: number;
|
|
5778
|
-
liquidations: components["schemas"]["LiquidationUpdate"][];
|
|
5779
|
-
};
|
|
5708
|
+
liquidation: components["schemas"]["LiquidationUpdatePayload"];
|
|
5780
5709
|
} | {
|
|
5781
|
-
vault:
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5710
|
+
vault: components["schemas"]["VaultUpdatePayload"];
|
|
5711
|
+
};
|
|
5712
|
+
DeltaUpdatePayload: {
|
|
5713
|
+
/** Format: uint64 */
|
|
5714
|
+
last_update_id: number;
|
|
5715
|
+
/** Format: uint64 */
|
|
5716
|
+
update_id: number;
|
|
5717
|
+
market_symbol: string;
|
|
5718
|
+
asks: [
|
|
5719
|
+
number,
|
|
5720
|
+
number
|
|
5721
|
+
][];
|
|
5722
|
+
bids: [
|
|
5723
|
+
number,
|
|
5724
|
+
number
|
|
5725
|
+
][];
|
|
5726
|
+
};
|
|
5727
|
+
TradesUpdatePayload: {
|
|
5728
|
+
/** Format: uint64 */
|
|
5729
|
+
last_update_id: number;
|
|
5730
|
+
/** Format: uint64 */
|
|
5731
|
+
update_id: number;
|
|
5732
|
+
market_symbol: string;
|
|
5733
|
+
trades: components["schemas"]["TradeUpdate"][];
|
|
5789
5734
|
};
|
|
5790
5735
|
TradeUpdate: {
|
|
5791
5736
|
/** Format: uint64 */
|
|
@@ -5801,7 +5746,22 @@ export interface components {
|
|
|
5801
5746
|
/** Format: uint64 */
|
|
5802
5747
|
order_id: number;
|
|
5803
5748
|
/** @deprecated */
|
|
5804
|
-
sender_tracking_id?:
|
|
5749
|
+
sender_tracking_id?: string | null;
|
|
5750
|
+
};
|
|
5751
|
+
AccountUpdatePayload: {
|
|
5752
|
+
/** Format: uint64 */
|
|
5753
|
+
last_update_id: number;
|
|
5754
|
+
/** Format: uint64 */
|
|
5755
|
+
update_id: number;
|
|
5756
|
+
account_id: components["schemas"]["AccountId"];
|
|
5757
|
+
fills: Record<string, never>;
|
|
5758
|
+
places: Record<string, never>;
|
|
5759
|
+
cancels: Record<string, never>;
|
|
5760
|
+
/** @description Reduce orders: fully cancelled or partially cancelled (shrunk in-place). */
|
|
5761
|
+
reduced_orders?: Record<string, never>;
|
|
5762
|
+
/** @description Maker orders removed by self-trade prevention. */
|
|
5763
|
+
self_trade_cancels?: Record<string, never>;
|
|
5764
|
+
balances: Record<string, never>;
|
|
5805
5765
|
};
|
|
5806
5766
|
FillUpdate: {
|
|
5807
5767
|
/**
|
|
@@ -5827,14 +5787,14 @@ export interface components {
|
|
|
5827
5787
|
maker_id: components["schemas"]["AccountId"];
|
|
5828
5788
|
taker_id: components["schemas"]["AccountId"];
|
|
5829
5789
|
/** @deprecated */
|
|
5830
|
-
sender_tracking_id?:
|
|
5790
|
+
sender_tracking_id?: string | null;
|
|
5831
5791
|
/** @description Maker order's client_order_id (cloid of the resting order being filled). */
|
|
5832
|
-
client_order_id?:
|
|
5792
|
+
client_order_id?: string | null;
|
|
5833
5793
|
/** @description Taker order client_order_ids for the trades folded into this update.
|
|
5834
5794
|
* Account fills are keyed by maker order id, so a websocket batch may
|
|
5835
5795
|
* coalesce trades taken by different takers; this collects each taker's
|
|
5836
5796
|
* cloid. Empty when no taker in this update supplied a cloid. */
|
|
5837
|
-
taker_client_order_id?:
|
|
5797
|
+
taker_client_order_id?: string[];
|
|
5838
5798
|
};
|
|
5839
5799
|
OrderUpdate: {
|
|
5840
5800
|
/** Format: uint64 */
|
|
@@ -5851,8 +5811,15 @@ export interface components {
|
|
|
5851
5811
|
/** Format: uint32 */
|
|
5852
5812
|
market_id: number;
|
|
5853
5813
|
/** @deprecated */
|
|
5854
|
-
sender_tracking_id?:
|
|
5855
|
-
client_order_id?:
|
|
5814
|
+
sender_tracking_id?: string | null;
|
|
5815
|
+
client_order_id?: string | null;
|
|
5816
|
+
};
|
|
5817
|
+
LiquidationUpdatePayload: {
|
|
5818
|
+
/** Format: uint64 */
|
|
5819
|
+
last_update_id: number;
|
|
5820
|
+
/** Format: uint64 */
|
|
5821
|
+
update_id: number;
|
|
5822
|
+
liquidations: components["schemas"]["LiquidationUpdate"][];
|
|
5856
5823
|
};
|
|
5857
5824
|
LiquidationUpdate: {
|
|
5858
5825
|
makerAccountId: components["schemas"]["AccountId"];
|
|
@@ -5879,6 +5846,14 @@ export interface components {
|
|
|
5879
5846
|
/** Format: double */
|
|
5880
5847
|
updatedFundingRateIndex: number;
|
|
5881
5848
|
};
|
|
5849
|
+
VaultUpdatePayload: {
|
|
5850
|
+
/** Format: uint64 */
|
|
5851
|
+
last_update_id: number;
|
|
5852
|
+
/** Format: uint64 */
|
|
5853
|
+
update_id: number;
|
|
5854
|
+
vault_id: components["schemas"]["VaultId"];
|
|
5855
|
+
vault: components["schemas"]["VaultViewState"];
|
|
5856
|
+
};
|
|
5882
5857
|
CandleUpdate: {
|
|
5883
5858
|
/** @description TradingView resolution. */
|
|
5884
5859
|
res: components["schemas"]["Resolution"];
|
|
@@ -5933,6 +5908,51 @@ export interface components {
|
|
|
5933
5908
|
} | {
|
|
5934
5909
|
liquidation: components["schemas"]["AccountId"];
|
|
5935
5910
|
};
|
|
5911
|
+
WsRequestMessage: {
|
|
5912
|
+
updates: components["schemas"]["TopicReq"][];
|
|
5913
|
+
};
|
|
5914
|
+
TopicReq: {
|
|
5915
|
+
topic: string;
|
|
5916
|
+
/** @constant */
|
|
5917
|
+
action: "sub";
|
|
5918
|
+
} | {
|
|
5919
|
+
topic: string;
|
|
5920
|
+
/** @constant */
|
|
5921
|
+
action: "unsub";
|
|
5922
|
+
};
|
|
5923
|
+
WsResponseMessage: {
|
|
5924
|
+
updates: components["schemas"]["TopicResp"][];
|
|
5925
|
+
/** @constant */
|
|
5926
|
+
type: "success";
|
|
5927
|
+
} | {
|
|
5928
|
+
code: components["schemas"]["WsError"];
|
|
5929
|
+
/** @constant */
|
|
5930
|
+
type: "error";
|
|
5931
|
+
};
|
|
5932
|
+
TopicResp: {
|
|
5933
|
+
req: components["schemas"]["TopicReq"];
|
|
5934
|
+
} & ({
|
|
5935
|
+
/** @constant */
|
|
5936
|
+
status: "success";
|
|
5937
|
+
} | {
|
|
5938
|
+
code: components["schemas"]["TopicError"];
|
|
5939
|
+
message: string;
|
|
5940
|
+
/** @constant */
|
|
5941
|
+
status: "error";
|
|
5942
|
+
});
|
|
5943
|
+
/** @enum {string} */
|
|
5944
|
+
TopicError: "ParseAccountId" | "AccountNotFound" | "ParseVaultId" | "VaultNotFound" | "ParseInvalidCandleStr" | "MarketNotFound" | "ParseUnknownRes" | "ParseInvalidTopicStr" | "TooManySubs" | "AlreadySubscribed" | "NotSubscribed";
|
|
5945
|
+
/** @enum {string} */
|
|
5946
|
+
WsError: "invalid";
|
|
5947
|
+
TopicOutcome: {
|
|
5948
|
+
/** @constant */
|
|
5949
|
+
status: "success";
|
|
5950
|
+
} | {
|
|
5951
|
+
code: components["schemas"]["TopicError"];
|
|
5952
|
+
message: string;
|
|
5953
|
+
/** @constant */
|
|
5954
|
+
status: "error";
|
|
5955
|
+
};
|
|
5936
5956
|
};
|
|
5937
5957
|
responses: never;
|
|
5938
5958
|
parameters: never;
|