@yuants/vendor-huobi 0.15.0 → 0.15.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.
|
@@ -13,7 +13,7 @@ export const getSpotAccountInfo = async (credential) => {
|
|
|
13
13
|
return makeSpotPosition({
|
|
14
14
|
position_id: `${v.currency}`,
|
|
15
15
|
datasource_id: 'HTX',
|
|
16
|
-
product_id: encodePath('HTX', 'SPOT', v.currency),
|
|
16
|
+
product_id: encodePath('HTX', 'SPOT', v.currency + 'usdt'),
|
|
17
17
|
volume: +((_a = v.balance) !== null && _a !== void 0 ? _a : 0),
|
|
18
18
|
free_volume: +((_b = v.balance) !== null && _b !== void 0 ? _b : 0),
|
|
19
19
|
closable_price: 1, // TODO: 获取现货币对价格
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spot.js","sourceRoot":"","sources":["../../../src/services/accounts/spot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAe,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAgD,KAAK,EAAE,UAAU,EAAE,EAAE;IAClG,MAAM,cAAc,GAAG,MAAM,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACnF,IAAI,CAAC,cAAc;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACvE,MAAM,WAAW,GAAG,MAAM,qBAAqB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAE5E,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI;SACzB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;QACT,OAAO,gBAAgB,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,iBAAiB;SACrC,CAAC,CAAC;IACL,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["import { IActionHandlerOfGetAccountInfo, makeSpotPosition } from '@yuants/data-account';\nimport { getSpotAccountBalance, ICredential } from '../../api/private-api';\nimport { spotAccountUidCache } from '../uid';\nimport { encodePath } from '@yuants/utils';\n\nexport const getSpotAccountInfo: IActionHandlerOfGetAccountInfo<ICredential> = async (credential) => {\n const spotAccountUid = await spotAccountUidCache.query(JSON.stringify(credential));\n if (!spotAccountUid) throw new Error('Failed to get Spot Account UID');\n const spotBalance = await getSpotAccountBalance(credential, spotAccountUid);\n\n return spotBalance.data.list\n .map((v) => {\n return makeSpotPosition({\n position_id: `${v.currency}`,\n datasource_id: 'HTX',\n product_id: encodePath('HTX', 'SPOT', v.currency + 'usdt'),\n volume: +(v.balance ?? 0),\n free_volume: +(v.balance ?? 0),\n closable_price: 1, // TODO: 获取现货币对价格\n });\n })\n .filter((x) => x.volume > 0);\n};\n"]}
|
|
@@ -16,7 +16,7 @@ const getSpotAccountInfo = async (credential) => {
|
|
|
16
16
|
return (0, data_account_1.makeSpotPosition)({
|
|
17
17
|
position_id: `${v.currency}`,
|
|
18
18
|
datasource_id: 'HTX',
|
|
19
|
-
product_id: (0, utils_1.encodePath)('HTX', 'SPOT', v.currency),
|
|
19
|
+
product_id: (0, utils_1.encodePath)('HTX', 'SPOT', v.currency + 'usdt'),
|
|
20
20
|
volume: +((_a = v.balance) !== null && _a !== void 0 ? _a : 0),
|
|
21
21
|
free_volume: +((_b = v.balance) !== null && _b !== void 0 ? _b : 0),
|
|
22
22
|
closable_price: 1, // TODO: 获取现货币对价格
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spot.js","sourceRoot":"","sources":["../../../src/services/accounts/spot.ts"],"names":[],"mappings":";;;AAAA,uDAAwF;A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AW,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE;YAC5B,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,IAAA,kBAAU,EAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,GAAG,MAAM,CAAC;YAC1D,MAAM,EAAE,CAAC,CAAC,MAAA,CAAC,CAAC,OAAO,mCAAI,CAAC,CAAC;YACzB,WAAW,EAAE,CAAC,CAAC,MAAA,CAAC,CAAC,OAAO,mCAAI,CAAC,CAAC;YAC9B,cAAc,EAAE,CAAC,EAAE,iBAAiB;SACrC,CAAC,CAAC;IACL,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B","sourcesContent":["import { IActionHandlerOfGetAccountInfo, makeSpotPosition } from '@yuants/data-account';\nimport { getSpotAccountBalance, ICredential } from '../../api/private-api';\nimport { spotAccountUidCache } from '../uid';\nimport { encodePath } from '@yuants/utils';\n\nexport const getSpotAccountInfo: IActionHandlerOfGetAccountInfo<ICredential> = async (credential) => {\n const spotAccountUid = await spotAccountUidCache.query(JSON.stringify(credential));\n if (!spotAccountUid) throw new Error('Failed to get Spot Account UID');\n const spotBalance = await getSpotAccountBalance(credential, spotAccountUid);\n\n return spotBalance.data.list\n .map((v) => {\n return makeSpotPosition({\n position_id: `${v.currency}`,\n datasource_id: 'HTX',\n product_id: encodePath('HTX', 'SPOT', v.currency + 'usdt'),\n volume: +(v.balance ?? 0),\n free_volume: +(v.balance ?? 0),\n closable_price: 1, // TODO: 获取现货币对价格\n });\n })\n .filter((x) => x.volume > 0);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuants/vendor-huobi",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -8,20 +8,19 @@
|
|
|
8
8
|
"temp"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@yuants/protocol": "0.53.
|
|
12
|
-
"@yuants/data-account": "0.8.
|
|
13
|
-
"@yuants/data-order": "0.6.
|
|
14
|
-
"@yuants/transfer": "0.2.
|
|
15
|
-
"@yuants/utils": "0.
|
|
16
|
-
"@yuants/cache": "0.3.
|
|
17
|
-
"@yuants/sql": "0.9.
|
|
18
|
-
"@yuants/data-product": "0.4.
|
|
19
|
-
"@yuants/data-series": "0.3.
|
|
20
|
-
"@yuants/data-interest-rate": "0.1.
|
|
21
|
-
"@yuants/data-quote": "0.2.
|
|
22
|
-
"@yuants/exchange": "0.1.
|
|
23
|
-
"rxjs": "~7.5.6"
|
|
24
|
-
"crypto-js": "^4.2.0"
|
|
11
|
+
"@yuants/protocol": "0.53.2",
|
|
12
|
+
"@yuants/data-account": "0.8.4",
|
|
13
|
+
"@yuants/data-order": "0.6.6",
|
|
14
|
+
"@yuants/transfer": "0.2.39",
|
|
15
|
+
"@yuants/utils": "0.14.0",
|
|
16
|
+
"@yuants/cache": "0.3.3",
|
|
17
|
+
"@yuants/sql": "0.9.30",
|
|
18
|
+
"@yuants/data-product": "0.4.21",
|
|
19
|
+
"@yuants/data-series": "0.3.51",
|
|
20
|
+
"@yuants/data-interest-rate": "0.1.48",
|
|
21
|
+
"@yuants/data-quote": "0.2.43",
|
|
22
|
+
"@yuants/exchange": "0.1.2",
|
|
23
|
+
"rxjs": "~7.5.6"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
26
|
"@microsoft/api-extractor": "~7.30.0",
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
"@rushstack/heft-node-rig": "~1.10.7",
|
|
31
30
|
"@types/heft-jest": "1.0.3",
|
|
32
31
|
"@types/node": "22",
|
|
33
|
-
"@yuants/extension": "0.2.
|
|
32
|
+
"@yuants/extension": "0.2.31",
|
|
34
33
|
"@yuants/tool-kit": "0.2.1",
|
|
35
34
|
"typescript": "~4.7.4"
|
|
36
35
|
},
|
package/temp/package-deps.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/vendor-huobi/CHANGELOG.json": "
|
|
3
|
-
"apps/vendor-huobi/CHANGELOG.md": "
|
|
2
|
+
"apps/vendor-huobi/CHANGELOG.json": "fa7d71052079428b005f9c4fee60f56fad01868a",
|
|
3
|
+
"apps/vendor-huobi/CHANGELOG.md": "8127fc72d1fe3fa9e19c42c5ae4dea6b78697b06",
|
|
4
4
|
"apps/vendor-huobi/README.md": "d7bf0149513114eab5500a6b5c9e7cba10565572",
|
|
5
5
|
"apps/vendor-huobi/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
6
6
|
"apps/vendor-huobi/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
7
7
|
"apps/vendor-huobi/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
8
8
|
"apps/vendor-huobi/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
9
9
|
"apps/vendor-huobi/etc/vendor-huobi.api.md": "dc8cbf2a044a227b30a4ee9701b0c97328244724",
|
|
10
|
-
"apps/vendor-huobi/package.json": "
|
|
10
|
+
"apps/vendor-huobi/package.json": "13e8e024285ca54194c05ecb94e901b1aa837dab",
|
|
11
11
|
"apps/vendor-huobi/src/__archived/account-info.ts": "5c325d3bb8839476c11f25693326ce05f3321ebd",
|
|
12
12
|
"apps/vendor-huobi/src/__archived/api.ts": "8366151dc881b177d0478fb328a601a11e33cd35",
|
|
13
13
|
"apps/vendor-huobi/src/__archived/transfer.ts": "fd299ad82ff31344460967f2a938b8f36c879259",
|
|
14
14
|
"apps/vendor-huobi/src/api/private-api.ts": "644260e6709841ade74d43b6df6dd3eda42d36d9",
|
|
15
15
|
"apps/vendor-huobi/src/api/public-api.ts": "03a1468bea318d5fcb8c0c9d45666ffbee4346f0",
|
|
16
16
|
"apps/vendor-huobi/src/index.ts": "b0fa28ef4e008320564a0ddc789104f398160a0a",
|
|
17
|
-
"apps/vendor-huobi/src/services/accounts/spot.ts": "
|
|
17
|
+
"apps/vendor-huobi/src/services/accounts/spot.ts": "a1b9e94547112561fa8f8389c03dbf73c51ba21e",
|
|
18
18
|
"apps/vendor-huobi/src/services/accounts/super-margin.ts": "b4fbe80f4d1419a211a03461bbe7c96ad52aa594",
|
|
19
19
|
"apps/vendor-huobi/src/services/accounts/swap.ts": "4da1dbf2cc3554a9943df419c5a11330130a5f3d",
|
|
20
20
|
"apps/vendor-huobi/src/services/exchange.ts": "6fed94206a22c43d3c6890cf52ff054a24d98d82",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"apps/vendor-huobi/src/services/product.ts": "32ee8940524fa250664a05693b373daba4d6fd08",
|
|
26
26
|
"apps/vendor-huobi/src/services/uid.ts": "b71c27a6a0debdd9365dea35306f4763327aca2f",
|
|
27
27
|
"apps/vendor-huobi/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
|
|
28
|
-
"apps/vendor-huobi/.rush/temp/shrinkwrap-deps.json": "
|
|
29
|
-
"libraries/protocol/temp/package-deps.json": "
|
|
30
|
-
"libraries/data-account/temp/package-deps.json": "
|
|
31
|
-
"libraries/data-order/temp/package-deps.json": "
|
|
32
|
-
"libraries/transfer/temp/package-deps.json": "
|
|
33
|
-
"libraries/utils/temp/package-deps.json": "
|
|
34
|
-
"libraries/cache/temp/package-deps.json": "
|
|
35
|
-
"libraries/sql/temp/package-deps.json": "
|
|
36
|
-
"libraries/data-product/temp/package-deps.json": "
|
|
37
|
-
"libraries/data-series/temp/package-deps.json": "
|
|
38
|
-
"libraries/data-interest-rate/temp/package-deps.json": "
|
|
39
|
-
"libraries/data-quote/temp/package-deps.json": "
|
|
40
|
-
"libraries/exchange/temp/package-deps.json": "
|
|
41
|
-
"libraries/extension/temp/package-deps.json": "
|
|
28
|
+
"apps/vendor-huobi/.rush/temp/shrinkwrap-deps.json": "3099afcf246e8bc9ff02db11dd7b34b8bd1e72d9",
|
|
29
|
+
"libraries/protocol/temp/package-deps.json": "0bd43721e96039b52d7b59c834dc6df45cf75e3f",
|
|
30
|
+
"libraries/data-account/temp/package-deps.json": "ae6b0c69040d0d1989525e843717b6e303d95ef2",
|
|
31
|
+
"libraries/data-order/temp/package-deps.json": "2adac9fc0423f9b1b7ddaa8946ab7af374cc22e1",
|
|
32
|
+
"libraries/transfer/temp/package-deps.json": "36c58299bd6c841c5ba7252d71881a881570d08c",
|
|
33
|
+
"libraries/utils/temp/package-deps.json": "6d58e9b325e8d16de8a878c32010f626b12a01da",
|
|
34
|
+
"libraries/cache/temp/package-deps.json": "a4afa15e6462983f9d3735d31dc1ed8a683fb4dc",
|
|
35
|
+
"libraries/sql/temp/package-deps.json": "4a9a7ec55f04b20459e664e81e76fa74b6c77b39",
|
|
36
|
+
"libraries/data-product/temp/package-deps.json": "8caccae65af24afde5d0e602eb24f57c22c7efd2",
|
|
37
|
+
"libraries/data-series/temp/package-deps.json": "c89ebffe302757903aa54eff78f76cb855486b8c",
|
|
38
|
+
"libraries/data-interest-rate/temp/package-deps.json": "cef1e1cb0116ad593c24635684e0cbf03488d67c",
|
|
39
|
+
"libraries/data-quote/temp/package-deps.json": "34d079eab44d2bf65e07b112ac2099c6e92a015e",
|
|
40
|
+
"libraries/exchange/temp/package-deps.json": "f9a2557b53874e78a809b82326b850d98b524a9b",
|
|
41
|
+
"libraries/extension/temp/package-deps.json": "9569c553c2f9a7d50b70d8f101fc2d3825aaccb9",
|
|
42
42
|
"tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
|
|
43
43
|
}
|