@yuants/vendor-gate 0.4.9 → 0.4.11

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.9",
3
+ "version": "0.4.11",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib",
@@ -9,16 +9,16 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "@yuants/cache": "0.3.3",
12
- "@yuants/protocol": "0.53.1",
13
- "@yuants/transfer": "0.2.38",
14
- "@yuants/data-account": "0.8.3",
15
- "@yuants/data-order": "0.6.5",
16
- "@yuants/sql": "0.9.29",
17
- "@yuants/data-product": "0.4.20",
12
+ "@yuants/protocol": "0.53.2",
13
+ "@yuants/transfer": "0.2.39",
14
+ "@yuants/data-account": "0.8.4",
15
+ "@yuants/data-order": "0.6.6",
16
+ "@yuants/sql": "0.9.30",
17
+ "@yuants/data-product": "0.4.21",
18
18
  "@yuants/utils": "0.14.0",
19
- "@yuants/data-series": "0.3.50",
20
- "@yuants/data-interest-rate": "0.1.47",
21
- "@yuants/exchange": "0.1.1",
19
+ "@yuants/data-series": "0.3.51",
20
+ "@yuants/data-interest-rate": "0.1.48",
21
+ "@yuants/exchange": "0.1.2",
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": "fc80aa17ab2ff601494b5ad8c374fd6c2891c707",
4
- "apps/vendor-gate/CHANGELOG.md": "36b66046debded3563877bdc800e3e71c494ce1c",
3
+ "apps/vendor-gate/CHANGELOG.json": "c6e14424bdd68f42c1e7c92038fafe3c5684578d",
4
+ "apps/vendor-gate/CHANGELOG.md": "2cc70f6dbf8b89f657f95247f7fc777e802cbf57",
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": "8a189da95e2271661b2b484f1613ac7418eaf1fe",
12
+ "apps/vendor-gate/package.json": "012cfc605c4ac3ee98aeaa100f28fe01be18d488",
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",
@@ -30,16 +30,16 @@
30
30
  "apps/vendor-gate/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
31
31
  "apps/vendor-gate/.rush/temp/shrinkwrap-deps.json": "7c7a8a0ba2466ff6bce80aa8e8509d790b2c2d7d",
32
32
  "libraries/cache/temp/package-deps.json": "a4afa15e6462983f9d3735d31dc1ed8a683fb4dc",
33
- "libraries/protocol/temp/package-deps.json": "14095036ed251977cb3fb362a7e23d8786aaa4c9",
34
- "libraries/transfer/temp/package-deps.json": "0be7967706065779def1ef1e7f68a9794690599a",
35
- "libraries/data-account/temp/package-deps.json": "eb3d9ccad211a998fef9e0230e164407bf1b95fc",
36
- "libraries/data-order/temp/package-deps.json": "cf5b85fc4c5160f51023f7fbdc68a7ed9db5573a",
37
- "libraries/sql/temp/package-deps.json": "95cd7209bf6002d530eb37960bac77c793afadd0",
38
- "libraries/data-product/temp/package-deps.json": "60b8abf6f95edc29268f10f0d64331e2f034a3e5",
33
+ "libraries/protocol/temp/package-deps.json": "0bd43721e96039b52d7b59c834dc6df45cf75e3f",
34
+ "libraries/transfer/temp/package-deps.json": "36c58299bd6c841c5ba7252d71881a881570d08c",
35
+ "libraries/data-account/temp/package-deps.json": "ae6b0c69040d0d1989525e843717b6e303d95ef2",
36
+ "libraries/data-order/temp/package-deps.json": "2adac9fc0423f9b1b7ddaa8946ab7af374cc22e1",
37
+ "libraries/sql/temp/package-deps.json": "4a9a7ec55f04b20459e664e81e76fa74b6c77b39",
38
+ "libraries/data-product/temp/package-deps.json": "8caccae65af24afde5d0e602eb24f57c22c7efd2",
39
39
  "libraries/utils/temp/package-deps.json": "6d58e9b325e8d16de8a878c32010f626b12a01da",
40
- "libraries/data-series/temp/package-deps.json": "d70ec6d1ca7342204a35a1c3619481e226239e73",
41
- "libraries/data-interest-rate/temp/package-deps.json": "92396227ed3aab2f407bf93c515cf340ac796932",
42
- "libraries/exchange/temp/package-deps.json": "68091305dec4ea0dc245f4314f1d474a2c3247d8",
40
+ "libraries/data-series/temp/package-deps.json": "c89ebffe302757903aa54eff78f76cb855486b8c",
41
+ "libraries/data-interest-rate/temp/package-deps.json": "cef1e1cb0116ad593c24635684e0cbf03488d67c",
42
+ "libraries/exchange/temp/package-deps.json": "f9a2557b53874e78a809b82326b850d98b524a9b",
43
43
  "libraries/extension/temp/package-deps.json": "9569c553c2f9a7d50b70d8f101fc2d3825aaccb9",
44
44
  "tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
45
45
  }