@yuants/vendor-aster 0.7.31 → 0.8.0
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/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/services/quotes.js +57 -0
- package/dist/services/quotes.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/services/quotes.d.ts +2 -0
- package/lib/services/quotes.d.ts.map +1 -0
- package/lib/services/quotes.js +59 -0
- package/lib/services/quotes.js.map +1 -0
- package/package.json +1 -1
- package/temp/package-deps.json +5 -4
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC","sourcesContent":["import './services/markets/interest_rate';\nimport './services/markets/product';\nimport './services/markets/quote';\nimport './services/exchange';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC","sourcesContent":["import './services/markets/interest_rate';\nimport './services/markets/product';\nimport './services/markets/quote';\nimport './services/exchange';\nimport './services/quotes';\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { provideQuoteService } from '@yuants/exchange';
|
|
2
|
+
import { Terminal } from '@yuants/protocol';
|
|
3
|
+
import { decodePath, encodePath, formatTime } from '@yuants/utils';
|
|
4
|
+
import { getFApiV1OpenInterest, getFApiV1PremiumIndex, getFApiV1TickerPrice } from '../api/public-api';
|
|
5
|
+
const terminal = Terminal.fromNodeEnv();
|
|
6
|
+
provideQuoteService(terminal, {
|
|
7
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
8
|
+
fields: ['last_price', 'bid_price', 'ask_price'],
|
|
9
|
+
}, async () => {
|
|
10
|
+
const entries = await getFApiV1TickerPrice({});
|
|
11
|
+
return (entries !== null && entries !== void 0 ? entries : []).map((entry) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return ({
|
|
14
|
+
product_id: encodePath('ASTER', 'PERP', entry.symbol),
|
|
15
|
+
updated_at: (_a = entry.time) !== null && _a !== void 0 ? _a : Date.now(),
|
|
16
|
+
last_price: `${entry.price}`,
|
|
17
|
+
bid_price: `${entry.price}`,
|
|
18
|
+
ask_price: `${entry.price}`,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
provideQuoteService(terminal, {
|
|
23
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
24
|
+
fields: ['interest_rate_long', 'interest_rate_short', 'interest_rate_next_settled_at'],
|
|
25
|
+
}, async () => {
|
|
26
|
+
const res = await getFApiV1PremiumIndex({});
|
|
27
|
+
const entries = Array.isArray(res) ? res : [res];
|
|
28
|
+
return entries.map((entry) => {
|
|
29
|
+
var _a;
|
|
30
|
+
return ({
|
|
31
|
+
product_id: encodePath('ASTER', 'PERP', entry.symbol),
|
|
32
|
+
updated_at: (_a = entry.time) !== null && _a !== void 0 ? _a : Date.now(),
|
|
33
|
+
interest_rate_long: `${-Number(entry.lastFundingRate)}`,
|
|
34
|
+
interest_rate_short: `${Number(entry.lastFundingRate)}`,
|
|
35
|
+
interest_rate_next_settled_at: formatTime(entry.nextFundingTime),
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
provideQuoteService(terminal, {
|
|
40
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
41
|
+
fields: ['open_interest'],
|
|
42
|
+
max_products_per_request: 1,
|
|
43
|
+
}, async (req) => {
|
|
44
|
+
const [product_id] = req.product_ids;
|
|
45
|
+
if (!product_id)
|
|
46
|
+
return [];
|
|
47
|
+
const [, , symbol] = decodePath(product_id);
|
|
48
|
+
const res = await getFApiV1OpenInterest({ symbol });
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
product_id,
|
|
52
|
+
updated_at: res.time,
|
|
53
|
+
open_interest: res.openInterest,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=quotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/services/quotes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEvG,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,mBAAmB,CACjB,QAAQ,EACR;IACE,iBAAiB,EAAE,aAAa;IAChC,MAAM,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;CACjD,EACD,KAAK,IAAI,EAAE;IACT,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;QAAC,OAAA,CAAC;YACrC,UAAU,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACrD,UAAU,EAAE,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI,CAAC,G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AU,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;IACrC,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,CAAC,EAAE,AAAD,EAAG,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,MAAM,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,OAAO;QACL;YACE,UAAU;YACV,UAAU,EAAE,GAAG,CAAC,IAAI;YACpB,aAAa,EAAE,GAAG,CAAC,YAAY;SAChC;KACF,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { provideQuoteService } from '@yuants/exchange';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, encodePath, formatTime } from '@yuants/utils';\nimport { getFApiV1OpenInterest, getFApiV1PremiumIndex, getFApiV1TickerPrice } from '../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['last_price', 'bid_price', 'ask_price'],\n },\n async () => {\n const entries = await getFApiV1TickerPrice({});\n return (entries ?? []).map((entry) => ({\n product_id: encodePath('ASTER', 'PERP', entry.symbol),\n updated_at: entry.time ?? Date.now(),\n last_price: `${entry.price}`,\n bid_price: `${entry.price}`,\n ask_price: `${entry.price}`,\n }));\n },\n);\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['interest_rate_long', 'interest_rate_short', 'interest_rate_next_settled_at'],\n },\n async () => {\n const res = await getFApiV1PremiumIndex({});\n const entries = Array.isArray(res) ? res : [res];\n return entries.map((entry) => ({\n product_id: encodePath('ASTER', 'PERP', entry.symbol),\n updated_at: entry.time ?? Date.now(),\n interest_rate_long: `${-Number(entry.lastFundingRate)}`,\n interest_rate_short: `${Number(entry.lastFundingRate)}`,\n interest_rate_next_settled_at: formatTime(entry.nextFundingTime),\n }));\n },\n);\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['open_interest'],\n max_products_per_request: 1,\n },\n async (req) => {\n const [product_id] = req.product_ids;\n if (!product_id) return [];\n\n const [, , symbol] = decodePath(product_id);\n const res = await getFApiV1OpenInterest({ symbol });\n return [\n {\n product_id,\n updated_at: res.time,\n open_interest: res.openInterest,\n },\n ];\n },\n);\n"]}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,4CAA0C;AAC1C,sCAAoC;AACpC,oCAAkC;AAClC,+BAA6B","sourcesContent":["import './services/markets/interest_rate';\nimport './services/markets/product';\nimport './services/markets/quote';\nimport './services/exchange';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,4CAA0C;AAC1C,sCAAoC;AACpC,oCAAkC;AAClC,+BAA6B;AAC7B,6BAA2B","sourcesContent":["import './services/markets/interest_rate';\nimport './services/markets/product';\nimport './services/markets/quote';\nimport './services/exchange';\nimport './services/quotes';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../src/services/quotes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const exchange_1 = require("@yuants/exchange");
|
|
4
|
+
const protocol_1 = require("@yuants/protocol");
|
|
5
|
+
const utils_1 = require("@yuants/utils");
|
|
6
|
+
const public_api_1 = require("../api/public-api");
|
|
7
|
+
const terminal = protocol_1.Terminal.fromNodeEnv();
|
|
8
|
+
(0, exchange_1.provideQuoteService)(terminal, {
|
|
9
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
10
|
+
fields: ['last_price', 'bid_price', 'ask_price'],
|
|
11
|
+
}, async () => {
|
|
12
|
+
const entries = await (0, public_api_1.getFApiV1TickerPrice)({});
|
|
13
|
+
return (entries !== null && entries !== void 0 ? entries : []).map((entry) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return ({
|
|
16
|
+
product_id: (0, utils_1.encodePath)('ASTER', 'PERP', entry.symbol),
|
|
17
|
+
updated_at: (_a = entry.time) !== null && _a !== void 0 ? _a : Date.now(),
|
|
18
|
+
last_price: `${entry.price}`,
|
|
19
|
+
bid_price: `${entry.price}`,
|
|
20
|
+
ask_price: `${entry.price}`,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
(0, exchange_1.provideQuoteService)(terminal, {
|
|
25
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
26
|
+
fields: ['interest_rate_long', 'interest_rate_short', 'interest_rate_next_settled_at'],
|
|
27
|
+
}, async () => {
|
|
28
|
+
const res = await (0, public_api_1.getFApiV1PremiumIndex)({});
|
|
29
|
+
const entries = Array.isArray(res) ? res : [res];
|
|
30
|
+
return entries.map((entry) => {
|
|
31
|
+
var _a;
|
|
32
|
+
return ({
|
|
33
|
+
product_id: (0, utils_1.encodePath)('ASTER', 'PERP', entry.symbol),
|
|
34
|
+
updated_at: (_a = entry.time) !== null && _a !== void 0 ? _a : Date.now(),
|
|
35
|
+
interest_rate_long: `${-Number(entry.lastFundingRate)}`,
|
|
36
|
+
interest_rate_short: `${Number(entry.lastFundingRate)}`,
|
|
37
|
+
interest_rate_next_settled_at: (0, utils_1.formatTime)(entry.nextFundingTime),
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
(0, exchange_1.provideQuoteService)(terminal, {
|
|
42
|
+
product_id_prefix: 'ASTER/PERP/',
|
|
43
|
+
fields: ['open_interest'],
|
|
44
|
+
max_products_per_request: 1,
|
|
45
|
+
}, async (req) => {
|
|
46
|
+
const [product_id] = req.product_ids;
|
|
47
|
+
if (!product_id)
|
|
48
|
+
return [];
|
|
49
|
+
const [, , symbol] = (0, utils_1.decodePath)(product_id);
|
|
50
|
+
const res = await (0, public_api_1.getFApiV1OpenInterest)({ symbol });
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
product_id,
|
|
54
|
+
updated_at: res.time,
|
|
55
|
+
open_interest: res.openInterest,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=quotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/services/quotes.ts"],"names":[],"mappings":";;AAAA,+CAAuD;AACvD,+CAA4C;AAC5C,yCAAmE;AACnE,kDAAuG;AAEvG,MAAM,QAAQ,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC;AAExC,IAAA,8BAAmB,EACjB,QAAQ,EACR;IACE,iBAAiB,EAAE,aAAa;IAChC,MAAM,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;CACjD,EACD,KAAK,IAAI,EAAE;IACT,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAoB,EAAC,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EA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AAC;SACjE,CAAC,CAAA;KAAA,CAAC,CAAC;AACN,CAAC,CACF,CAAC;AAEF,IAAA,8BAAmB,EACjB,QAAQ,EACR;IACE,iBAAiB,EAAE,aAAa;IAChC,MAAM,EAAE,CAAC,eAAe,CAAC;IACzB,wBAAwB,EAAE,CAAC;CAC5B,EACD,KAAK,EAAE,GAAG,EAAE,EAAE;IACZ,MAAM,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;IACrC,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,CAAC,EAAE,AAAD,EAAG,MAAM,CAAC,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,MAAM,IAAA,kCAAqB,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,OAAO;QACL;YACE,UAAU;YACV,UAAU,EAAE,GAAG,CAAC,IAAI;YACpB,aAAa,EAAE,GAAG,CAAC,YAAY;SAChC;KACF,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { provideQuoteService } from '@yuants/exchange';\nimport { Terminal } from '@yuants/protocol';\nimport { decodePath, encodePath, formatTime } from '@yuants/utils';\nimport { getFApiV1OpenInterest, getFApiV1PremiumIndex, getFApiV1TickerPrice } from '../api/public-api';\n\nconst terminal = Terminal.fromNodeEnv();\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['last_price', 'bid_price', 'ask_price'],\n },\n async () => {\n const entries = await getFApiV1TickerPrice({});\n return (entries ?? []).map((entry) => ({\n product_id: encodePath('ASTER', 'PERP', entry.symbol),\n updated_at: entry.time ?? Date.now(),\n last_price: `${entry.price}`,\n bid_price: `${entry.price}`,\n ask_price: `${entry.price}`,\n }));\n },\n);\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['interest_rate_long', 'interest_rate_short', 'interest_rate_next_settled_at'],\n },\n async () => {\n const res = await getFApiV1PremiumIndex({});\n const entries = Array.isArray(res) ? res : [res];\n return entries.map((entry) => ({\n product_id: encodePath('ASTER', 'PERP', entry.symbol),\n updated_at: entry.time ?? Date.now(),\n interest_rate_long: `${-Number(entry.lastFundingRate)}`,\n interest_rate_short: `${Number(entry.lastFundingRate)}`,\n interest_rate_next_settled_at: formatTime(entry.nextFundingTime),\n }));\n },\n);\n\nprovideQuoteService(\n terminal,\n {\n product_id_prefix: 'ASTER/PERP/',\n fields: ['open_interest'],\n max_products_per_request: 1,\n },\n async (req) => {\n const [product_id] = req.product_ids;\n if (!product_id) return [];\n\n const [, , symbol] = decodePath(product_id);\n const res = await getFApiV1OpenInterest({ symbol });\n return [\n {\n product_id,\n updated_at: res.time,\n open_interest: res.openInterest,\n },\n ];\n },\n);\n"]}
|
package/package.json
CHANGED
package/temp/package-deps.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"apps/vendor-aster/AGENTS.md": "dcd006d19a5c3b73081525d7c0afea68cd6d058b",
|
|
3
|
-
"apps/vendor-aster/CHANGELOG.json": "
|
|
4
|
-
"apps/vendor-aster/CHANGELOG.md": "
|
|
3
|
+
"apps/vendor-aster/CHANGELOG.json": "86d2e536eff8b82323333dbaab84c1e855682e6d",
|
|
4
|
+
"apps/vendor-aster/CHANGELOG.md": "d88698e710b63935d107fc428501df0e175995e8",
|
|
5
5
|
"apps/vendor-aster/SESSION_NOTES.md": "d91f7a251d148fab1715b6da62395455edcb3b93",
|
|
6
6
|
"apps/vendor-aster/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
7
7
|
"apps/vendor-aster/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
8
8
|
"apps/vendor-aster/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
9
|
-
"apps/vendor-aster/package.json": "
|
|
9
|
+
"apps/vendor-aster/package.json": "9a447a6b77bcd7cb694ad06073d302717f31954a",
|
|
10
10
|
"apps/vendor-aster/src/api/private-api.ts": "b3288706373f8917be480210f8f02074890d5b34",
|
|
11
11
|
"apps/vendor-aster/src/api/public-api.ts": "ced2ae976ee7a74a5c1fe704b2c5fb2e25f13ab7",
|
|
12
|
-
"apps/vendor-aster/src/index.ts": "
|
|
12
|
+
"apps/vendor-aster/src/index.ts": "4b46f0d848fc05118d9db1a65be160423416da15",
|
|
13
13
|
"apps/vendor-aster/src/services/accounts/profile.ts": "fc57e7d2c865790dd257c043c8dd5cf5c641b7fd",
|
|
14
14
|
"apps/vendor-aster/src/services/accounts/spot.ts": "49d045e5daae100ce9919ebd84723506806060ea",
|
|
15
15
|
"apps/vendor-aster/src/services/exchange.ts": "71a555ceec0d84b6f12a9c2002834676f1370d51",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"apps/vendor-aster/src/services/orders/cancelOrder.ts": "09a6d3b10a218ad226346dd68d0ff0207083a7f1",
|
|
20
20
|
"apps/vendor-aster/src/services/orders/listOrders.ts": "579e83c45f6c4435ad3f5a2d3fe163a036bb9fd1",
|
|
21
21
|
"apps/vendor-aster/src/services/orders/submitOrder.ts": "9580e87b195b7bd3631b0b3e5f6c2a1c37b29feb",
|
|
22
|
+
"apps/vendor-aster/src/services/quotes.ts": "9e93bc9a89a26018fd50f9ca845897334f2429ce",
|
|
22
23
|
"apps/vendor-aster/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
|
|
23
24
|
"apps/vendor-aster/.rush/temp/shrinkwrap-deps.json": "5ded440ffb547a8aa495353d5b13c1fd1b164b4a",
|
|
24
25
|
"libraries/protocol/temp/package-deps.json": "0bd43721e96039b52d7b59c834dc6df45cf75e3f",
|