tardis-dev 14.2.1 → 14.2.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.
@@ -1,31 +1,72 @@
1
1
  import { Exchange, FilterForExchange } from './types';
2
2
  export declare function getExchangeDetails<T extends Exchange>(exchange: T): Promise<ExchangeDetails<T>>;
3
- export type SymbolType = 'spot' | 'future' | 'perpetual' | 'option';
3
+ export type SymbolType = 'spot' | 'future' | 'perpetual' | 'option' | 'combo';
4
+ export type DatasetType = 'trades' | 'incremental_book_L2' | 'quotes' | 'derivative_ticker' | 'options_chain' | 'book_snapshot_25' | 'book_snapshot_5' | 'liquidations' | 'book_ticker';
4
5
  export type Stats = {
5
6
  trades: number;
6
7
  bookChanges: number;
7
8
  };
8
- export type DatasetType = 'trades' | 'incremental_book_L2' | 'quotes' | 'derivative_ticker' | 'options_chain';
9
9
  type Datasets = {
10
- dataTypes: DatasetType[];
11
10
  formats: ['csv'];
12
- exportedFrom: Date;
13
- exportedUntil: Date;
11
+ exportedFrom: string;
12
+ exportedUntil: string;
14
13
  stats: Stats;
15
14
  symbols: {
16
15
  id: string;
17
16
  type: SymbolType;
18
17
  availableSince: string;
19
- availableTo: string;
20
- stats: Stats;
18
+ availableTo?: string;
19
+ dataTypes: DatasetType[];
20
+ }[];
21
+ };
22
+ type ChannelDetails = {
23
+ name: string;
24
+ description: string;
25
+ frequency: string;
26
+ frequencySource: string;
27
+ exchangeDocsUrl?: string;
28
+ sourceFor?: string[];
29
+ availableSince: string;
30
+ availableTo?: string;
31
+ apiVersion?: string;
32
+ additionalInfo?: string;
33
+ generated?: true;
34
+ };
35
+ type DataCenter = {
36
+ host: string;
37
+ regionId: string;
38
+ location: string;
39
+ };
40
+ type DataCollectionDetails = {
41
+ recorderDataCenter: DataCenter;
42
+ recorderDataCenterChanges?: {
43
+ until: string;
44
+ dataCenter: DataCenter;
45
+ }[];
46
+ wssConnection?: {
47
+ url: string;
48
+ apiVersion?: string;
49
+ proxiedViaCloudflare?: boolean;
50
+ };
51
+ wssConnectionChanges?: {
52
+ until: string;
53
+ url?: string;
54
+ apiVersion?: string;
55
+ proxiedViaCloudflare?: boolean;
56
+ }[];
57
+ exchangeDataCenter?: DataCenter;
58
+ exchangeDataCenterChanges?: {
59
+ until: string;
60
+ dataCenter: DataCenter;
21
61
  }[];
22
62
  };
23
63
  export type ExchangeDetailsBase<T extends Exchange> = {
24
64
  id: T;
25
65
  name: string;
26
- filterable: boolean;
27
66
  enabled: boolean;
67
+ delisted?: boolean;
28
68
  availableSince: string;
69
+ availableTo?: string;
29
70
  availableChannels: FilterForExchange[T]['channel'][];
30
71
  availableSymbols: {
31
72
  id: string;
@@ -37,15 +78,14 @@ export type ExchangeDetailsBase<T extends Exchange> = {
37
78
  incidentReports: {
38
79
  from: string;
39
80
  to: string;
40
- status: 'resolved' | 'wontfix';
81
+ status: 'resolved' | 'wontfix' | 'unresolved';
41
82
  details: string;
42
- };
43
- };
44
- type ExchangeDetails<T extends Exchange> = (ExchangeDetailsBase<T> & {
45
- supportsDatasets: false;
46
- }) | (ExchangeDetailsBase<T> & {
47
- supportsDatasets: true;
83
+ }[];
84
+ channelDetails: ChannelDetails[];
85
+ apiDocsUrl?: string;
86
+ dataCollectionDetails?: DataCollectionDetails;
48
87
  datasets: Datasets;
49
- });
88
+ };
89
+ type ExchangeDetails<T extends Exchange> = ExchangeDetailsBase<T>;
50
90
  export {};
51
91
  //# sourceMappingURL=exchangedetails.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exchangedetails.d.ts","sourceRoot":"","sources":["../src/exchangedetails.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAErD,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EAAE,QAAQ,EAAE,CAAC,+BAMvE;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,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AAA;IACL,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAA;IAEpD,gBAAgB,EAAE;QAChB,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,UAAU,CAAA;QAChB,cAAc,EAAE,MAAM,CAAA;QACtB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;IAEH,eAAe,EAAE;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,YAAY,CAAA;QAC7C,OAAO,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;IAEH,cAAc,EAAE,cAAc,EAAE,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,KAAK,eAAe,CAAC,CAAC,SAAS,QAAQ,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAA"}
