@yuants/vendor-gate 0.4.10 → 0.4.12

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.
@@ -5,21 +5,18 @@ import { getFutureFundingRate } from '../../api/public-api';
5
5
  const terminal = Terminal.fromNodeEnv();
6
6
  createSeriesProvider(terminal, {
7
7
  tableName: 'interest_rate',
8
- series_id_prefix_parts: ['GATE-FUTURE'],
8
+ series_id_prefix_parts: ['GATE'],
9
9
  reversed: false,
10
10
  queryFn: async ({ series_id }) => {
11
- const [, product_id] = decodePath(series_id);
12
- if (!product_id) {
13
- return [];
14
- }
11
+ const [, , contract] = decodePath(series_id);
15
12
  const funding_rate_history = await getFutureFundingRate('usdt', {
16
- contract: product_id,
13
+ contract: contract,
17
14
  limit: 1000,
18
15
  });
19
16
  return funding_rate_history.map((entry) => ({
20
17
  series_id,
21
- product_id,
22
- datasource_id: 'GATE-FUTURE',
18
+ product_id: series_id,
19
+ datasource_id: 'GATE',
23
20
  created_at: formatTime(entry.t * 1000),
24
21
  long_rate: `${-Number(entry.r)}`,
25
22
  short_rate: `${Number(entry.r)}`,
@@ -1 +1 @@
1
- {"version":3,"file":"interest-rate.js","sourceRoot":"","sources":["../../../src/services/markets/interest-rate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,oBAAoB,CAAgB,QAAQ,EAAE;IAC5C,SAAS,EAAE,eAAe;IAC1B,sBAAsB,EAAE,CAAC,aAAa,CAAC;IACvC,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,EAAE,CAAC;SACX;QACD,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,CAAC,MAAM,EAAE;YAC9D,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,OAAO,oBAAoB,CAAC,GAAG,CAC7B,CAAC,KAAK,EAAiB,EAAE,CAAC,CAAC;YACzB,SAAS;YACT,UAAU;YACV,aAAa,EAAE,aAAa;YAC5B,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YACtC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,UAAU,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,gBAAgB,EAAE,EAAE;SACrB,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IInterestRate } from '@yuants/data-interest-rate';\nimport { createSeriesProvider } from '@yuants/data-series';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, formatTime } from '@yuants/utils';\nimport { getFutureFundingRate } from '../../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\ncreateSeriesProvider<IInterestRate>(terminal, {\n tableName: 'interest_rate',\n series_id_prefix_parts: ['GATE-FUTURE'],\n reversed: false,\n queryFn: async ({ series_id }) => {\n const [, product_id] = decodePath(series_id);\n if (!product_id) {\n return [];\n }\n const funding_rate_history = await getFutureFundingRate('usdt', {\n contract: product_id,\n limit: 1000,\n });\n\n return funding_rate_history.map(\n (entry): IInterestRate => ({\n series_id,\n product_id,\n datasource_id: 'GATE-FUTURE',\n created_at: formatTime(entry.t * 1000),\n long_rate: `${-Number(entry.r)}`,\n short_rate: `${Number(entry.r)}`,\n settlement_price: '',\n }),\n );\n },\n});\n"]}
1
+ {"version":3,"file":"interest-rate.js","sourceRoot":"","sources":["../../../src/services/markets/interest-rate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,oBAAoB,CAAgB,QAAQ,EAAE;IAC5C,SAAS,EAAE,eAAe;IAC1B,sBAAsB,EAAE,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC/B,MAAM,CAAC,EAAE,AAAD,EAAG,QAAQ,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,CAAC,MAAM,EAAE;YAC9D,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,OAAO,oBAAoB,CAAC,GAAG,CAC7B,CAAC,KAAK,EAAiB,EAAE,CAAC,CAAC;YACzB,SAAS;YACT,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,MAAM;YACrB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YACtC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,UAAU,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,gBAAgB,EAAE,EAAE;SACrB,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IInterestRate } from '@yuants/data-interest-rate';\nimport { createSeriesProvider } from '@yuants/data-series';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, formatTime } from '@yuants/utils';\nimport { getFutureFundingRate } from '../../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\ncreateSeriesProvider<IInterestRate>(terminal, {\n tableName: 'interest_rate',\n series_id_prefix_parts: ['GATE'],\n reversed: false,\n queryFn: async ({ series_id }) => {\n const [, , contract] = decodePath(series_id);\n const funding_rate_history = await getFutureFundingRate('usdt', {\n contract: contract,\n limit: 1000,\n });\n\n return funding_rate_history.map(\n (entry): IInterestRate => ({\n series_id,\n product_id: series_id,\n datasource_id: 'GATE',\n created_at: formatTime(entry.t * 1000),\n long_rate: `${-Number(entry.r)}`,\n short_rate: `${Number(entry.r)}`,\n settlement_price: '',\n }),\n );\n },\n});\n"]}
@@ -7,21 +7,18 @@ const public_api_1 = require("../../api/public-api");
7
7
  const terminal = protocol_1.Terminal.fromNodeEnv();
8
8
  (0, data_series_1.createSeriesProvider)(terminal, {
9
9
  tableName: 'interest_rate',
10
- series_id_prefix_parts: ['GATE-FUTURE'],
10
+ series_id_prefix_parts: ['GATE'],
11
11
  reversed: false,
12
12
  queryFn: async ({ series_id }) => {
13
- const [, product_id] = (0, utils_1.decodePath)(series_id);
14
- if (!product_id) {
15
- return [];
16
- }
13
+ const [, , contract] = (0, utils_1.decodePath)(series_id);
17
14
  const funding_rate_history = await (0, public_api_1.getFutureFundingRate)('usdt', {
18
- contract: product_id,
15
+ contract: contract,
19
16
  limit: 1000,
20
17
  });
21
18
  return funding_rate_history.map((entry) => ({
22
19
  series_id,
23
- product_id,
24
- datasource_id: 'GATE-FUTURE',
20
+ product_id: series_id,
21
+ datasource_id: 'GATE',
25
22
  created_at: (0, utils_1.formatTime)(entry.t * 1000),
26
23
  long_rate: `${-Number(entry.r)}`,
27
24
  short_rate: `${Number(entry.r)}`,
@@ -1 +1 @@
1
- {"version":3,"file":"interest-rate.js","sourceRoot":"","sources":["../../../src/services/markets/interest-rate.ts"],"names":[],"mappings":";;AACA,qDAA2D;AAC3D,+CAA4C;AAC5C,yCAAuD;AACvD,qDAA4D;AAE5D,MAAM,QAAQ,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,IAAA,kCAAoB,EAAgB,QAAQ,EAAE;IAC5C,SAAS,EAAE,eAAe;IAC1B,sBAAsB,EAAE,CAAC,aAAa,CAAC;IACvC,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,IAAA,kBAAU,EAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,EAAE,CAAC;SACX;QACD,MAAM,oBAAoB,GAAG,MAAM,IAAA,iCAAoB,EAAC,MAAM,EAAE;YAC9D,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,OAAO,oBAAoB,CAAC,GAAG,CAC7B,CAAC,KAAK,EAAiB,EAAE,CAAC,CAAC;YACzB,SAAS;YACT,UAAU;YACV,aAAa,EAAE,aAAa;YAC5B,UAAU,EAAE,IAAA,kBAAU,EAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YACtC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,UAAU,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,gBAAgB,EAAE,EAAE;SACrB,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IInterestRate } from '@yuants/data-interest-rate';\nimport { createSeriesProvider } from '@yuants/data-series';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, formatTime } from '@yuants/utils';\nimport { getFutureFundingRate } from '../../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\ncreateSeriesProvider<IInterestRate>(terminal, {\n tableName: 'interest_rate',\n series_id_prefix_parts: ['GATE-FUTURE'],\n reversed: false,\n queryFn: async ({ series_id }) => {\n const [, product_id] = decodePath(series_id);\n if (!product_id) {\n return [];\n }\n const funding_rate_history = await getFutureFundingRate('usdt', {\n contract: product_id,\n limit: 1000,\n });\n\n return funding_rate_history.map(\n (entry): IInterestRate => ({\n series_id,\n product_id,\n datasource_id: 'GATE-FUTURE',\n created_at: formatTime(entry.t * 1000),\n long_rate: `${-Number(entry.r)}`,\n short_rate: `${Number(entry.r)}`,\n settlement_price: '',\n }),\n );\n },\n});\n"]}
1
+ {"version":3,"file":"interest-rate.js","sourceRoot":"","sources":["../../../src/services/markets/interest-rate.ts"],"names":[],"mappings":";;AACA,qDAA2D;AAC3D,+CAA4C;AAC5C,yCAAuD;AACvD,qDAA4D;AAE5D,MAAM,QAAQ,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,IAAA,kCAAoB,EAAgB,QAAQ,EAAE;IAC5C,SAAS,EAAE,eAAe;IAC1B,sBAAsB,EAAE,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC/B,MAAM,CAAC,EAAE,AAAD,EAAG,QAAQ,CAAC,GAAG,IAAA,kBAAU,EAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,oBAAoB,GAAG,MAAM,IAAA,iCAAoB,EAAC,MAAM,EAAE;YAC9D,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,OAAO,oBAAoB,CAAC,GAAG,CAC7B,CAAC,KAAK,EAAiB,EAAE,CAAC,CAAC;YACzB,SAAS;YACT,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,MAAM;YACrB,UAAU,EAAE,IAAA,kBAAU,EAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YACtC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,UAAU,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,gBAAgB,EAAE,EAAE;SACrB,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IInterestRate } from '@yuants/data-interest-rate';\nimport { createSeriesProvider } from '@yuants/data-series';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, formatTime } from '@yuants/utils';\nimport { getFutureFundingRate } from '../../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\ncreateSeriesProvider<IInterestRate>(terminal, {\n tableName: 'interest_rate',\n series_id_prefix_parts: ['GATE'],\n reversed: false,\n queryFn: async ({ series_id }) => {\n const [, , contract] = decodePath(series_id);\n const funding_rate_history = await getFutureFundingRate('usdt', {\n contract: contract,\n limit: 1000,\n });\n\n return funding_rate_history.map(\n (entry): IInterestRate => ({\n series_id,\n product_id: series_id,\n datasource_id: 'GATE',\n created_at: formatTime(entry.t * 1000),\n long_rate: `${-Number(entry.r)}`,\n short_rate: `${Number(entry.r)}`,\n settlement_price: '',\n }),\n );\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuants/vendor-gate",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib",
@@ -18,7 +18,7 @@
18
18
  "@yuants/utils": "0.14.0",
19
19
  "@yuants/data-series": "0.3.51",
20
20
  "@yuants/data-interest-rate": "0.1.48",
21
- "@yuants/exchange": "0.1.2",
21
+ "@yuants/exchange": "0.2.0",
22
22
  "rxjs": "~7.5.6"
23
23
  },
24
24
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "apps/vendor-gate/AGENTS.md": "59be8d734f8a91ae5f7377e7c688f1fccb8641b7",
3
- "apps/vendor-gate/CHANGELOG.json": "8a912e9c89baedcb28676338bd8fa70944c028b0",
4
- "apps/vendor-gate/CHANGELOG.md": "d98d29bcd1d222fa98c198796d093f5b3218bb19",
3
+ "apps/vendor-gate/CHANGELOG.json": "de68df0b698472c6065f5ef46f11e7305a0d8407",
4
+ "apps/vendor-gate/CHANGELOG.md": "1e1dd1f0061a20c3789f962cdf6728bf3c479052",
5
5
  "apps/vendor-gate/README.md": "ea5ee3a61cd87d9104d729902dfaccac9b9913e0",
6
6
  "apps/vendor-gate/SESSION_NOTES.md": "768c89019ebca263968450d853c8038b0d56f619",
7
7
  "apps/vendor-gate/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
@@ -9,7 +9,7 @@
9
9
  "apps/vendor-gate/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
10
10
  "apps/vendor-gate/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
11
11
  "apps/vendor-gate/etc/vendor-gate.api.md": "970682cd589432de553cc5cee2a0abe73814a515",
12
- "apps/vendor-gate/package.json": "7a53f35c882f783cd61a53524bc578a4b6b6e64d",
12
+ "apps/vendor-gate/package.json": "9d44a6ed46051a520c7f82e8b6e1f010f2eeb5f2",
13
13
  "apps/vendor-gate/src/api/http-client.ts": "013dcdfebaf136c83274638ceb697146a8e3f218",
14
14
  "apps/vendor-gate/src/api/private-api.ts": "644570bc10fd22b7e9d4d6a0267397af9d5510f0",
15
15
  "apps/vendor-gate/src/api/public-api.ts": "2371d8be290d3c6d373f704b6b10d0cc4dba8af4",
@@ -21,7 +21,7 @@
21
21
  "apps/vendor-gate/src/services/accounts/unified.ts": "cc2a78a3b478209844d3997bc2c359414318334e",
22
22
  "apps/vendor-gate/src/services/default-credential.ts": "b9ffa157b818148450bfaaf4851597e91901190c",
23
23
  "apps/vendor-gate/src/services/exchange.ts": "810e9c0b887d435c9cd2eee3c1ee7c2bba6435be",
24
- "apps/vendor-gate/src/services/markets/interest-rate.ts": "1aeaf3271927e32b2f5a755ac9069e2bed9bbbda",
24
+ "apps/vendor-gate/src/services/markets/interest-rate.ts": "e669eb1d664448f309bb062907b273157d1c111e",
25
25
  "apps/vendor-gate/src/services/markets/product.ts": "38f600251ddb0a17e111ccceda9231bee98c60a3",
26
26
  "apps/vendor-gate/src/services/orders/cancelOrder.ts": "7dfdd30eaac89742f1050bf0fb47d8053ccecb28",
27
27
  "apps/vendor-gate/src/services/orders/listOrders.ts": "9e4bd2c53cd768d609d1368fd37ff783f9b4d52f",
@@ -39,7 +39,7 @@
39
39
  "libraries/utils/temp/package-deps.json": "6d58e9b325e8d16de8a878c32010f626b12a01da",
40
40
  "libraries/data-series/temp/package-deps.json": "c89ebffe302757903aa54eff78f76cb855486b8c",
41
41
  "libraries/data-interest-rate/temp/package-deps.json": "cef1e1cb0116ad593c24635684e0cbf03488d67c",
42
- "libraries/exchange/temp/package-deps.json": "f9a2557b53874e78a809b82326b850d98b524a9b",
42
+ "libraries/exchange/temp/package-deps.json": "3cc8493e0f93738d571c8ea2c23fc54e8b1bc4f3",
43
43
  "libraries/extension/temp/package-deps.json": "9569c553c2f9a7d50b70d8f101fc2d3825aaccb9",
44
44
  "tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
45
45
  }