@yuants/vendor-okx 0.27.3 → 0.27.5
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/account-actions-with-credential.js +6 -6
- package/dist/account-actions-with-credential.js.map +1 -1
- package/dist/account.js +4 -4
- package/dist/account.js.map +1 -1
- package/dist/accountInfos/earning.js +12 -10
- package/dist/accountInfos/earning.js.map +1 -1
- package/dist/accountInfos/funding.js +11 -41
- package/dist/accountInfos/funding.js.map +1 -1
- package/dist/accountInfos/loan.js +16 -23
- package/dist/accountInfos/loan.js.map +1 -1
- package/dist/accountInfos/strategy.js +1 -8
- package/dist/accountInfos/strategy.js.map +1 -1
- package/dist/accountInfos/trading.js +26 -26
- package/dist/accountInfos/trading.js.map +1 -1
- package/dist/accountInfos/uid.js +2 -0
- package/dist/accountInfos/uid.js.map +1 -1
- package/dist/strategy-account.js +2 -2
- package/dist/strategy-account.js.map +1 -1
- package/lib/account-actions-with-credential.js +6 -6
- package/lib/account-actions-with-credential.js.map +1 -1
- package/lib/account.d.ts.map +1 -1
- package/lib/account.js +4 -4
- package/lib/account.js.map +1 -1
- package/lib/accountInfos/earning.d.ts +2 -2
- package/lib/accountInfos/earning.d.ts.map +1 -1
- package/lib/accountInfos/earning.js +12 -10
- package/lib/accountInfos/earning.js.map +1 -1
- package/lib/accountInfos/funding.d.ts +2 -2
- package/lib/accountInfos/funding.d.ts.map +1 -1
- package/lib/accountInfos/funding.js +10 -40
- package/lib/accountInfos/funding.js.map +1 -1
- package/lib/accountInfos/loan.d.ts +2 -2
- package/lib/accountInfos/loan.d.ts.map +1 -1
- package/lib/accountInfos/loan.js +16 -23
- package/lib/accountInfos/loan.js.map +1 -1
- package/lib/accountInfos/strategy.d.ts +2 -2
- package/lib/accountInfos/strategy.d.ts.map +1 -1
- package/lib/accountInfos/strategy.js +1 -8
- package/lib/accountInfos/strategy.js.map +1 -1
- package/lib/accountInfos/trading.d.ts +3 -2
- package/lib/accountInfos/trading.d.ts.map +1 -1
- package/lib/accountInfos/trading.js +28 -27
- package/lib/accountInfos/trading.js.map +1 -1
- package/lib/accountInfos/uid.d.ts.map +1 -1
- package/lib/accountInfos/uid.js +2 -0
- package/lib/accountInfos/uid.js.map +1 -1
- package/lib/strategy-account.js +2 -2
- package/lib/strategy-account.js.map +1 -1
- package/package.json +2 -2
- package/temp/package-deps.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy-account.js","sourceRoot":"","sources":["../src/strategy-account.ts"],"names":[],"mappings":";;AAAA,uDAAmF;AACnF,+CAA4C;AAC5C,+BAA6B;AAC7B,iDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"strategy-account.js","sourceRoot":"","sources":["../src/strategy-account.ts"],"names":[],"mappings":";;AAAA,uDAAmF;AACnF,+CAA4C;AAC5C,+BAA6B;AAC7B,iDAAwD;AACxD,4CAA0D;AAC1D,mDAA2E;AAE3E,MAAM,QAAQ,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC;AACxC,MAAM,UAAU,GAAG,IAAA,kCAAoB,GAAE,CAAC;AAE1C,IAAA,YAAK,EAAC,KAAK,IAAI,EAAE;IACf,MAAM,iBAAiB,GAAG,MAAM,IAAA,0BAAoB,EAAC,UAAU,CAAC,CAAC;IAEjE,IAAA,+BAAgB,EAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAEhF,QAAQ,CAAC,MAAM,CAAC,cAAc,CAI5B,wBAAwB,EACxB;QACE,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;QAClC,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE;YACxD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC3B;KACF,EACD,KAAK,EAAE,GAAG,EAAE,EAAE;QACZ,EAAE;QACF,OAAO;YACL,GAAG,EAAE;gBACH,IAAI,EAAE,CAAC;gBACP,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,MAAM,IAAA,8BAAgB,EAAC,UAAU,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;aACnG;SACF,CAAC;IACJ,CAAC,EACD;QACE,qBAAqB,EAAE,EAAE;QACzB,4BAA4B,EAAE,IAAI,EAAE,0BAA0B;KAC/D,CACF,CAAC;IAEF,IAAA,wCAAyB,EACvB,QAAQ,EACR,iBAAiB,EACjB,GAAG,EAAE,CAAC,IAAA,qCAAsB,EAAC,UAAU,EAAE,iBAAiB,CAAC,EAC3D;QACE,qBAAqB,EAAE,IAAI;KAC5B,CACF,CAAC;AACJ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC","sourcesContent":["import { addAccountMarket, provideAccountInfoService } from '@yuants/data-account';\nimport { Terminal } from '@yuants/protocol';\nimport { defer } from 'rxjs';\nimport { getStrategyAccountInfo } from './accountInfos';\nimport { getStrategyAccountId } from './accountInfos/uid';\nimport { getDefaultCredential, getGridPositions } from './api/private-api';\n\nconst terminal = Terminal.fromNodeEnv();\nconst credential = getDefaultCredential();\n\ndefer(async () => {\n const strategyAccountId = await getStrategyAccountId(credential);\n\n addAccountMarket(terminal, { account_id: strategyAccountId, market_id: 'OKX' });\n\n terminal.server.provideService<\n { account_id: string; algoId: string },\n Awaited<ReturnType<typeof getGridPositions>>\n >(\n `OKX/QueryGridPositions`,\n {\n required: ['account_id', 'algoId'],\n properties: {\n account_id: { type: 'string', const: strategyAccountId },\n algoId: { type: 'string' },\n },\n },\n async (msg) => {\n //\n return {\n res: {\n code: 0,\n message: 'OK',\n data: await getGridPositions(credential, { algoOrdType: 'contract_grid', algoId: msg.req.algoId }),\n },\n };\n },\n {\n egress_token_capacity: 20,\n egress_token_refill_interval: 4000, // 每 4 秒恢复 20 个令牌 (双倍冗余限流)\n },\n );\n\n provideAccountInfoService(\n terminal,\n strategyAccountId,\n () => getStrategyAccountInfo(credential, strategyAccountId),\n {\n auto_refresh_interval: 5000,\n },\n );\n}).subscribe();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuants/vendor-okx",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@yuants/protocol": "0.52.0",
|
|
12
12
|
"@yuants/transfer": "0.2.35",
|
|
13
|
-
"@yuants/data-account": "0.
|
|
13
|
+
"@yuants/data-account": "0.8.0",
|
|
14
14
|
"@yuants/data-order": "0.6.2",
|
|
15
15
|
"@yuants/utils": "0.11.0",
|
|
16
16
|
"@yuants/cache": "0.3.0",
|
package/temp/package-deps.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/vendor-okx/CHANGELOG.json": "
|
|
3
|
-
"apps/vendor-okx/CHANGELOG.md": "
|
|
2
|
+
"apps/vendor-okx/CHANGELOG.json": "ee3af1bcce579671b08026157798af4a44164747",
|
|
3
|
+
"apps/vendor-okx/CHANGELOG.md": "69ab961677829ce1d0405355da1d97a345135f88",
|
|
4
4
|
"apps/vendor-okx/README.md": "68caeb8e383d77ece973cd70f4b167b86abb54c3",
|
|
5
5
|
"apps/vendor-okx/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
6
6
|
"apps/vendor-okx/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
7
7
|
"apps/vendor-okx/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
8
8
|
"apps/vendor-okx/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
9
9
|
"apps/vendor-okx/etc/vendor-okx.api.md": "92c54ccd547d2ad81ca6088158ca193e85c208df",
|
|
10
|
-
"apps/vendor-okx/package.json": "
|
|
11
|
-
"apps/vendor-okx/src/account-actions-with-credential.ts": "
|
|
12
|
-
"apps/vendor-okx/src/account.ts": "
|
|
13
|
-
"apps/vendor-okx/src/accountInfos/earning.ts": "
|
|
14
|
-
"apps/vendor-okx/src/accountInfos/funding.ts": "
|
|
10
|
+
"apps/vendor-okx/package.json": "8904acd31ef0b422f1ecd56faf88baf7c904eed6",
|
|
11
|
+
"apps/vendor-okx/src/account-actions-with-credential.ts": "1a2de787b588e98ceef60b3ffb951f298504bf12",
|
|
12
|
+
"apps/vendor-okx/src/account.ts": "672014c974457b438cf026f763d6eecfe585c82b",
|
|
13
|
+
"apps/vendor-okx/src/accountInfos/earning.ts": "62aaeb3b62fa9197d07ee14155625530cdb9b1cd",
|
|
14
|
+
"apps/vendor-okx/src/accountInfos/funding.ts": "3d13609f6e8054fd124e4a3dc06b4b775f884ae5",
|
|
15
15
|
"apps/vendor-okx/src/accountInfos/index.ts": "272c4a49a94749b17d83bfb1f39a9bd932707288",
|
|
16
|
-
"apps/vendor-okx/src/accountInfos/loan.ts": "
|
|
17
|
-
"apps/vendor-okx/src/accountInfos/strategy.ts": "
|
|
18
|
-
"apps/vendor-okx/src/accountInfos/trading.ts": "
|
|
16
|
+
"apps/vendor-okx/src/accountInfos/loan.ts": "693df52e7f9f3d1e1ae3179e5c4c4572db9597f1",
|
|
17
|
+
"apps/vendor-okx/src/accountInfos/strategy.ts": "176add92022ad1fb43bad61880c5053aaa9fd5be",
|
|
18
|
+
"apps/vendor-okx/src/accountInfos/trading.ts": "5e6ef37f23c970cc2379887167f886fc63f8822f",
|
|
19
19
|
"apps/vendor-okx/src/accountInfos/types.ts": "c3c1096c3ad6849f6f679f1dfe0badb3ae876e41",
|
|
20
|
-
"apps/vendor-okx/src/accountInfos/uid.ts": "
|
|
20
|
+
"apps/vendor-okx/src/accountInfos/uid.ts": "348b64b205771143974e5ac5f5a7d06e9391a9f9",
|
|
21
21
|
"apps/vendor-okx/src/api-service.ts": "f1d977b144b1096965c5990260d9e6c81b08cb8c",
|
|
22
22
|
"apps/vendor-okx/src/api/private-api.ts": "73ab6b99249ebb73769e903cc356627eaf19b433",
|
|
23
23
|
"apps/vendor-okx/src/api/public-api.ts": "05b9cddafd09b5c9f65ce4eaeab42832e7d60449",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"apps/vendor-okx/src/public-data/product.ts": "9caa1b0d9fa621800870ef47086767f6f5810ad9",
|
|
37
37
|
"apps/vendor-okx/src/public-data/quote.ts": "4ab43a1d668393d90ae90ec1221de51a28101b32",
|
|
38
38
|
"apps/vendor-okx/src/services.ts": "2cbbc938f50f8348c02fd5b05cf53b3643a66d05",
|
|
39
|
-
"apps/vendor-okx/src/strategy-account.ts": "
|
|
39
|
+
"apps/vendor-okx/src/strategy-account.ts": "2d8f913e19c4402eab249291aaab0b77bc4d9ff8",
|
|
40
40
|
"apps/vendor-okx/src/trade.ts": "4d1f330a6cf1407d292e09f5928cd73ee8e9059d",
|
|
41
41
|
"apps/vendor-okx/src/transfer.ts": "381e4bf18846c8f79d3e970277d8800a2f94dacd",
|
|
42
42
|
"apps/vendor-okx/src/utils/provideOHLCFromTimeBackwardService.ts": "3a44206410b5b73683f2395d6c551549b553d7bd",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"apps/vendor-okx/.rush/temp/shrinkwrap-deps.json": "d2bbb3cc7c98f79d7add8c772fbe32efcb48b7b7",
|
|
47
47
|
"libraries/protocol/temp/package-deps.json": "52d2a645608a17915da897e48a70b415312a94fb",
|
|
48
48
|
"libraries/transfer/temp/package-deps.json": "43e6dc024979295961767cdfbbdbdf5aff2831b3",
|
|
49
|
-
"libraries/data-account/temp/package-deps.json": "
|
|
49
|
+
"libraries/data-account/temp/package-deps.json": "459a552a5ff4304fff00dfd369bb0746bd33cf5f",
|
|
50
50
|
"libraries/data-order/temp/package-deps.json": "0e063d2c14a4c5cfb23756143c3f399f545b496d",
|
|
51
51
|
"libraries/utils/temp/package-deps.json": "c58f1ca8f498315d9a0219ca8c498299a41d297b",
|
|
52
52
|
"libraries/cache/temp/package-deps.json": "49789a92426969daa31f0c956bb56bd783929765",
|