@@ -14,6 +14,8 @@ export type ContractType = 'move' | 'linear_future' | 'inverse_future' | 'quanto
14
14
  export interface InstrumentInfo {
15
15
  /** symbol id */
16
16
  id: string;
17
+ /** dataset symbol id, may differ from id */
18
+ datasetId?: string;
17
19
  /** exchange id */
18
20
  exchange: string;
19
21
  /** normalized, so for example bitmex XBTUSD has base currency set to BTC not XBT */
@@ -21,20 +23,30 @@ export interface InstrumentInfo {
21
23
  /** normalized, so for example bitfinex BTCUST has quote currency set to USDT, not UST */
22
24
  quoteCurrency: string;
23
25
  type: SymbolType;
26
+ /** derivative contract type */
27
+ contractType?: ContractType;
24
28
  /** indicates if the instrument can currently be traded. */
25
29
  active: boolean;
26
30
  /** date in ISO format */
27
31
  availableSince: string;
28
32
  /** date in ISO format */
29
33
  availableTo?: string;
34
+ /** date in ISO format, when the instrument was first listed on the exchange */
35
+ listing?: string;
30
36
  /** in ISO format, only for futures and options */
31
37
  expiry?: string;
38
+ /** expiration schedule type */
39
+ expirationType?: 'daily' | 'weekly' | 'next_week' | 'quarter' | 'next_quarter';
40
+ /** the underlying index for derivatives */
41
+ underlyingIndex?: string;
32
42
  /** price tick size, price precision can be calculated from it */
33
43
  priceIncrement: number;
34
44
  /** amount tick size, amount/size precision can be calculated from it */
35
45
  amountIncrement: number;
36
46
  /** min order size */
37
47
  minTradeAmount: number;
48
+ /** minimum notional value */
49
+ minNotional?: number;
38
50
  /** consider it as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc */
39
51
  makerFee: number;
40
52
  /** consider it as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc */
@@ -51,12 +63,28 @@ export interface InstrumentInfo {
51
63
  strikePrice?: number;
52
64
  /** option type, only for options */
53
65
  optionType?: 'call' | 'put';
54
- /** date in ISO format */
66
+ /** margin mode */
67
+ marginMode?: 'isolated' | 'cross';
68
+ /** whether margin trading is supported (spot) */
69
+ margin?: boolean;
70
+ /** if this instrument is an alias for another */
71
+ aliasFor?: string;
72
+ /** historical changes to instrument parameters */
55
73
  changes?: {
56
74
  until: string;
57
75
  priceIncrement?: number;
58
76
  amountIncrement?: number;
59
77
  contractMultiplier?: number;
78
+ minTradeAmount?: number;
79
+ makerFee?: number;
80
+ takerFee?: number;
81
+ quanto?: boolean;
82
+ inverse?: boolean;
83
+ settlementCurrency?: string;
84
+ underlyingIndex?: string;
85
+ contractType?: ContractType;
86
+ quoteCurrency?: string;
87
+ type?: string;
60
88
  }[];
61
89
  }
62
90
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentinfo.d.ts","s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CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,kBAAkB,CAAC,EAAE,MAAM,CAAA;QAC3B,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,YAAY,CAAC,EAAE,YAAY,CAAA;QAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tardis-dev",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "engines": {
5
5
  "node": ">=24"
6
6
  },
@@ -10,36 +10,89 @@ export async function getExchangeDetails<T extends Exchange>(exchange: T) {
10
10
  return exchangeDetails as ExchangeDetails<T>
11
11
  }
12
12
 
13
- export type SymbolType = 'spot' | 'future' | 'perpetual' | 'option'
13
+ export type SymbolType = 'spot' | 'future' | 'perpetual' | 'option' | 'combo'
14
+
15
+ export type DatasetType =
16
+ | 'trades'
17
+ | 'incremental_book_L2'
18
+ | 'quotes'
19
+ | 'derivative_ticker'
20
+ | 'options_chain'
21
+ | 'book_snapshot_25'
22
+ | 'book_snapshot_5'
23
+ | 'liquidations'
24
+ | 'book_ticker'
14
25
 
15
26
  export type Stats = {
16
27
  trades: number
17
28
  bookChanges: number
18
29
  }
19
30
 
20
- export type DatasetType = 'trades' | 'incremental_book_L2' | 'quotes' | 'derivative_ticker' | 'options_chain'
21
-
22
31
  type Datasets = {
23
- dataTypes: DatasetType[]
24
32
  formats: ['csv']
25
- exportedFrom: Date
26
- exportedUntil: Date
33
+ exportedFrom: string
34
+ exportedUntil: string
27
35
  stats: Stats
28
36
  symbols: {
29
37
  id: string
30
38
  type: SymbolType
31
39
  availableSince: string
32
- availableTo: string
33
- stats: Stats
40
+ availableTo?: string
41
+ dataTypes: DatasetType[]
42
+ }[]
43
+ }
44
+
45
+ type ChannelDetails = {
46
+ name: string
47
+ description: string
48
+ frequency: string
49
+ frequencySource: string
50
+ exchangeDocsUrl?: string
51
+ sourceFor?: string[]
52
+ availableSince: string
53
+ availableTo?: string
54
+ apiVersion?: string
55
+ additionalInfo?: string
56
+ generated?: true
57
+ }
58
+
59
+ type DataCenter = {
60
+ host: string
61
+ regionId: string
62
+ location: string
63
+ }
64
+
65
+ type DataCollectionDetails = {
66
+ recorderDataCenter: DataCenter
67
+ recorderDataCenterChanges?: {
68
+ until: string
69
+ dataCenter: DataCenter
70
+ }[]
71
+ wssConnection?: {
72
+ url: string
73
+ apiVersion?: string
74
+ proxiedViaCloudflare?: boolean
75
+ }
76
+ wssConnectionChanges?: {
77
+ until: string
78
+ url?: string
79
+ apiVersion?: string
80
+ proxiedViaCloudflare?: boolean
81
+ }[]
82
+ exchangeDataCenter?: DataCenter
83
+ exchangeDataCenterChanges?: {
84
+ until: string
85
+ dataCenter: DataCenter
34
86
  }[]
35
87
  }
36
88
 
37
89
  export type ExchangeDetailsBase<T extends Exchange> = {
38
90
  id: T
39
91
  name: string
40
- filterable: boolean
41
92
  enabled: boolean
93
+ delisted?: boolean
42
94
  availableSince: string
95
+ availableTo?: string
43
96
 
44
97
  availableChannels: FilterForExchange[T]['channel'][]
45
98
 
@@ -54,11 +107,14 @@ export type ExchangeDetailsBase<T extends Exchange> = {
54
107
  incidentReports: {
55
108
  from: string
56
109
  to: string
57
- status: 'resolved' | 'wontfix'
110
+ status: 'resolved' | 'wontfix' | 'unresolved'
58
111
  details: string
59
- }
112
+ }[]
113
+
114
+ channelDetails: ChannelDetails[]
115
+ apiDocsUrl?: string
116
+ dataCollectionDetails?: DataCollectionDetails
117
+ datasets: Datasets
60
118
  }
61
119
 
62
- type ExchangeDetails<T extends Exchange> =
63
- | (ExchangeDetailsBase<T> & { supportsDatasets: false })
64
- | (ExchangeDetailsBase<T> & { supportsDatasets: true; datasets: Datasets })
120
+ type ExchangeDetails<T extends Exchange> = ExchangeDetailsBase<T>
@@ -79,6 +79,8 @@ export type ContractType =
79
79
  export interface InstrumentInfo {
80
80
  /** symbol id */
81
81
  id: string
82
+ /** dataset symbol id, may differ from id */
83
+ datasetId?: string
82
84
  /** exchange id */
83
85
  exchange: string
84
86
  /** normalized, so for example bitmex XBTUSD has base currency set to BTC not XBT */
@@ -86,20 +88,30 @@ export interface InstrumentInfo {
86
88
  /** normalized, so for example bitfinex BTCUST has quote currency set to USDT, not UST */
87
89
  quoteCurrency: string
88
90
  type: SymbolType
91
+ /** derivative contract type */
92
+ contractType?: ContractType
89
93
  /** indicates if the instrument can currently be traded. */
90
94
  active: boolean
91
95
  /** date in ISO format */
92
96
  availableSince: string
93
97
  /** date in ISO format */
94
98
  availableTo?: string
99
+ /** date in ISO format, when the instrument was first listed on the exchange */
100
+ listing?: string
95
101
  /** in ISO format, only for futures and options */
96
102
  expiry?: string
103
+ /** expiration schedule type */
104
+ expirationType?: 'daily' | 'weekly' | 'next_week' | 'quarter' | 'next_quarter'
105
+ /** the underlying index for derivatives */
106
+ underlyingIndex?: string
97
107
  /** price tick size, price precision can be calculated from it */
98
108
  priceIncrement: number
99
109
  /** amount tick size, amount/size precision can be calculated from it */
100
110
  amountIncrement: number
101
111
  /** min order size */
102
112
  minTradeAmount: number
113
+ /** minimum notional value */
114
+ minNotional?: number
103
115
  /** consider it as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc */
104
116
  makerFee: number
105
117
  /** consider it as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc */
@@ -116,11 +128,27 @@ export interface InstrumentInfo {
116
128
  strikePrice?: number
117
129
  /** option type, only for options */
118
130
  optionType?: 'call' | 'put'
119
- /** date in ISO format */
131
+ /** margin mode */
132
+ marginMode?: 'isolated' | 'cross'
133
+ /** whether margin trading is supported (spot) */
134
+ margin?: boolean
135
+ /** if this instrument is an alias for another */
136
+ aliasFor?: string
137
+ /** historical changes to instrument parameters */
120
138
  changes?: {
121
139
  until: string
122
140
  priceIncrement?: number
123
141
  amountIncrement?: number
124
142
  contractMultiplier?: number
143
+ minTradeAmount?: number
144
+ makerFee?: number
145
+ takerFee?: number
146
+ quanto?: boolean
147
+ inverse?: boolean
148
+ settlementCurrency?: string
149
+ underlyingIndex?: string
150
+ contractType?: ContractType
151
+ quoteCurrency?: string
152
+ type?: string
125
153
  }[]
126
154
  }