stock-sdk 2.0.0 → 2.1.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/README.md +1 -1
- package/dist/chunk-3X645BZO.js +1 -0
- package/dist/chunk-ANBQABED.cjs +1 -0
- package/dist/chunk-KKBFAS5P.cjs +1 -0
- package/dist/chunk-WP37ZK2F.js +1 -0
- package/dist/cli.cjs +6 -6
- package/dist/cli.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +2 -2
- package/dist/mcp.d.cts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{sdk-DOz03n_v.d.ts → sdk-B-hkKcZs.d.ts} +187 -1
- package/dist/{sdk-Cg_jTmTk.d.cts → sdk-CA1tOtb2.d.cts} +187 -1
- package/package.json +61 -16
- package/dist/chunk-2PYGJ5I5.cjs +0 -1
- package/dist/chunk-4PVVFEOQ.js +0 -1
- package/dist/chunk-GBHWMR2O.js +0 -1
- package/dist/chunk-YR2SVSXB.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkPMERLSCUcjs = require('./chunk-PMERLSCU.cjs');var _chunk3NSUE34Fcjs = require('./chunk-3NSUE34F.cjs');var _chunkTVIEKKDQcjs = require('./chunk-TVIEKKDQ.cjs');var _chunk4Q7UQ5Q3cjs = require('./chunk-4Q7UQ5Q3.cjs');var _chunk4VDLQK6Fcjs = require('./chunk-4VDLQK6F.cjs');function pt(t){return new TextDecoder("gbk").decode(t)}function mt(t){let e=t.split(";").map(r=>r.trim()).filter(Boolean),n=[];for(let r of e){let o=r.indexOf("=");if(o<0)continue;let i=r.slice(0,o).trim();i.startsWith("v_")&&(i=i.slice(2));let a=r.slice(o+1).trim();a.startsWith('"')&&a.endsWith('"')&&(a=a.slice(1,-1));let u=a.split("~");n.push({key:i,fields:u})}return n}function gt(t){let e=t.trim();return e===""||e==="-"||e==="--"}function f(t){if(!t||t==="")return 0;let e=parseFloat(t);return Number.isNaN(e)?0:e}function _(t){if(!t||gt(t))return null;let e=parseFloat(t);return Number.isNaN(e)?null:e}function m(t){if(!t||gt(t))return null;let e=parseFloat(t);return Number.isNaN(e)?null:e}function s(t){return t==null?null:m(String(t))}function M(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;if(gt(t))return null;let e=Number(t);return Number.isFinite(e)?e:null}var Ko=new Set(["daily","weekly","monthly"]),Bo=new Set(["1","5","15","30","60"]),Ho=new Set(["","qfq","hfq"]);function G(t,e){if(!Number.isFinite(t)||!Number.isInteger(t)||t<=0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`${e} must be a positive integer`,{argument:e,value:t})}function q(t){if(!Ko.has(t))throw new (0, _chunk4Q7UQ5Q3cjs.e)("period must be one of: daily, weekly, monthly",{argument:"period",value:t})}function ft(t){if(!Bo.has(t))throw new (0, _chunk4Q7UQ5Q3cjs.e)("period must be one of: 1, 5, 15, 30, 60",{argument:"period",value:t})}function W(t){if(!Ho.has(t))throw new (0, _chunk4Q7UQ5Q3cjs.e)("adjust must be one of: '', 'qfq', 'hfq'",{argument:"adjust",value:t})}function He(t){if(t!=="north"&&t!=="south")throw new (0, _chunk4Q7UQ5Q3cjs.e)("direction must be one of: 'north', 'south'",{argument:"direction",value:t})}function ce(t,e){G(e,"chunkSize");let n=[];for(let r=0;r<t.length;r+=e)n.push(t.slice(r,r+e));return n}async function de(t,e,n=!1){if(G(e,"concurrency"),t.length===0)return[];let r=n?new Array(t.length):[],o=0,i=Array.from({length:Math.min(e,t.length)},async()=>{for(;;){let a=o++;if(a>=t.length)return;let u=await t[a]();n?r[a]=u:r.push(u)}});return await Promise.all(i),r}function z(t){return{daily:"101",weekly:"102",monthly:"103"}[t]}function V(t){return{"":"0",qfq:"1",hfq:"2"}[t]}var qo=typeof document<"u"&&typeof window<"u",zo=0;function kn(){return`__stock_sdk_jsonp_${Date.now()}_${zo++}`}function qe(t){let e=t,n=e.indexOf("*/");n!==-1&&(e=e.slice(n+2).trim());let r=e.indexOf("(");if(r===-1)throw new (0, _chunk4Q7UQ5Q3cjs.a)({code:"PARSE_ERROR",message:"Invalid JSONP response: no opening parenthesis found"});let o=e.lastIndexOf(")");if(o===-1||o<=r)throw new (0, _chunk4Q7UQ5Q3cjs.a)({code:"PARSE_ERROR",message:"Invalid JSONP response: no closing parenthesis found"});let i=e.slice(r+1,o);try{return JSON.parse(i)}catch(a){throw new (0, _chunk4Q7UQ5Q3cjs.a)({code:"PARSE_ERROR",message:"Invalid JSONP response: payload is not valid JSON",cause:a})}}function $o(t,e){let{timeout:n=15e3,callbackParam:r="callback",callbackMode:o="query"}=e;return new Promise((i,a)=>{let u=kn(),l;if(o==="path")l=t.replace("{callback}",u);else{let R=t.includes("?")?"&":"?";l=`${t}${R}${r}=${u}`}let c=document.createElement("script"),d=!1,y=window,p=()=>{c.parentNode&&c.parentNode.removeChild(c),delete y[u]},T=setTimeout(()=>{d||(d=!0,p(),a(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`JSONP request timed out after ${n}ms: ${t}`,url:t,details:{timeout:n}})))},n);y[u]=R=>{d||(d=!0,clearTimeout(T),p(),i(R))},c.onerror=()=>{d||(d=!0,clearTimeout(T),p(),a(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`JSONP script load failed: ${t}`,url:t})))},c.src=l,document.head.appendChild(c)})}async function Qo(t,e){let{timeout:n=15e3,callbackParam:r="callback",callbackMode:o="query"}=e,i=kn(),a;if(o==="path")a=t.replace("{callback}",i);else{let c=t.includes("?")?"&":"?";a=`${t}${c}${r}=${i}`}let u=new AbortController,l=setTimeout(()=>u.abort(),n);try{let c=await fetch(a,{signal:u.signal});if(!c.ok)throw new (0, _chunk4Q7UQ5Q3cjs.b)(c.status,c.statusText,t);let d=await c.text();return qe(d)}catch(c){throw c instanceof DOMException&&c.name==="AbortError"?new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`JSONP request timed out after ${n}ms: ${t}`,url:t,details:{timeout:n}}):c instanceof _chunk4Q7UQ5Q3cjs.a?c:new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`JSONP request failed: ${c instanceof Error?c.message:String(c)}`,url:t,cause:c})}finally{clearTimeout(l)}}function x(t,e={}){return qo?$o(t,e):Qo(t,e)}var Ln=new Map;async function pe(t,e){let r=(_nullishCoalesce(Ln.get(t), () => (Promise.resolve()))).then(e,e);return Ln.set(t,r.then(()=>{},()=>{})),r}function jo(){return typeof document<"u"&&typeof window<"u"}var Go=15e3,Yo= exports.j ="jsVars";async function se(t,e,n={}){let r=_nullishCoalesce(n.timeout, () => (Go));return jo()?pe(Yo,()=>Wo(t,e,r)):Vo(t,e,r,n.headers,n.client)}function yt(t,e){let n={};for(let r of e){let o=Xo(t,r);o!==void 0&&(n[r]=o)}return n}function Wo(t,e,n){return new Promise((r,o)=>{let i=document.createElement("script"),a=!1,u=()=>{i.parentNode&&i.parentNode.removeChild(i)},l=setTimeout(()=>{a||(a=!0,u(),o(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`fetchJsVars timed out after ${n}ms: ${t}`,url:t,details:{timeout:n}})))},n);i.onload=()=>{if(a)return;a=!0,clearTimeout(l);let c=window,d={};for(let y of e)if(y in c){d[y]=c[y];try{delete c[y]}catch (e2){}}u(),r(d)},i.onerror=()=>{a||(a=!0,clearTimeout(l),u(),o(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`fetchJsVars script load failed: ${t}`,url:t})))},i.src=t,document.head.appendChild(i)})}async function Vo(t,e,n,r,o){if(o){let u=await o.get(t,{responseType:"text"});return yt(u,e)}let i=new AbortController,a=setTimeout(()=>i.abort(),n);try{let u=await fetch(t,{signal:i.signal,headers:r});if(!u.ok)throw new (0, _chunk4Q7UQ5Q3cjs.b)(u.status,u.statusText,t);let l=await u.text();return yt(l,e)}catch(u){throw u instanceof DOMException&&u.name==="AbortError"?new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`fetchJsVars timed out after ${n}ms: ${t}`,url:t,details:{timeout:n}}):u instanceof _chunk4Q7UQ5Q3cjs.a?u:new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`fetchJsVars failed: ${u instanceof Error?u.message:String(u)}`,url:t,cause:u})}finally{clearTimeout(a)}}function Xo(t,e){let r=new RegExp(`(?:^|[^\\w$])(?:var|let|const)\\s+${Jo(e)}\\s*=\\s*`,"m").exec(t);if(!r)return;let o=r.index+r[0].length,i=ei(t,o),a=t.slice(o,i).trim();try{return JSON.parse(a)}catch (e3){try{return JSON.parse(Zo(a))}catch (e4){return}}}function Zo(t){let e="",n=null;for(let r=0;r<t.length;r++){let o=t[r];if(n==='"'){e+=o,o==="\\"&&r+1<t.length?e+=t[++r]:o==='"'&&(n=null);continue}if(n==="'"){if(o==="\\"&&r+1<t.length){let i=t[++r];e+=i==="'"?"'":"\\"+i;continue}if(o==="'"){e+='"',n=null;continue}e+=o==='"'?'\\"':o;continue}if(o==='"'){n='"',e+=o;continue}if(o==="'"){n="'",e+='"';continue}e+=o}return e}function Jo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ei(t,e){let n=0,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){if(i==="\\"){o++;continue}i===r&&(r=null);continue}if(i==='"'||i==="'"){r=i;continue}if(i==="["||i==="{"||i==="("){n++;continue}if(i==="]"||i==="}"||i===")"){n--;continue}if(i===";"&&n===0)return o}return t.length}var E={CN:"Asia/Shanghai",HK:"Asia/Hong_Kong",US:"America/New_York"};function ti(t){if(!t)return null;let e=t.trim();if(!e)return null;let n=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?$/.exec(e);if(n)return{year:+n[1],month:+n[2],day:+n[3],hour:+n[4],minute:+n[5],second:n[6]?+n[6]:0};let r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return r?{year:+r[1],month:+r[2],day:+r[3],hour:0,minute:0,second:0}:/^\d{14}$/.test(e)?{year:+e.slice(0,4),month:+e.slice(4,6),day:+e.slice(6,8),hour:+e.slice(8,10),minute:+e.slice(10,12),second:+e.slice(12,14)}:/^\d{8}$/.test(e)?{year:+e.slice(0,4),month:+e.slice(4,6),day:+e.slice(6,8),hour:0,minute:0,second:0}:null}var ni={wallParts:{locale:"en-US",keyPrefix:"en-US|",options:{hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}},svDisplay:{locale:"sv-SE",keyPrefix:"sv-SE|",options:{hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}},dateOnly:{locale:"en-CA",keyPrefix:"en-CA|",options:{year:"numeric",month:"2-digit",day:"2-digit"}}},Fn=new Map;function Tt(t,e){let n=ni[t],r=n.keyPrefix+e,o=Fn.get(r);return o||(o=new Intl.DateTimeFormat(n.locale,{timeZone:e,...n.options}),Fn.set(r,o)),o}function me(t,e){let r=Tt("wallParts",e).formatToParts(new Date(t)),o={};for(let a of r)a.type!=="literal"&&(o[a.type]=a.value);let i=parseInt(_nullishCoalesce(o.hour, () => ("0")),10);return i===24&&(i=0),Date.UTC(parseInt(_nullishCoalesce(o.year, () => ("0")),10),parseInt(_nullishCoalesce(o.month, () => ("1")),10)-1,parseInt(_nullishCoalesce(o.day, () => ("1")),10),i,parseInt(_nullishCoalesce(o.minute, () => ("0")),10),parseInt(_nullishCoalesce(o.second, () => ("0")),10))}var xn=new Map;function Un(t,e){return me(t,e)-t}function ri(t,e){let n=`${t}|${e}`,r=xn.get(n);if(r===void 0){let o=Un(Date.UTC(e,0,1,12),t);for(let i=1;i<12;i++)if(Un(Date.UTC(e,i,1,12),t)!==o){o=null;break}r=o,xn.set(n,r)}return r}function wn(t,e){if(!(t.month===1&&t.day<=2||t.month===12&&t.day>=30)){let a=ri(e,t.year);if(a!==null)return Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second)-a}let r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second),o=2*r-me(r,e);if(me(o,e)===r)return o;let i=r-me(o,e)+o;return me(i,e)===r?i:o}function oi(t,e){let n=(t||"").trim(),r=_nullishCoalesce(/^(\d{4})-(\d{2})-(\d{2})$/.exec(n), () => (/^(\d{4})(\d{2})(\d{2})$/.exec(n)));if(!r)return null;let o=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec((e||"").trim());return o?{year:+r[1],month:+r[2],day:+r[3],hour:+o[1],minute:+o[2],second:o[3]?+o[3]:0}:null}function ae(t,e){let n=ti(t);return n?wn(n,e):NaN}function re(t){return Number.isNaN(t)?null:t}function k(t,e){return{timestamp:re(ae(t,e)),tz:e}}function ge(t,e){let[n,r,o]=t.split("-").map(Number);return new Date(Date.UTC(n,r-1,o+e)).toISOString().slice(0,10)}function ht(t,e,n){let r=oi(t,e);return r?{timestamp:re(wn(r,n)),tz:n}:{timestamp:null,tz:n}}function St(t,e){if(t==null||!Number.isFinite(t))return"";let n=Tt("svDisplay",e).format(new Date(t)),r=n.match(/^(\d{4}-\d{2}-\d{2})[ T](\d{2}):(\d{2})/);if(!r)return n;let o=r[2]==="24"?"00":r[2];return`${r[1]} ${o}:${r[3]}`}function Y(t,e=Date.now()){return Tt("dateOnly",t).format(new Date(e))}var Et="https://qt.gtimg.cn",Rt="https://web.ifzq.gtimg.cn/appstock/app/minute/query",_t="https://assets.linkdiary.cn/shares/zh_a_list.json",Ct="https://assets.linkdiary.cn/shares/us_list.json",At="https://assets.linkdiary.cn/shares/hk_list.json",ze="https://assets.linkdiary.cn/shares/fund_list",Ot="https://assets.linkdiary.cn/shares/trade-data-list.txt",$e="https://push2his.eastmoney.com/api/qt/stock/kline/get",Pt="https://push2his.eastmoney.com/api/qt/stock/trends2/get",Qe="https://33.push2his.eastmoney.com/api/qt/stock/kline/get",je="https://63.push2his.eastmoney.com/api/qt/stock/kline/get",Dt="https://33.push2his.eastmoney.com/api/qt/stock/trends2/get",It="https://63.push2his.eastmoney.com/api/qt/stock/trends2/get",bt="https://17.push2.eastmoney.com/api/qt/clist/get",Mt="https://91.push2.eastmoney.com/api/qt/stock/get",Nt="https://29.push2.eastmoney.com/api/qt/clist/get",kt="https://7.push2his.eastmoney.com/api/qt/stock/kline/get",Lt="https://push2his.eastmoney.com/api/qt/stock/trends2/get",Ft="https://79.push2.eastmoney.com/api/qt/clist/get",xt="https://91.push2.eastmoney.com/api/qt/stock/get",Ut="https://29.push2.eastmoney.com/api/qt/clist/get",wt="https://91.push2his.eastmoney.com/api/qt/stock/kline/get",vt="https://push2his.eastmoney.com/api/qt/stock/trends2/get",Kt="https://datacenter-web.eastmoney.com/api/data/v1/get",fe="https://push2his.eastmoney.com/api/qt/stock/fflow/daykline/get",Bt="https://push2.eastmoney.com/api/qt/clist/get",Ht="https://push2.eastmoney.com/api/qt/kamtbs.rtmin/get",ye="https://push2ex.eastmoney.com",L="7eea3edcaed734bea9cbfc24409ed989",$="b2884a393a59ad64002292a3e90d46a5",Te="https://push2his.eastmoney.com/api/qt/stock/kline/get",qt="https://futsseapi.eastmoney.com/list/COMEX,NYMEX,COBOT,SGX,NYBOT,LME,MDEX,TOCOM,IPE",he="58b2fa8f54638b60b87d69b31969089c",zt={SHFE:113,DCE:114,CZCE:115,INE:142,CFFEX:220,GFEX:225},ue={cu:"SHFE",al:"SHFE",zn:"SHFE",pb:"SHFE",au:"SHFE",ag:"SHFE",rb:"SHFE",wr:"SHFE",fu:"SHFE",ru:"SHFE",bu:"SHFE",hc:"SHFE",ni:"SHFE",sn:"SHFE",sp:"SHFE",ss:"SHFE",ao:"SHFE",br:"SHFE",c:"DCE",a:"DCE",b:"DCE",m:"DCE",y:"DCE",p:"DCE",l:"DCE",v:"DCE",j:"DCE",jm:"DCE",i:"DCE",jd:"DCE",pp:"DCE",cs:"DCE",eg:"DCE",eb:"DCE",pg:"DCE",lh:"DCE",WH:"CZCE",CF:"CZCE",SR:"CZCE",TA:"CZCE",OI:"CZCE",MA:"CZCE",FG:"CZCE",RM:"CZCE",SF:"CZCE",SM:"CZCE",ZC:"CZCE",AP:"CZCE",CJ:"CZCE",UR:"CZCE",SA:"CZCE",PF:"CZCE",PK:"CZCE",PX:"CZCE",SH:"CZCE",sc:"INE",nr:"INE",lu:"INE",bc:"INE",ec:"INE",IF:"CFFEX",IC:"CFFEX",IH:"CFFEX",IM:"CFFEX",TS:"CFFEX",TF:"CFFEX",T:"CFFEX",TL:"CFFEX",si:"GFEX",lc:"GFEX",ps:"GFEX",pt:"GFEX",pd:"GFEX"},Ge={HG:101,GC:101,SI:101,QI:101,QO:101,MGC:101,CL:102,NG:102,RB:102,HO:102,PA:102,PL:102,ZW:103,ZM:103,ZS:103,ZC:103,ZL:103,ZR:103,YM:103,NQ:103,ES:103,SB:108,CT:108,LCPT:109,LZNT:109,LALT:109},Se="https://stock.finance.sina.com.cn/futures/api/openapi.php/OptionService.getOptionData",Ee="https://stock.finance.sina.com.cn/futures/api/jsonp.php/{callback}/FutureOptionAllService.getOptionDayline",$t="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionService.getStockName",Ye="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionService.getRemainderDay",Qt="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionDaylineService.getOptionMinline",jt="https://stock.finance.sina.com.cn/futures/api/jsonp_v2.php/{callback}/StockOptionDaylineService.getSymbolInfo",Gt="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionDaylineService.getFiveDayLine",Yt="https://futsseapi.eastmoney.com/list/option/221",Wt="https://datacenter-web.eastmoney.com/api/data/get";var We={au:{product:"au_o",exchange:"shfe"},ag:{product:"ag_o",exchange:"shfe"},cu:{product:"cu_o",exchange:"shfe"},al:{product:"al_o",exchange:"shfe"},zn:{product:"zn_o",exchange:"shfe"},ru:{product:"ru_o",exchange:"shfe"},sc:{product:"sc_o",exchange:"ine"},m:{product:"m_o",exchange:"dce"},c:{product:"c_o",exchange:"dce"},i:{product:"i_o",exchange:"dce"},p:{product:"p_o",exchange:"dce"},pp:{product:"pp_o",exchange:"dce"},l:{product:"l_o",exchange:"dce"},v:{product:"v_o",exchange:"dce"},pg:{product:"pg_o",exchange:"dce"},y:{product:"y_o",exchange:"dce"},a:{product:"a_o",exchange:"dce"},b:{product:"b_o",exchange:"dce"},eg:{product:"eg_o",exchange:"dce"},eb:{product:"eb_o",exchange:"dce"},SR:{product:"SR_o",exchange:"czce"},CF:{product:"CF_o",exchange:"czce"},TA:{product:"TA_o",exchange:"czce"},MA:{product:"MA_o",exchange:"czce"},RM:{product:"RM_o",exchange:"czce"},OI:{product:"OI_o",exchange:"czce"},PK:{product:"PK_o",exchange:"czce"},PF:{product:"PF_o",exchange:"czce"},SA:{product:"SA_o",exchange:"czce"},UR:{product:"UR_o",exchange:"czce"}},Vt=3e4,Re=500,_e=500,Ce=7,Xt=3,Zt=1e3,Jt=3e4,en=2,tn=[408,429,500,502,503,504];var Ve=class{constructor(e={}){this.acquireChain=Promise.resolve();let n=_nullishCoalesce(e.requestsPerSecond, () => (5));this.maxTokens=_nullishCoalesce(e.maxBurst, () => (n)),this.tokens=this.maxTokens,this.refillRate=n/1e3,this.lastRefillTime=Date.now()}refill(){let e=Date.now(),r=(e-this.lastRefillTime)*this.refillRate;this.tokens=Math.min(this.maxTokens,this.tokens+r),this.lastRefillTime=e}tryAcquire(){return this.refill(),this.tokens>=1?(this.tokens-=1,!0):!1}getWaitTime(){if(this.refill(),this.tokens>=1)return 0;let e=1-this.tokens;return Math.ceil(e/this.refillRate)}async acquire(){let e=this.acquireChain,n;this.acquireChain=new Promise(r=>{n=r});try{await e;let r=this.getWaitTime();r>0&&await this.sleep(r),this.refill(),this.tokens-=1}finally{n()}}sleep(e){return new Promise(n=>setTimeout(n,e))}getAvailableTokens(){return this.refill(),this.tokens}};var vn=["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"],nn=0;function ii(){return typeof window<"u"&&typeof window.document<"u"}function Kn(){if(ii())return;let t=vn[nn];return nn=(nn+1)%vn.length,t}var le=class extends _chunk4Q7UQ5Q3cjs.a{constructor(e="Circuit breaker is OPEN"){super({code:"CIRCUIT_OPEN",message:e}),this.name="CircuitBreakerError"}},Xe=class{constructor(e={}){this.state="CLOSED";this.failureCount=0;this.lastFailureTime=0;this.halfOpenSuccessCount=0;this.halfOpenProbeStartedAt=[];this.failureThreshold=_nullishCoalesce(e.failureThreshold, () => (5)),this.resetTimeout=_nullishCoalesce(e.resetTimeout, () => (3e4)),this.halfOpenRequests=_nullishCoalesce(e.halfOpenRequests, () => (1)),this.probeRecycleTimeout=_nullishCoalesce(e.probeRecycleTimeout, () => (Math.max(this.resetTimeout*4,12e4))),this.onStateChange=e.onStateChange}getState(){return this.checkStateTransition(),this.state}canRequest(){switch(this.checkStateTransition(),this.state){case"CLOSED":return!0;case"OPEN":return!1;case"HALF_OPEN":{let e=Date.now();for(;this.halfOpenProbeStartedAt.length>0&&e-this.halfOpenProbeStartedAt[0]>=this.probeRecycleTimeout;)this.halfOpenProbeStartedAt.shift();return this.halfOpenProbeStartedAt.length+this.halfOpenSuccessCount>=this.halfOpenRequests?!1:(this.halfOpenProbeStartedAt.push(e),!0)}}}releaseProbe(){this.state==="HALF_OPEN"&&this.halfOpenProbeStartedAt.shift()}recordSuccess(){this.checkStateTransition(),this.state==="HALF_OPEN"?(this.halfOpenProbeStartedAt.shift(),this.halfOpenSuccessCount++,this.halfOpenSuccessCount>=this.halfOpenRequests&&this.transitionTo("CLOSED")):this.state==="CLOSED"&&(this.failureCount=0)}recordFailure(){this.lastFailureTime=Date.now(),this.state==="HALF_OPEN"?(this.halfOpenProbeStartedAt.shift(),this.transitionTo("OPEN")):this.state==="CLOSED"&&(this.failureCount++,this.failureCount>=this.failureThreshold&&this.transitionTo("OPEN"))}checkStateTransition(){this.state==="OPEN"&&Date.now()-this.lastFailureTime>=this.resetTimeout&&this.transitionTo("HALF_OPEN")}transitionTo(e){if(this.state===e)return;let n=this.state;this.state=e,e==="CLOSED"?(this.failureCount=0,this.halfOpenSuccessCount=0,this.halfOpenProbeStartedAt=[]):e==="HALF_OPEN"&&(this.halfOpenSuccessCount=0,this.halfOpenProbeStartedAt=[]),_optionalChain([this, 'access', _2 => _2.onStateChange, 'optionalCall', _3 => _3(n,e)])}reset(){this.transitionTo("CLOSED"),this.failureCount=0,this.halfOpenSuccessCount=0,this.halfOpenProbeStartedAt=[],this.lastFailureTime=0}async execute(e){if(!this.canRequest())throw new le;try{let n=await e();return this.recordSuccess(),n}catch(n){throw this.recordFailure(),n}}getStats(){return{state:this.getState(),failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,halfOpenSuccessCount:this.halfOpenSuccessCount}}};var si=3e4,ai=1,Bn=["push2his.eastmoney.com","7.push2his.eastmoney.com","33.push2his.eastmoney.com","63.push2his.eastmoney.com","91.push2his.eastmoney.com"],Hn=["17.push2.eastmoney.com","29.push2.eastmoney.com","79.push2.eastmoney.com","91.push2.eastmoney.com"];function ui(t,e){return e!=="eastmoney"?[t]:t.includes("push2his.eastmoney.com")?Bn:t.includes("push2.eastmoney.com")?Hn:[t]}function li(t){return Array.from(new Set(t))}var Ze=class{constructor(e=si,n=ai){this.cooldownMs=e;this.failureThreshold=n;this.states=new Map}getCandidateUrls(e,n){let r;try{r=new URL(e)}catch (e5){return[e]}let o=Date.now(),i=ui(r.hostname,n);if(i.length<=1)return[e];let a=i.filter(c=>{let d=this.states.get(c);return!d||d.cooldownUntil<=o}),u=i.filter(c=>{let d=this.states.get(c);return d&&d.cooldownUntil>o});return li([...a.includes(r.hostname)?[r.hostname]:[],...a.filter(c=>c!==r.hostname),...u.includes(r.hostname)?[r.hostname]:[],...u.filter(c=>c!==r.hostname)]).map(c=>{let d=new URL(e);return d.hostname=c,d.toString()})}recordSuccess(e){let n=this.safeGetHost(e);if(!n)return;let r=this.getState(n);r.failureCount=0,r.cooldownUntil=0,r.successCount++,r.lastErrorCode=void 0}recordFailure(e,n){let r=this.safeGetHost(e);if(!r)return;let o=this.getState(r);o.failureCount++,o.lastFailureAt=Date.now(),o.lastErrorCode=_chunk4Q7UQ5Q3cjs.k.call(void 0, n),o.failureCount>=this.failureThreshold&&(o.cooldownUntil=Date.now()+this.cooldownMs)}shouldFallback(e){let n=_chunk4Q7UQ5Q3cjs.k.call(void 0, e);return n==="NETWORK_ERROR"||n==="TIMEOUT"||n==="PARSE_ERROR"?!0:e instanceof _chunk4Q7UQ5Q3cjs.b?e.status===408||e.status===429||e.status>=500:!1}getStats(e){let n=Array.from(this.states.values()).map(o=>({...o}));if(!e)return n;if(e!=="eastmoney")return[];let r=new Set([...Bn,...Hn]);return n.filter(o=>r.has(o.host))}safeGetHost(e){try{return new URL(e).hostname}catch (e6){return null}}getState(e){let n=this.states.get(e);if(n)return n;let r={host:e,failureCount:0,successCount:0,cooldownUntil:0,lastFailureAt:0};return this.states.set(e,r),r}};function ci(t){return{maxRetries:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _4 => _4.maxRetries]), () => (Xt)),baseDelay:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _5 => _5.baseDelay]), () => (Zt)),maxDelay:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _6 => _6.maxDelay]), () => (Jt)),backoffMultiplier:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _7 => _7.backoffMultiplier]), () => (en)),retryableStatusCodes:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _8 => _8.retryableStatusCodes]), () => (tn)),retryOnNetworkError:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _9 => _9.retryOnNetworkError]), () => (!0)),retryOnTimeout:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _10 => _10.retryOnTimeout]), () => (!0)),onRetry:_optionalChain([t, 'optionalAccess', _11 => _11.onRetry])}}function di(t,e){let n={..._nullishCoalesce(t, () => ({}))};return e&&(Object.keys(n).some(o=>o.toLowerCase()==="user-agent")||(n["User-Agent"]=e)),n}function qn(t,e){return e?{timeout:_nullishCoalesce(e.timeout, () => (t.timeout)),retry:e.retry?{..._nullishCoalesce(t.retry, () => ({})),...e.retry}:t.retry?{...t.retry}:void 0,headers:{..._nullishCoalesce(t.headers, () => ({})),..._nullishCoalesce(e.headers, () => ({}))},userAgent:_nullishCoalesce(e.userAgent, () => (t.userAgent)),rateLimit:e.rateLimit?{..._nullishCoalesce(t.rateLimit, () => ({})),...e.rateLimit}:t.rateLimit?{...t.rateLimit}:void 0,rotateUserAgent:_nullishCoalesce(e.rotateUserAgent, () => (t.rotateUserAgent)),circuitBreaker:e.circuitBreaker?{..._nullishCoalesce(t.circuitBreaker, () => ({})),...e.circuitBreaker}:t.circuitBreaker?{...t.circuitBreaker}:void 0}:{...t,headers:{..._nullishCoalesce(t.headers, () => ({}))},retry:t.retry?{...t.retry}:void 0,rateLimit:t.rateLimit?{...t.rateLimit}:void 0,circuitBreaker:t.circuitBreaker?{...t.circuitBreaker}:void 0}}function rn(t={}){return{timeout:_nullishCoalesce(t.timeout, () => (Vt)),retry:ci(t.retry),headers:di(t.headers,t.userAgent),rotateUserAgent:_nullishCoalesce(t.rotateUserAgent, () => (!1)),rateLimit:t.rateLimit?{...t.rateLimit}:void 0,circuitBreaker:t.circuitBreaker?{...t.circuitBreaker}:void 0}}function zn(t,e){if(e)return e;try{let n=new URL(t).hostname;if(n.includes("eastmoney.com"))return"eastmoney";if(n.includes("gtimg.cn"))return"tencent";if(n.includes("sina.com.cn"))return"sina";if(n.includes("linkdiary.cn"))return"linkdiary"}catch (e7){return"unknown"}return"unknown"}function $n(t){if(t instanceof DOMException&&t.name==="AbortError")return!0;if(t instanceof Error){if(t.name==="AbortError")return!0;let e=t.cause;if((e instanceof Error||e instanceof DOMException)&&e.name==="AbortError")return!0}return!1}var on=()=>{};function pi(t){let e=t.filter(u=>!!u);if(e.length===0)return{signal:void 0,cleanup:on};if(e.length===1)return{signal:e[0],cleanup:on};let n=AbortSignal.any;if(typeof n=="function")return{signal:n(e),cleanup:on};let r=new AbortController,o=u=>{r.signal.aborted||r.abort(u)},i=[];for(let u of e){if(u.aborted){o(u.reason);break}let l=()=>o(u.reason);u.addEventListener("abort",l,{once:!0}),i.push({s:u,handler:l})}let a=()=>{for(let{s:u,handler:l}of i)u.removeEventListener("abort",l)};return{signal:r.signal,cleanup:a}}async function mi(t,e){if(!t)return e;if(Promise.resolve(e).catch(()=>{}),t.aborted)return Promise.race([e,Promise.reject(t.reason)]);let n,r=new Promise((o,i)=>{n=()=>i(t.reason),t.addEventListener("abort",n,{once:!0})});try{return await Promise.race([e,r])}finally{t.removeEventListener("abort",n)}}var Ae=class{constructor(e={}){this.baseUrl=_nullishCoalesce(e.baseUrl, () => (Et));let n={timeout:e.timeout,retry:e.retry,headers:e.headers,userAgent:e.userAgent,rateLimit:e.rateLimit,rotateUserAgent:e.rotateUserAgent,circuitBreaker:e.circuitBreaker};this.defaultPolicy=rn(n),this.providerPolicies={},this.runtimeStates=new Map,this.fallbackManager=new Ze,this.fetchImpl=e.fetchImpl,this.clientSignal=e.signal,this.hooks=e.hooks;for(let[r,o]of Object.entries(_nullishCoalesce(e.providerPolicies, () => ({})))){let i=qn(n,o);this.providerPolicies[r]=rn(i)}}getProviderState(e){let n=this.runtimeStates.get(e);if(n)return n;let r=_nullishCoalesce(this.providerPolicies[e], () => (this.defaultPolicy)),o={policy:r,rateLimiter:r.rateLimit?new Ve(r.rateLimit):null,circuitBreaker:r.circuitBreaker?new Xe(r.circuitBreaker):null};return this.runtimeStates.set(e,o),o}getTimeout(){return this.defaultPolicy.timeout}getHostHealth(e){return this.fallbackManager.getStats(e)}safe(e){try{e()}catch (e8){}}toSdkError(e){return e instanceof _chunk4Q7UQ5Q3cjs.a?e:new (0, _chunk4Q7UQ5Q3cjs.a)({code:_nullishCoalesce(_chunk4Q7UQ5Q3cjs.k.call(void 0, e), () => ("NETWORK_ERROR")),message:e.message,provider:e.provider,url:e.url,status:e.status,details:e.details,cause:e})}calculateDelay(e,n){return Math.min(n.baseDelay*Math.pow(n.backoffMultiplier,e),n.maxDelay)+Math.random()*100}sleep(e){return new Promise(n=>setTimeout(n,e))}shouldRetry(e,n,r){if(n>=r.maxRetries)return!1;let o=_chunk4Q7UQ5Q3cjs.k.call(void 0, e);return o==="ABORTED"?!1:o==="TIMEOUT"?r.retryOnTimeout:o==="NETWORK_ERROR"?r.retryOnNetworkError:e instanceof _chunk4Q7UQ5Q3cjs.b?r.retryableStatusCodes.includes(e.status):!1}async executeWithRetry(e,n,r,o=0){try{return await e(o)}catch(i){let a=_chunk4Q7UQ5Q3cjs.l.call(void 0, i,r),u={provider:r.provider,url:r.url,timeout:r.timeout,attempt:o,responseType:r.responseType};if(this.safe(()=>_optionalChain([this, 'access', _12 => _12.hooks, 'optionalAccess', _13 => _13.onError, 'optionalCall', _14 => _14(u,this.toSdkError(a))])),this.safe(()=>_optionalChain([this, 'access', _15 => _15.hooks, 'optionalAccess', _16 => _16.trace, 'optionalCall', _17 => _17("error",u)])),this.shouldRetry(a,o,n)){let l=this.calculateDelay(o,n);return n.onRetry&&n.onRetry(o+1,a,l),this.safe(()=>_optionalChain([this, 'access', _18 => _18.hooks, 'optionalAccess', _19 => _19.onRetry, 'optionalCall', _20 => _20(u,this.toSdkError(a),l)])),this.safe(()=>_optionalChain([this, 'access', _21 => _21.hooks, 'optionalAccess', _22 => _22.trace, 'optionalCall', _23 => _23("retry",u)])),await this.sleep(l),this.executeWithRetry(e,n,r,o+1)}throw a}}async performRequest(e,n,r,o="text",i={},a=0){n.rateLimiter&&await n.rateLimiter.acquire();let u=new AbortController,l=new DOMException(`Request timed out after ${n.policy.timeout}ms`,"AbortError"),c=setTimeout(()=>u.abort(l),n.policy.timeout),{signal:d,cleanup:y}=pi([u.signal,i.signal,this.clientSignal]),p=_nullishCoalesce(_nullishCoalesce(i.fetchImpl, () => (this.fetchImpl)), () => (globalThis.fetch)),T={...n.policy.headers};if(n.policy.rotateUserAgent){let S=Kn();if(S){for(let O of Object.keys(T))O.toLowerCase()==="user-agent"&&delete T[O];T["User-Agent"]=S}}let R={provider:r,url:e,timeout:n.policy.timeout,attempt:a,responseType:o};this.safe(()=>_optionalChain([this, 'access', _24 => _24.hooks, 'optionalAccess', _25 => _25.onRequest, 'optionalCall', _26 => _26(R)])),this.safe(()=>_optionalChain([this, 'access', _27 => _27.hooks, 'optionalAccess', _28 => _28.trace, 'optionalCall', _29 => _29("request",R)]));let P=Date.now();try{let S=await mi(d,p(e,{signal:d,headers:T}));if(this.safe(()=>_optionalChain([this, 'access', _30 => _30.hooks, 'optionalAccess', _31 => _31.onResponse, 'optionalCall', _32 => _32(R,{status:S.status,durationMs:Date.now()-P})])),this.safe(()=>_optionalChain([this, 'access', _33 => _33.hooks, 'optionalAccess', _34 => _34.trace, 'optionalCall', _35 => _35("response",R)])),!S.ok)throw new (0, _chunk4Q7UQ5Q3cjs.b)(S.status,S.statusText,e,r);switch(o){case"json":try{return await S.json()}catch(O){throw new (0, _chunk4Q7UQ5Q3cjs.a)({code:"PARSE_ERROR",message:`Failed to parse JSON response from ${e}`,provider:r,url:e,cause:O})}case"arraybuffer":return await S.arrayBuffer();default:return await S.text()}}catch(S){let O=N=>_optionalChain([N, 'optionalAccess', _36 => _36.aborted])?S===N.reason?!0:S instanceof Error&&S.cause===N.reason:!1;if(!O(u.signal)){let N=_optionalChain([i, 'access', _37 => _37.signal, 'optionalAccess', _38 => _38.aborted])||_optionalChain([this, 'access', _39 => _39.clientSignal, 'optionalAccess', _40 => _40.aborted]);if(O(i.signal)||O(this.clientSignal)||N&&$n(S))throw new (0, _chunk4Q7UQ5Q3cjs.h)("Request aborted by external signal",r,e);if(u.signal.aborted&&$n(S))throw l}throw S}finally{clearTimeout(c),y()}}async get(e,n={}){let r=zn(e,n.provider),o=this.getProviderState(r);if(o.circuitBreaker&&!o.circuitBreaker.canRequest())throw new le("Circuit breaker is OPEN, request rejected");let i={fetchImpl:n.fetchImpl,signal:n.signal},a=this.fallbackManager.getCandidateUrls(e,r),u;for(let l=0;l<a.length;l++){let c=a[l],d=l===0?o.policy.retry:{...o.policy.retry,maxRetries:0};try{let y=await this.executeWithRetry(p=>this.performRequest(c,o,r,n.responseType,i,p),d,{provider:r,url:c,timeout:o.policy.timeout,responseType:n.responseType});return _optionalChain([o, 'access', _41 => _41.circuitBreaker, 'optionalAccess', _42 => _42.recordSuccess, 'call', _43 => _43()]),this.fallbackManager.recordSuccess(c),y}catch(y){let p=_chunk4Q7UQ5Q3cjs.l.call(void 0, y,{provider:r,url:c,timeout:o.policy.timeout});u=p;let T=_chunk4Q7UQ5Q3cjs.k.call(void 0, p)==="ABORTED";if(T?_optionalChain([o, 'access', _44 => _44.circuitBreaker, 'optionalAccess', _45 => _45.releaseProbe, 'call', _46 => _46()]):this.fallbackManager.recordFailure(c,p),l<a.length-1&&this.fallbackManager.shouldFallback(p)){this.safe(()=>_optionalChain([this, 'access', _47 => _47.hooks, 'optionalAccess', _48 => _48.trace, 'optionalCall', _49 => _49("fallback",{provider:r,url:c,timeout:o.policy.timeout,attempt:0,responseType:n.responseType})]));continue}throw T||_optionalChain([o, 'access', _50 => _50.circuitBreaker, 'optionalAccess', _51 => _51.recordFailure, 'call', _52 => _52()]),this.toSdkError(p)}}throw _optionalChain([o, 'access', _53 => _53.circuitBreaker, 'optionalAccess', _54 => _54.recordFailure, 'call', _55 => _55()]),u?this.toSdkError(u):new le("Request failed without a concrete error")}async getTencentQuote(e){let n=`${this.baseUrl}/?q=${encodeURIComponent(e)}`,r=await this.get(n,{responseType:"arraybuffer",provider:"tencent"}),o=pt(r);return mt(o)}};var U=(t,e)=>t*60+e,gi={A:{tz:E.CN,open:[[U(9,30),U(11,30)],[U(13,0),U(15,0)]],lunchBreak:[U(11,30),U(13,0)],tradingWeekdays:[1,2,3,4,5]},HK:{tz:E.HK,open:[[U(9,30),U(12,0)],[U(13,0),U(16,0)]],lunchBreak:[U(12,0),U(13,0)],tradingWeekdays:[1,2,3,4,5]},US:{tz:E.US,open:[[U(9,30),U(16,0)]],tradingWeekdays:[1,2,3,4,5]}};function sn(t,e){if(t==null)return Y(e);if(t instanceof Date)return Y(e,t.getTime());let n=t.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(n))return n;if(/^\d{8}$/.test(n))return`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}`;let r=new Date(n);if(!Number.isNaN(r.getTime()))return Y(e,r.getTime());throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unsupported date input: ${JSON.stringify(t)}. Expected 'YYYY-MM-DD', 'YYYYMMDD', or Date.`)}function fi(t,e){let n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:"2-digit",minute:"2-digit"}),r={};for(let l of n.formatToParts(t))l.type!=="literal"&&(r[l.type]=l.value);let o=parseInt(_nullishCoalesce(r.hour, () => ("0")),10);o===24&&(o=0);let i=parseInt(_nullishCoalesce(r.minute, () => ("0")),10),u=_nullishCoalesce({Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6,Sun:7}[_nullishCoalesce(r.weekday, () => (""))], () => (0));return{minutes:o*60+i,weekday:u}}function an(t,e){let n=0,r=t.length;for(;n<r;){let o=n+r>>>1;t[o]<e?n=o+1:r=o}return n}var Oe=class{constructor(e){this.quoteService=e}async isTradingDay(e){let n=sn(e,E.CN),r=await this.quoteService.getTradingCalendar(),o=an(r,n);return o<r.length&&r[o]===n}async nextTradingDay(e){let n=sn(e,E.CN),r=await this.quoteService.getTradingCalendar(),o=an(r,n);if(o<r.length&&r[o]===n&&(o+=1),o>=r.length)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`nextTradingDay: ${n} \u4E4B\u540E\u6CA1\u6709\u53EF\u7528\u4EA4\u6613\u65E5 (\u65E5\u5386\u6700\u5927\u65E5\u671F ${_nullishCoalesce(r[r.length-1], () => ("N/A"))})`);return r[o]}async prevTradingDay(e){let n=sn(e,E.CN),r=await this.quoteService.getTradingCalendar(),i=an(r,n)-1;if(i<0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`prevTradingDay: ${n} \u4E4B\u524D\u6CA1\u6709\u53EF\u7528\u4EA4\u6613\u65E5 (\u65E5\u5386\u6700\u5C0F\u65E5\u671F ${_nullishCoalesce(r[0], () => ("N/A"))})`);return r[i]}getMarketStatus(e="A",n=new Date){let r=gi[e],{minutes:o,weekday:i}=fi(n,r.tz);if(!r.tradingWeekdays.includes(i))return"closed";let a=r.open[0][0],u=r.open[r.open.length-1][1];if(o<a)return"pre_market";if(o>=u)return"after_hours";for(let[l,c]of r.open)if(o>=l&&o<c)return"open";return r.lunchBreak&&o>=r.lunchBreak[0]&&o<r.lunchBreak[1]?"lunch_break":"closed"}};var I={};_chunk4VDLQK6Fcjs.a.call(void 0, I,{getAShareCodeList:()=>Xn,getAllHKQuotesByCodes:()=>tr,getAllQuotesByCodes:()=>er,getAllUSQuotesByCodes:()=>nr,getFullQuotes:()=>Je,getFundCodeList:()=>rr,getFundFlow:()=>jn,getFundQuotes:()=>Yn,getHKCodeList:()=>Jn,getHKQuotes:()=>et,getPanelLargeOrder:()=>Gn,getSimpleQuotes:()=>Qn,getTodayTimeline:()=>Wn,getTradingCalendar:()=>or,getUSCodeList:()=>Zn,getUSQuotes:()=>tt,parseFullQuote:()=>un,parseFundFlow:()=>cn,parseFundQuote:()=>gn,parseHKQuote:()=>pn,parsePanelLargeOrder:()=>dn,parseSimpleQuote:()=>ln,parseUSQuote:()=>mn,search:()=>sr});function un(t){let e=[];for(let i=0;i<5;i++)e.push({price:f(t[9+i*2]),volume:f(t[10+i*2])});let n=[];for(let i=0;i<5;i++)n.push({price:f(t[19+i*2]),volume:f(t[20+i*2])});let r=_nullishCoalesce(t[30], () => ("")),o=k(r,E.CN);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:f(t[3]),prevClose:f(t[4]),open:f(t[5]),volume:f(t[6]),outerVolume:f(t[7]),innerVolume:f(t[8]),bid:e,ask:n,time:r,timestamp:o.timestamp,tz:o.tz,change:f(t[31]),changePercent:f(t[32]),high:f(t[33]),low:f(t[34]),volume2:f(t[36]),amount:f(t[37]),turnoverRate:_(t[38]),pe:_(t[39]),amplitude:_(t[43]),circulatingMarketCap:_(t[44]),totalMarketCap:_(t[45]),pb:_(t[46]),limitUp:_(t[47]),limitDown:_(t[48]),volumeRatio:_(t[49]),avgPrice:_(t[51]),peStatic:_(t[52]),peDynamic:_(t[53]),high52w:_(t[67]),low52w:_(t[68]),circulatingShares:_(t[72]),totalShares:_(t[73]),market:"CN",assetType:"stock",source:"tencent"}}function ln(t){return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:f(t[3]),change:f(t[4]),changePercent:f(t[5]),volume:f(t[6]),amount:f(t[7]),marketCap:_(t[9]),marketType:_nullishCoalesce(t[10], () => ("")),market:"CN",assetType:"stock",source:"tencent"}}function cn(t){let e=_nullishCoalesce(t[13], () => ("")),n=k(e,E.CN);return{code:_nullishCoalesce(t[0], () => ("")),mainInflow:f(t[1]),mainOutflow:f(t[2]),mainNet:f(t[3]),mainNetRatio:f(t[4]),retailInflow:f(t[5]),retailOutflow:f(t[6]),retailNet:f(t[7]),retailNetRatio:f(t[8]),totalFlow:f(t[9]),name:_nullishCoalesce(t[12], () => ("")),date:e,timestamp:n.timestamp,tz:n.tz}}function dn(t){return{buyLargeRatio:f(t[0]),buySmallRatio:f(t[1]),sellLargeRatio:f(t[2]),sellSmallRatio:f(t[3])}}function pn(t){let e=_nullishCoalesce(t[30], () => ("")),n=k(e,E.HK);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:f(t[3]),prevClose:f(t[4]),open:f(t[5]),volume:f(t[6]),time:e,timestamp:n.timestamp,tz:n.tz,change:f(t[31]),changePercent:f(t[32]),high:f(t[33]),low:f(t[34]),amount:f(t[37]),lotSize:_(t[40]),circulatingMarketCap:_(t[44]),totalMarketCap:_(t[45]),currency:_nullishCoalesce(t[t.length-3], () => ("")),market:"HK",assetType:"stock",source:"tencent"}}function mn(t){let e=_nullishCoalesce(t[30], () => ("")),n=k(e,E.US);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:f(t[3]),prevClose:f(t[4]),open:f(t[5]),volume:f(t[6]),time:e,timestamp:n.timestamp,tz:n.tz,change:f(t[31]),changePercent:f(t[32]),high:f(t[33]),low:f(t[34]),amount:f(t[37]),turnoverRate:_(t[38]),pe:_(t[39]),amplitude:_(t[43]),totalMarketCap:_(t[45]),pb:_(t[47]),high52w:_(t[48]),low52w:_(t[49]),market:"US",assetType:"stock",source:"tencent"}}function gn(t){let e=_nullishCoalesce(t[8], () => ("")),n=k(e,E.CN);return{code:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),nav:f(t[5]),accNav:f(t[6]),change:f(t[7]),navDate:e,timestamp:n.timestamp,tz:n.tz,market:"CN",assetType:"fund",source:"tencent"}}async function Je(t,e){if(!e||e.length===0)return[];let n=await t.getTencentQuote(e.join(",")),r=new Set(e);return n.filter(o=>r.has(o.key)&&o.fields&&o.fields.length>5&&o.fields[0]!=="").map(o=>un(o.fields))}async function Qn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`s_${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>ln(i.fields))}async function jn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`ff_${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=14&&i.fields[0]!=="").map(i=>cn(i.fields))}async function Gn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`s_pk${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=4&&i.fields[0]!=="").map(i=>dn(i.fields))}async function et(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`hk${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>pn(i.fields))}async function tt(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`us${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>mn(i.fields))}async function Yn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`jj${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=9&&i.fields[0]!=="").map(i=>gn(i.fields))}async function Wn(t,e){let n=`${Rt}?code=${encodeURIComponent(e)}`,r=await t.get(n,{responseType:"json",provider:"tencent"});if(r.code!==0)throw new (0, _chunk4Q7UQ5Q3cjs.g)(r.msg||"API error","tencent",n);let o=_optionalChain([r, 'access', _56 => _56.data, 'optionalAccess', _57 => _57[e]]);if(!o){let p=k("",E.CN);return{code:e,date:"",timestamp:p.timestamp,tz:p.tz,preClose:0,data:[]}}let i=_nullishCoalesce(_optionalChain([o, 'access', _58 => _58.data, 'optionalAccess', _59 => _59.data]), () => ([])),a=_nullishCoalesce(_optionalChain([o, 'access', _60 => _60.data, 'optionalAccess', _61 => _61.date]), () => ("")),u=_nullishCoalesce(_optionalChain([o, 'access', _62 => _62.qt, 'optionalAccess', _63 => _63[e]]), () => ([])),l=parseFloat(_nullishCoalesce(u[4], () => ("")))||0,c=!1;for(let p of i){let T=p.split(" "),R=parseFloat(T[1])||0,P=parseInt(T[2],10)||0,S=parseFloat(T[3])||0;if(P>0&&R>0){S/P>R*50&&(c=!0);break}}let d=i.map(p=>{let T=p.split(" "),R=T[0],P=`${R.slice(0,2)}:${R.slice(2,4)}`,S=parseInt(T[2],10)||0,O=parseFloat(T[3])||0,N=c?S*100:S,H=N>0?O/N:0,w=ht(a,P,E.CN);return{time:P,timestamp:w.timestamp,tz:w.tz,price:parseFloat(T[1])||0,volume:N,amount:O,avgPrice:Math.round(H*100)/100}}),y=k(a,E.CN);return{code:e,date:a,timestamp:y.timestamp,tz:y.tz,preClose:l,data:d}}var Vn=_chunkTVIEKKDQcjs.b.call(void 0, "tencent:code-lists",{defaultTTL:360*60*1e3,maxSize:16});async function fn(t,e,n){return Vn.getOrFetch(e,async()=>{let r=await t.get(n,{responseType:"json"}),o=_optionalChain([r, 'optionalAccess', _64 => _64.list]);if(_optionalChain([r, 'optionalAccess', _65 => _65.success])===!1||!Array.isArray(o)||o.length===0)throw new (0, _chunk4Q7UQ5Q3cjs.c)(`\u4EE3\u7801\u5217\u8868\u63A5\u53E3\u8FD4\u56DE\u7A7A\u6570\u636E: ${e}`,"tencent",n);return o})}function yi(t,e){let n=t.replace(/^(sh|sz|bj)/,"");switch(e){case"sh":return n.startsWith("6");case"sz":return n.startsWith("0")||n.startsWith("3");case"bj":return n.startsWith("4")||n.startsWith("8")||n.startsWith("92");case"kc":return n.startsWith("688");case"cy":return n.startsWith("30");default:return!0}}async function Xn(t,e){let n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _66 => _66.simple]), () => (!1)),r=_optionalChain([e, 'optionalAccess', _67 => _67.market]),i=await fn(t,"a-share:full",_t);return r&&(i=i.filter(a=>yi(a,r))),n?i.map(a=>a.replace(/^(sh|sz|bj)/,"")):i.slice()}async function Zn(t,e){let n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _68 => _68.simple]), () => (!1)),r=_optionalChain([e, 'optionalAccess', _69 => _69.market]),i=(await fn(t,"us:full",Ct)).slice();if(r){let a=`${_chunk3NSUE34Fcjs.f[r]}.`;i=i.filter(u=>u.startsWith(a))}return n?i.map(a=>a.replace(/^\d{3}\./,"")):i}async function Jn(t){return(await fn(t,"hk:full",At)).slice()}async function er(t,e,n={}){let{batchSize:r=Re,concurrency:o=Ce,onProgress:i}=n;G(r,"batchSize"),G(o,"concurrency");let a=Math.min(r,_e),u=ce(e,a),l=u.length,c=0,d=u.map(p=>async()=>{let T=await Je(t,p);return c++,i&&i(c,l),T});return(await de(d,o,!0)).flat()}async function tr(t,e,n={}){let{batchSize:r=Re,concurrency:o=Ce,onProgress:i}=n;G(r,"batchSize"),G(o,"concurrency");let a=Math.min(r,_e),u=ce(e,a),l=u.length,c=0,d=u.map(p=>async()=>{let T=await et(t,p);return c++,i&&i(c,l),T});return(await de(d,o,!0)).flat()}async function nr(t,e,n={}){let{batchSize:r=Re,concurrency:o=Ce,onProgress:i}=n;G(r,"batchSize"),G(o,"concurrency");let a=Math.min(r,_e),u=ce(e,a),l=u.length,c=0,d=u.map(p=>async()=>{let T=await tt(t,p);return c++,i&&i(c,l),T});return(await de(d,o,!0)).flat()}async function rr(t){return(await Vn.getOrFetch("fund:full",async()=>{let o=(await _asyncNullishCoalesce(await t.get(ze,{responseType:"text"}), async () => (""))).split(",").slice(1).filter(i=>i.trim());if(o.length===0)throw new (0, _chunk4Q7UQ5Q3cjs.c)("\u57FA\u91D1\u4EE3\u7801\u5217\u8868\u63A5\u53E3\u8FD4\u56DE\u7A7A\u6570\u636E","tencent",ze);return o})).slice()}var Ti=_chunkTVIEKKDQcjs.b.call(void 0, "tencent:trade-calendar",{defaultTTL:720*60*1e3,maxSize:4});async function or(t){return(await Ti.getOrFetch("a-share",async()=>{let r=(await _asyncNullishCoalesce(await t.get(Ot), async () => (""))).trim().split(",").map(o=>o.trim()).filter(o=>o.length>0);if(r.length===0)throw new (0, _chunk4Q7UQ5Q3cjs.c)("\u4EA4\u6613\u65E5\u5386\u63A5\u53E3\u8FD4\u56DE\u7A7A\u6570\u636E","tencent",Ot);return r})).slice()}var ir="https://smartbox.gtimg.cn/s3/";function hi(t){return t.replace(/\\u([0-9a-fA-F]{4})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Si(t){let e=t.toUpperCase();return e.startsWith("QDII")||e.startsWith("ETF")||e.startsWith("LOF")||e.startsWith("KJ")||e.startsWith("JJ")||e.includes("FUND")?"fund":e.startsWith("GP")||e.includes("STOCK")?"stock":e==="ZS"||e.includes("INDEX")?"index":e.startsWith("ZQ")||e.includes("BOND")?"bond":e.startsWith("QH")||e.includes("FUTURE")?"futures":e.startsWith("QZ")||e.includes("OPTION")?"option":"other"}function Ei(t){return!t||t==="N"?[]:t.split("^").filter(Boolean).map(n=>{let r=n.split("~"),o=r[0]||"",i=r[1]||"",a=hi(r[2]||""),u=r[4]||"";return{code:o+i,name:a,market:o,type:u,category:Si(u)}})}function Ri(t){return new Promise((e,n)=>{let r=`${ir}?v=2&t=all&q=${encodeURIComponent(t)}`;window.v_hint="";let o=document.createElement("script");o.src=r,o.charset="utf-8",o.onload=()=>{let i=window.v_hint||"";document.body.removeChild(o),e(i)},o.onerror=()=>{document.body.removeChild(o),n(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:"Network error calling Smartbox",url:r}))},document.body.appendChild(o)})}async function _i(t,e){let n=`${ir}?v=2&t=all&q=${encodeURIComponent(e)}`,o=(await t.get(n)).match(/v_hint="([^"]*)"/);return o?o[1]:""}function Ci(){return typeof window<"u"&&typeof document<"u"}async function sr(t,e){if(!e||!e.trim())return[];let n;return Ci()?n=await Ri(e):n=await _i(t,e),Ei(n)}var g={};_chunk4VDLQK6Fcjs.a.call(void 0, g,{extractVariety:()=>Cn,fetchDatacenter:()=>Tn,fetchDatacenterList:()=>A,getBlockTradeDailyStat:()=>Ao,getBlockTradeDetail:()=>Co,getBlockTradeMarketStat:()=>_o,getBoardChanges:()=>go,getCFFEXOptionQuotes:()=>$r,getComexInventory:()=>Wr,getConceptConstituents:()=>br,getConceptKline:()=>Mr,getConceptList:()=>Dr,getConceptMinuteKline:()=>Nr,getConceptSpot:()=>Ir,getDividendDetail:()=>kr,getDragonTigerBranchRank:()=>So,getDragonTigerDetail:()=>yo,getDragonTigerInstitution:()=>ho,getDragonTigerStockSeatDetail:()=>Eo,getDragonTigerStockStats:()=>To,getFundDividendList:()=>Lr,getFundEstimate:()=>xr,getFundFlowRank:()=>no,getFundNavHistory:()=>Fr,getFundProfile:()=>Kr,getFundRankHistory:()=>Ur,getFuturesHistoryKline:()=>Hr,getFuturesInventory:()=>Yr,getFuturesInventorySymbols:()=>Gr,getFuturesMarketCode:()=>An,getGlobalFuturesKline:()=>zr,getGlobalFuturesSpot:()=>qr,getHKHistoryKline:()=>dr,getHKMinuteKline:()=>pr,getHistoryKline:()=>lr,getIndividualFundFlow:()=>eo,getIndustryConstituents:()=>Ar,getIndustryKline:()=>Or,getIndustryList:()=>_r,getIndustryMinuteKline:()=>Pr,getIndustrySpot:()=>Cr,getMarginAccountInfo:()=>Oo,getMarginTargetList:()=>Po,getMarketFundFlow:()=>to,getMinuteKline:()=>cr,getNorthboundFlowSummary:()=>ao,getNorthboundHistory:()=>lo,getNorthboundHoldingRank:()=>uo,getNorthboundIndividual:()=>co,getNorthboundMinute:()=>so,getOptionLHB:()=>Qr,getSectorFundFlowHistory:()=>oo,getSectorFundFlowRank:()=>ro,getStockChanges:()=>mo,getUSHistoryKline:()=>mr,getUSMinuteKline:()=>gr,getZTPool:()=>po});function b(t){return/^\d{8}$/.test(t)?`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`:t}function ar(t,e){let n=i=>b(i.replace("T"," ").trim()).slice(0,16),r=n(t),o=n(e);return o.length===10&&(o+=" 23:59"),{start:r,end:o}}function ur(t,e,n=0){let r=a=>{if(!a)return;let u=/^(\d{4})-?(\d{2})-?(\d{2})/.exec(a.trim());return u?`${u[1]}${u[2]}${u[3]}`:void 0},o=_nullishCoalesce(r(t), () => ("0")),i=r(e);return i!==void 0&&n>0&&(i=ge(`${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}`,n).replace(/-/g,"")),{beg:o,end:_nullishCoalesce(i, () => ("20500000"))}}async function yn(t,e,n,r,o=100,i){let a=[],u=1,l=0;do{let c=new URLSearchParams({...n,pn:String(u),pz:String(o),fields:r}),d=`${e}?${c.toString()}`,p=await _asyncOptionalChain([(await t.get(d,{responseType:"json"})), 'optionalAccess', async _70 => _70.data]);if(!p||!Array.isArray(p.diff))break;u===1&&(l=_nullishCoalesce(p.total, () => (0)));let T=p.diff.map((R,P)=>i(R,a.length+P+1));if(a.push(...T),T.length===0)break;u++}while(a.length<l);return a}function v(t){let[e,n,r,o,i,a,u,l,c,d,y]=t.split(",");return{date:e,open:m(n),close:m(r),high:m(o),low:m(i),volume:m(a),amount:m(u),amplitude:m(l),changePercent:m(c),change:m(d),turnoverRate:m(y)}}async function K(t,e,n){let r=`${e}?${n.toString()}`,o=await t.get(r,{responseType:"json"});return{klines:_optionalChain([o, 'optionalAccess', _71 => _71.data, 'optionalAccess', _72 => _72.klines])||[],name:_optionalChain([o, 'optionalAccess', _73 => _73.data, 'optionalAccess', _74 => _74.name]),code:_optionalChain([o, 'optionalAccess', _75 => _75.data, 'optionalAccess', _76 => _76.code])}}function Ai(t){let[e,n,r,o,i,a,u,l]=t.split(",");return{time:e,open:m(n),close:m(r),high:m(o),low:m(i),volume:m(a),amount:m(u),avgPrice:m(l)}}function nt(t,e){let n=r=>{let o=ae(r,E.CN);return{time:St(o,t)||r,timestamp:re(o)}};return{mapTrendRow:({time:r,...o},i)=>({...n(r),tz:t,...o,currency:e,code:i.code}),mapKlineRow:({date:r,...o},i)=>({...n(r),tz:t,...o,currency:e,code:i.code})}}function te(t){return async function(n,r,o={}){let i=_nullishCoalesce(o.period, () => (t.defaultPeriod));ft(i),t.fqt==="option"&&W(_nullishCoalesce(o.adjust, () => ("qfq")));let a=t.resolveTarget(r),u=t.window,l=p=>{if(u.mode==="full")return p;let{start:T,end:R}=ar(_nullishCoalesce(o.startDate, () => ("1979-09-01 09:32:00")),_nullishCoalesce(o.endDate, () => ("2222-01-01 09:32:00")));return p.filter(P=>P.time>=T&&P.time<=R)};if(i==="1"){let p=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",...t.includeUt?{ut:L}:{},ndays:t.ndays==="option"?String(_nullishCoalesce(o.ndays, () => (1))):t.ndays.fixed,iscr:"0",secid:a.secid}),T=`${t.trendsUrl}?${p.toString()}`,P=await _asyncOptionalChain([(await n.get(T,{responseType:"json"})), 'optionalAccess', async _77 => _77.data, 'optionalAccess', async _78 => _78.trends]);return!Array.isArray(P)||P.length===0?[]:l(P.map(S=>t.mapTrendRow(Ai(S),a)))}let c=u.mode==="filter"?ur(o.startDate,o.endDate,_nullishCoalesce(u.endExtraDays, () => (0))):{beg:u.beg,end:u.end},d=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",...t.includeUt?{ut:L}:{},klt:i,fqt:t.fqt==="option"?V(_nullishCoalesce(o.adjust, () => ("qfq"))):t.fqt.fixed,secid:a.secid,beg:c.beg,end:c.end,..._nullishCoalesce(t.extraKlineParams, () => ({}))}),{klines:y}=await K(n,t.klineUrl,d);return!Array.isArray(y)||y.length===0?[]:l(y.map(p=>t.mapKlineRow(v(p),a)))}}async function lr(t,e,n={}){let{period:r="daily",adjust:o="qfq",startDate:i="19700101",endDate:a="20500101"}=n;q(r),W(o);let u=_chunk3NSUE34Fcjs.d.call(void 0, e,{market:"CN"}),l=_chunk3NSUE34Fcjs.h.call(void 0, u),c=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f116",ut:L,klt:z(r),fqt:V(o),secid:l,beg:i,end:a}),d=$e,{klines:y}=await K(t,d,c);return y.length===0?[]:y.map(p=>{let T=v(p),R=k(T.date,E.CN);return{...T,timestamp:R.timestamp,tz:R.tz,code:u.code}})}var Oi=te({trendsUrl:Pt,klineUrl:$e,resolveTarget:t=>{let e=_chunk3NSUE34Fcjs.d.call(void 0, t,{market:"CN"});return{secid:_chunk3NSUE34Fcjs.h.call(void 0, e),code:e.code}},defaultPeriod:"1",ndays:{fixed:"5"},fqt:"option",includeUt:!0,window:{mode:"filter"},mapTrendRow:({time:t,...e})=>{let n=k(t,E.CN);return{time:t,timestamp:n.timestamp,tz:n.tz,...e}},mapKlineRow:t=>{let e=k(t.date,E.CN);return{...t,time:t.date,timestamp:e.timestamp,tz:e.tz}}});async function cr(t,e,n={}){return Oi(t,e,n)}function rt(t){return async function(n,r,o={}){let{period:i="daily",adjust:a="qfq",startDate:u="19700101",endDate:l="20500101"}=o;q(i),W(a);let c=t.normalizeSymbol(r),d=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:L,klt:z(i),fqt:V(a),secid:c.secid,beg:u,end:l,lmt:"1000000"}),{klines:y,name:p,code:T}=await K(n,t.url,d);if(y.length===0)return[];let R=t.resolveResultMeta?t.resolveResultMeta(r,c,{code:T,name:p}):{code:T||c.fallbackCode,name:p||""};return y.map(P=>{let S=v(P),O=k(S.date,t.tz),N={...S,timestamp:O.timestamp,tz:O.tz,code:R.code,name:R.name};return t.enrichItem(N)})}}var Pi=rt({url:Qe,tz:E.HK,normalizeSymbol:t=>{let e=_chunk3NSUE34Fcjs.d.call(void 0, t,{market:"HK"});return{secid:_chunk3NSUE34Fcjs.h.call(void 0, e),fallbackCode:e.code}},enrichItem:t=>({...t,currency:"HKD",lotSize:null})});async function dr(t,e,n={}){return Pi(t,e,n)}var Di=te({trendsUrl:Dt,klineUrl:Qe,resolveTarget:t=>{let e=_chunk3NSUE34Fcjs.d.call(void 0, t,{market:"HK"});return{secid:_chunk3NSUE34Fcjs.h.call(void 0, e),code:e.code}},defaultPeriod:"1",ndays:"option",fqt:"option",includeUt:!0,window:{mode:"filter"},...nt(E.HK,"HKD")});async function pr(t,e,n={}){return Di(t,e,n)}var Ii=rt({url:je,tz:E.US,normalizeSymbol:t=>({secid:t,fallbackCode:t.split(".")[1]||t}),resolveResultMeta:(t,e,n)=>({code:n.code||e.fallbackCode,name:n.name||""}),enrichItem:t=>({...t,currency:"USD"})});async function mr(t,e,n={}){return Ii(t,e,n)}var bi=te({trendsUrl:It,klineUrl:je,resolveTarget:t=>({secid:t,code:t.split(".")[1]||t}),defaultPeriod:"1",ndays:"option",fqt:"option",includeUt:!0,window:{mode:"filter",endExtraDays:1},...nt(E.US,"USD")});async function gr(t,e,n={}){return bi(t,e,n)}function yr(t){let e=_chunkTVIEKKDQcjs.b.call(void 0, `eastmoney:board-code-map:${t.type}`,{defaultTTL:36e5,maxSize:4});return{async getCode(n,r,o){if(r.startsWith("BK"))return r;let a=(await e.getOrFetch("name-code-map",async()=>{let u=await o(n);if(u.length===0)throw new (0, _chunk4Q7UQ5Q3cjs.c)(`${t.errorPrefix}: \u677F\u5757\u5217\u8868\u63A5\u53E3\u8FD4\u56DE\u7A7A\u6570\u636E`,"eastmoney");return Object.fromEntries(u.map(l=>[l.name,l.code]))}))[r];if(!a)throw new (0, _chunk4Q7UQ5Q3cjs.d)(`${t.errorPrefix}: ${r}`,"eastmoney");return a}}}async function Tr(t,e){let n={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:e.type==="concept"?"f12":"f3",fs:e.fsFilter},r=e.type==="concept"?"f2,f3,f4,f8,f12,f14,f15,f16,f17,f18,f20,f21,f24,f25,f22,f33,f11,f62,f128,f124,f107,f104,f105,f136":"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f26,f22,f33,f11,f62,f128,f136,f115,f152,f124,f107,f104,f105,f140,f141,f207,f208,f209,f222",o=await yn(t,e.listUrl,n,r,100,(i,a)=>({rank:a,name:String(_nullishCoalesce(i.f14, () => (""))),code:String(_nullishCoalesce(i.f12, () => (""))),price:s(i.f2),change:s(i.f4),changePercent:s(i.f3),totalMarketCap:s(i.f20),turnoverRate:s(i.f8),riseCount:s(i.f104),fallCount:s(i.f105),leadingStock:i.f128?String(i.f128):null,leadingStockChangePercent:s(i.f136)}));return o.sort((i,a)=>(_nullishCoalesce(a.changePercent, () => (0)))-(_nullishCoalesce(i.changePercent, () => (0)))),o.forEach((i,a)=>{i.rank=a+1}),o}async function hr(t,e,n){let r=new URLSearchParams({fields:"f43,f44,f45,f46,f47,f48,f170,f171,f168,f169",mpi:"1000",invt:"2",fltt:"1",secid:`90.${e}`}),o=`${n}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _79 => _79.data]);return a?[{key:"f43",name:"\u6700\u65B0",divide:!0},{key:"f44",name:"\u6700\u9AD8",divide:!0},{key:"f45",name:"\u6700\u4F4E",divide:!0},{key:"f46",name:"\u5F00\u76D8",divide:!0},{key:"f47",name:"\u6210\u4EA4\u91CF",divide:!1},{key:"f48",name:"\u6210\u4EA4\u989D",divide:!1},{key:"f170",name:"\u6DA8\u8DCC\u5E45",divide:!0},{key:"f171",name:"\u632F\u5E45",divide:!0},{key:"f168",name:"\u6362\u624B\u7387",divide:!0},{key:"f169",name:"\u6DA8\u8DCC\u989D",divide:!0}].map(({key:l,name:c,divide:d})=>{let y=a[l],p=null;return typeof y=="number"&&!isNaN(y)&&(p=d?y/100:y),{item:c,value:p}}):[]}async function Sr(t,e,n){let r={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:"f3",fs:`b:${e} f:!50`};return yn(t,n,r,"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,f136,f115,f152,f45",100,(i,a)=>({rank:a,code:String(_nullishCoalesce(i.f12, () => (""))),name:String(_nullishCoalesce(i.f14, () => (""))),price:s(i.f2),changePercent:s(i.f3),change:s(i.f4),volume:s(i.f5),amount:s(i.f6),amplitude:s(i.f7),high:s(i.f15),low:s(i.f16),open:s(i.f17),prevClose:s(i.f18),turnoverRate:s(i.f8),pe:s(i.f9),pb:s(i.f23)}))}async function Er(t,e,n,r={}){let{period:o="daily",adjust:i="",startDate:a="19700101",endDate:u="20500101"}=r;q(o),W(i);let l=new URLSearchParams({secid:`90.${e}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:z(o),fqt:V(i),beg:a,end:u,smplmt:"10000",lmt:"1000000"}),{klines:c}=await K(t,n,l);return c.length===0?[]:c.map(d=>v(d))}var fr=new Map;async function Rr(t,e,n,r,o={}){let i=`${n}|${r}`,a=fr.get(i);return a||(a=te({trendsUrl:r,klineUrl:n,resolveTarget:u=>({secid:`90.${u}`,code:u}),defaultPeriod:"5",ndays:{fixed:"1"},fqt:{fixed:"1"},includeUt:!1,window:{mode:"full",beg:"0",end:"20500101"},extraKlineParams:{smplmt:"10000",lmt:"1000000"},mapTrendRow:({avgPrice:u,...l})=>({...l,price:u}),mapKlineRow:u=>({time:u.date,open:u.open,close:u.close,high:u.high,low:u.low,changePercent:u.changePercent,change:u.change,volume:u.volume,amount:u.amount,amplitude:u.amplitude,turnoverRate:u.turnoverRate})}),fr.set(i,a)),a(t,e,o)}function ot(t){let e=yr(t);async function n(o){return Tr(o,t)}async function r(o,i){return e.getCode(o,i,n)}return{async getList(o){return n(o)},async getSpot(o,i){let a=await r(o,i);return hr(o,a,t.spotUrl)},async getConstituents(o,i){let a=await r(o,i);return Sr(o,a,t.consUrl)},async getKline(o,i,a={}){let u=await r(o,i);return Er(o,u,t.klineUrl,a)},async getMinuteKline(o,i,a={}){let u=await r(o,i);return Rr(o,u,t.klineUrl,t.trendsUrl,a)}}}var Mi={type:"industry",fsFilter:"m:90 t:2 f:!50",listUrl:bt,spotUrl:Mt,consUrl:Nt,klineUrl:kt,trendsUrl:Lt,errorPrefix:"\u672A\u627E\u5230\u884C\u4E1A\u677F\u5757"},Pe=ot(Mi);async function _r(t){return Pe.getList(t)}async function Cr(t,e){return Pe.getSpot(t,e)}async function Ar(t,e){return Pe.getConstituents(t,e)}async function Or(t,e,n={}){return Pe.getKline(t,e,n)}async function Pr(t,e,n={}){return Pe.getMinuteKline(t,e,n)}var Ni={type:"concept",fsFilter:"m:90 t:3 f:!50",listUrl:Ft,spotUrl:xt,consUrl:Ut,klineUrl:wt,trendsUrl:vt,errorPrefix:"\u672A\u627E\u5230\u6982\u5FF5\u677F\u5757"},De=ot(Ni);async function Dr(t){return De.getList(t)}async function Ir(t,e){return De.getSpot(t,e)}async function br(t,e){return De.getConstituents(t,e)}async function Mr(t,e,n={}){return De.getKline(t,e,n)}async function Nr(t,e,n={}){return De.getMinuteKline(t,e,n)}async function Tn(t,e,n){let{reportName:r,columns:o="ALL",filter:i,sortColumns:a,sortTypes:u,pageSize:l=500,startPage:c=1,fetchAllPages:d=!0,maxPages:y=1e3,quoteColumns:p,quoteType:T,extraParams:R}=e,P=[],S=c,O=1,N=0,H=0;do{let w=new URLSearchParams({reportName:r,columns:o,pageSize:String(l),pageNumber:String(S),source:"WEB",client:"WEB"});if(i&&w.set("filter",i),a&&w.set("sortColumns",a),u&&w.set("sortTypes",u),p&&w.set("quoteColumns",p),T&&w.set("quoteType",T),R)for(let[it,st]of Object.entries(R))w.set(it,st);let wo=`${Kt}?${w.toString()}`,ie=await _asyncOptionalChain([(await t.get(wo,{responseType:"json"})), 'optionalAccess', async _80 => _80.result]);if(!ie||!Array.isArray(ie.data))break;S===c&&(O=_nullishCoalesce(ie.pages, () => (1)),N=_nullishCoalesce(ie.count, () => (ie.data.length)));let vo=ie.data.map((it,st)=>n(it,P.length+st));if(P.push(...vo),S++,H++,!d)break}while(S<=O&&H<y);return d&&H>=y&&S<=O&&console.warn(`[stock-sdk] fetchDatacenter("${r}") truncated at maxPages=${y} (server reports ${O} pages). Pass a larger \`maxPages\` to fetch the full dataset.`),{data:P,total:N,pages:O}}async function A(t,e,n){return(await Tn(t,e,n)).data}function F(t){if(t==null)return"";let e=String(t),n=e.match(/^(\d{4}-\d{2}-\d{2})/);return n?n[1]:e}function oe(t){if(!t)return null;let e=t.match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:null}function ki(t){return{code:_nullishCoalesce(t.SECURITY_CODE, () => ("")),name:_nullishCoalesce(t.SECURITY_NAME_ABBR, () => ("")),reportDate:oe(t.REPORT_DATE),planNoticeDate:oe(t.PLAN_NOTICE_DATE),disclosureDate:oe(_nullishCoalesce(t.PUBLISH_DATE, () => (t.PLAN_NOTICE_DATE))),assignTransferRatio:_nullishCoalesce(t.BONUS_IT_RATIO, () => (null)),bonusRatio:_nullishCoalesce(t.BONUS_RATIO, () => (null)),transferRatio:_nullishCoalesce(t.IT_RATIO, () => (null)),dividendPretax:_nullishCoalesce(t.PRETAX_BONUS_RMB, () => (null)),dividendDesc:_nullishCoalesce(t.IMPL_PLAN_PROFILE, () => (null)),dividendYield:_nullishCoalesce(t.DIVIDENT_RATIO, () => (null)),eps:_nullishCoalesce(t.BASIC_EPS, () => (null)),bps:_nullishCoalesce(t.BVPS, () => (null)),capitalReserve:_nullishCoalesce(t.PER_CAPITAL_RESERVE, () => (null)),unassignedProfit:_nullishCoalesce(t.PER_UNASSIGN_PROFIT, () => (null)),netProfitYoy:_nullishCoalesce(t.PNP_YOY_RATIO, () => (null)),totalShares:_nullishCoalesce(t.TOTAL_SHARES, () => (null)),equityRecordDate:oe(t.EQUITY_RECORD_DATE),exDividendDate:oe(t.EX_DIVIDEND_DATE),payDate:oe(t.PAY_DATE),assignProgress:_nullishCoalesce(t.ASSIGN_PROGRESS, () => (null)),noticeDate:oe(t.NOTICE_DATE)}}async function kr(t,e){let n=e.replace(/^(sh|sz|bj)/,"");return A(t,{reportName:"RPT_SHAREBONUS_DET",sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:500,filter:`(SECURITY_CODE="${n}")`},r=>ki(r))}var Li="https://fund.eastmoney.com/Data/funddataIndex_Interface.aspx",En="https://fund.eastmoney.com/pingzhongdata",Fi="https://fundgz.1234567.com.cn/js";function xi(){return typeof document<"u"&&typeof window<"u"}var Ui=1e4;function wi(){return Number(Y(E.CN).slice(0,4))}function vi(t,e){let n=new URLSearchParams({dt:"8",page:String(e),rank:_nullishCoalesce(t.rank, () => ("FSRQ")),sort:_nullishCoalesce(t.sort, () => ("desc")),gs:"",ftype:_nullishCoalesce(t.fundType, () => ("")),year:String(_nullishCoalesce(t.year, () => (wi())))});return`${Li}?${n.toString()}`}function hn(t){if(!t)return null;let e=t.trim().match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:null}function Ki(t){return{code:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),equityRecordDate:hn(t[2]),exDividendDate:hn(t[3]),dividendPerShare:M(t[4]),payDate:hn(t[5]),dividendType:_optionalChain([t, 'access', _81 => _81[6], 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()])?t[6].trim():null}}async function Sn(t,e,n){let r=vi(e,n),o=await se(r,["pageinfo","jjfh_data"],{client:t}),i=_nullishCoalesce(o.pageinfo, () => ([0,0,n])),[a=0,u=0,l=n]=i;return{items:(_nullishCoalesce(o.jjfh_data, () => ([]))).map(Ki),totalPages:a,pageSize:u,currentPage:l}}async function Lr(t,e={}){if(e.page==="all"){let o=await Sn(t,e,1),i=o.items;for(let a=2;a<=o.totalPages;a++){let u=await Sn(t,e,a);i=i.concat(u.items)}return e.code&&(i=i.filter(a=>a.code===e.code)),{items:i,totalPages:o.totalPages,pageSize:o.pageSize,currentPage:-1}}let n=_nullishCoalesce(e.page, () => (1)),r=await Sn(t,e,n);return e.code?{...r,items:r.items.filter(o=>o.code===e.code)}:r}function Rn(t){return Y(E.CN,t)}function _n(t){return re(ae(t,E.CN))}function Q(t,e){return _nullishCoalesce(_optionalChain([t, 'optionalAccess', _84 => _84.find, 'call', _85 => _85(n=>n.name===e), 'optionalAccess', _86 => _86.data]), () => ([]))}async function Fr(t,e){let n=`${En}/${encodeURIComponent(e)}.js`,r=await se(n,["fS_code","fS_name","Data_netWorthTrend","Data_ACWorthTrend"],{client:t}),o=_nullishCoalesce(r.Data_netWorthTrend, () => ([])),i=new Map;for(let u of _nullishCoalesce(r.Data_ACWorthTrend, () => ([])))Array.isArray(u)&&u.length>=2&&i.set(u[0],u[1]);let a=o.map(u=>({date:Rn(u.x),timestamp:u.x,nav:u.y,accNav:i.has(u.x)?i.get(u.x):null,dailyReturn:M(u.equityReturn),unitMoney:_nullishCoalesce(u.unitMoney, () => (""))}));return{code:_nullishCoalesce(r.fS_code, () => (e)),name:_nullishCoalesce(r.fS_name, () => (null)),items:a}}function Bi(t,e,n=Ui){let r=`${Fi}/${encodeURIComponent(e)}.js?rt=${Date.now()}`;return xi()?pe("fundgz:jsonpgz",()=>Hi(r,n)):qi(t,r)}function Hi(t,e){return new Promise((n,r)=>{let o=document.createElement("script"),i=window,a=i.jsonpgz,u=!1,l=()=>{if(o.parentNode&&o.parentNode.removeChild(o),a===void 0)try{delete i.jsonpgz}catch (e9){}else i.jsonpgz=a},c=setTimeout(()=>{u||(u=!0,l(),r(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`fundgz JSONP timed out after ${e}ms: ${t}`,url:t,details:{timeout:e}})))},e);i.jsonpgz=d=>{u||(u=!0,clearTimeout(c),l(),n(_nullishCoalesce(d, () => ({}))))},o.onerror=()=>{u||(u=!0,clearTimeout(c),l(),r(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`fundgz JSONP script load failed: ${t}`,url:t})))},o.src=t,document.head.appendChild(o)})}async function qi(t,e){let r=(await t.get(e,{responseType:"text",provider:"eastmoney"})).trim();if(!r)return{};try{return qe(r)}catch (e10){return{}}}async function xr(t,e){let n=await Bi(t,e);return{code:_nullishCoalesce(n.fundcode, () => (e)),name:_nullishCoalesce(n.name, () => (null)),navDate:_optionalChain([n, 'access', _87 => _87.jzrq, 'optionalAccess', _88 => _88.trim, 'call', _89 => _89()])?n.jzrq.trim():null,nav:M(n.dwjz),estimatedNav:M(n.gsz),estimatedChangePercent:M(n.gszzl),estimateTime:_optionalChain([n, 'access', _90 => _90.gztime, 'optionalAccess', _91 => _91.trim, 'call', _92 => _92()])?n.gztime.trim():null}}async function Ur(t,e){let n=`${En}/${encodeURIComponent(e)}.js`,r=await se(n,["fS_code","fS_name","Data_rateInSimilarType","Data_rateInSimilarPersent"],{client:t}),o=_nullishCoalesce(r.Data_rateInSimilarType, () => ([])),i=new Map;for(let u of _nullishCoalesce(r.Data_rateInSimilarPersent, () => ([])))Array.isArray(u)&&u.length>=2&&i.set(u[0],u[1]);let a=o.map(u=>({date:Rn(u.x),timestamp:u.x,rank:M(u.y),total:M(u.sc),percentile:i.has(u.x)?i.get(u.x):null}));return{code:_nullishCoalesce(r.fS_code, () => (e)),name:_nullishCoalesce(r.fS_name, () => (null)),items:a}}function wr(t){let e=t.indexOf(".");return e<0?{code:t,marketId:""}:{marketId:t.slice(0,e),code:t.slice(e+1)}}function zi(t){return t?t.map(e=>e.trim()).filter(Boolean).map(wr):[]}function $i(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean).map(wr):[]}function Qi(t){if(!_optionalChain([t, 'optionalAccess', _93 => _93.categories, 'optionalAccess', _94 => _94.length])||!_optionalChain([t, 'optionalAccess', _95 => _95.series]))return[];let e=Q(t.series,"\u80A1\u7968\u5360\u51C0\u6BD4"),n=Q(t.series,"\u503A\u5238\u5360\u51C0\u6BD4"),r=Q(t.series,"\u73B0\u91D1\u5360\u51C0\u6BD4"),o=Q(t.series,"\u5176\u4ED6\u5360\u51C0\u6BD4"),i=Q(t.series,"\u51C0\u8D44\u4EA7");return t.categories.map((a,u)=>({date:a,timestamp:_n(a),stockRatio:_nullishCoalesce(e[u], () => (0)),bondRatio:_nullishCoalesce(n[u], () => (0)),cashRatio:_nullishCoalesce(r[u], () => (0)),otherRatio:_nullishCoalesce(o[u], () => (0)),netAsset:_nullishCoalesce(i[u], () => (0))}))}function ji(t){return t?t.filter(([e])=>typeof e=="number"&&Number.isFinite(e)).map(([e,n])=>({date:Rn(e),timestamp:e,position:n})):[]}function Gi(t){return t?t.map(e=>{let n=_optionalChain([e, 'optionalAccess', _96 => _96.star]);return{id:_nullishCoalesce(_optionalChain([e, 'optionalAccess', _97 => _97.id]), () => ("")),name:_nullishCoalesce(_optionalChain([e, 'optionalAccess', _98 => _98.name]), () => ("")),avatarUrl:_optionalChain([e, 'optionalAccess', _99 => _99.pic, 'optionalAccess', _100 => _100.trim, 'call', _101 => _101()])||null,star:typeof n=="number"&&Number.isFinite(n)?n:null,workTime:_optionalChain([e, 'optionalAccess', _102 => _102.workTime, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()])||null,fundSize:_optionalChain([e, 'optionalAccess', _105 => _105.fundSize, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()])||null,power:vr(_optionalChain([e, 'optionalAccess', _108 => _108.power]))}}):[]}function vr(t){return _optionalChain([t, 'optionalAccess', _109 => _109.categories, 'optionalAccess', _110 => _110.length])?{overall:_nullishCoalesce(M(t.avr), () => (0)),categories:t.categories,scores:_nullishCoalesce(t.data, () => ([])),descriptions:_nullishCoalesce(t.dsc, () => ([]))}:null}function Yi(t){if(!_optionalChain([t, 'optionalAccess', _111 => _111.categories, 'optionalAccess', _112 => _112.length])||!_optionalChain([t, 'optionalAccess', _113 => _113.series]))return[];let e=Q(t.series,"\u673A\u6784\u6301\u6709\u6BD4\u4F8B"),n=Q(t.series,"\u4E2A\u4EBA\u6301\u6709\u6BD4\u4F8B"),r=Q(t.series,"\u5185\u90E8\u6301\u6709\u6BD4\u4F8B");return t.categories.map((o,i)=>({date:o,timestamp:_n(o),institutionRatio:_nullishCoalesce(e[i], () => (0)),individualRatio:_nullishCoalesce(n[i], () => (0)),internalRatio:_nullishCoalesce(r[i], () => (0))}))}function Wi(t){return!_optionalChain([t, 'optionalAccess', _114 => _114.categories, 'optionalAccess', _115 => _115.length])||!_optionalChain([t, 'optionalAccess', _116 => _116.series])?[]:t.categories.map((e,n)=>({date:e,scale:_nullishCoalesce(_optionalChain([t, 'access', _117 => _117.series, 'optionalAccess', _118 => _118[n], 'optionalAccess', _119 => _119.y]), () => (0)),mom:_nullishCoalesce(_optionalChain([t, 'access', _120 => _120.series, 'optionalAccess', _121 => _121[n], 'optionalAccess', _122 => _122.mom]), () => (""))}))}function Vi(t){if(!_optionalChain([t, 'optionalAccess', _123 => _123.categories, 'optionalAccess', _124 => _124.length])||!_optionalChain([t, 'optionalAccess', _125 => _125.series]))return[];let e=Q(t.series,"\u671F\u95F4\u7533\u8D2D"),n=Q(t.series,"\u671F\u95F4\u8D4E\u56DE"),r=Q(t.series,"\u603B\u4EFD\u989D");return t.categories.map((o,i)=>({date:o,timestamp:_n(o),buy:_nullishCoalesce(e[i], () => (0)),sell:_nullishCoalesce(n[i], () => (0)),total:_nullishCoalesce(r[i], () => (0))}))}function Xi(t){return{oneMonth:M(t.syl_1y),threeMonth:M(t.syl_3y),sixMonth:M(t.syl_6y),oneYear:M(t.syl_1n)}}function Zi(t){if(typeof t!="string")return null;let e=t.indexOf("_");if(e<0)return null;let n=t.slice(0,e);if(!n)return null;let r=t.lastIndexOf("_");return r>e?{code:n,name:t.slice(e+1,r),value:M(t.slice(r+1))}:{code:n,name:t.slice(e+1),value:null}}function Ji(t){if(!_optionalChain([t, 'optionalAccess', _126 => _126.length]))return null;let e=t.map(n=>(Array.isArray(n)?n:[]).map(Zi).filter(r=>r!==null)).filter(n=>n.length>0);return e.length?{groups:e}:null}async function Kr(t,e){let n=`${En}/${encodeURIComponent(e)}.js`,r=await se(n,["fS_code","fS_name","fund_sourceRate","fund_Rate","fund_minsg","stockCodesNew","zqCodesNew","Data_assetAllocation","Data_fundSharesPositions","Data_currentFundManager","Data_performanceEvaluation","Data_holderStructure","Data_fluctuationScale","Data_buySedemption","syl_1y","syl_3y","syl_6y","syl_1n","swithSameType"],{client:t});return{code:_nullishCoalesce(r.fS_code, () => (e)),name:_nullishCoalesce(r.fS_name, () => (null)),sourceRate:M(r.fund_sourceRate),rate:M(r.fund_Rate),minSubscription:M(r.fund_minsg),holdings:zi(r.stockCodesNew),bondHoldings:$i(r.zqCodesNew),assetAllocation:Qi(r.Data_assetAllocation),positions:ji(r.Data_fundSharesPositions),managers:Gi(r.Data_currentFundManager),performance:vr(r.Data_performanceEvaluation),holderStructure:Yi(r.Data_holderStructure),scaleChanges:Wi(r.Data_fluctuationScale),buySedemption:Vi(r.Data_buySedemption),stageReturns:Xi(r),sameType:Ji(r.swithSameType)}}function Cn(t){let e=t.match(/^([a-zA-Z]+)/);if(!e)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid futures symbol: "${t}". Expected format: variety + contract (e.g., rb2605, RBM, IF2604)`);return e[1]}function Br(t){return _nullishCoalesce(_nullishCoalesce(ue[t], () => (ue[t.toLowerCase()])), () => (ue[t.toUpperCase()]))}function An(t){let e=Br(t);if(!e&&t.length>1&&t.endsWith("M")&&(e=Br(t.slice(0,-1))),!e){let r=Object.keys(ue).join(", ");throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown futures variety: "${t}". Supported varieties: ${r}`)}let n=zt[e];if(n===void 0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`No market code found for exchange: ${e}`);return n}function es(t){let e=v(t),n=t.split(",");return{...e,openInterest:n.length>12?m(n[12]):null}}async function Hr(t,e,n={}){let{period:r="daily",startDate:o="19700101",endDate:i="20500101"}=n;q(r);let a=Cn(e),l=`${An(a)}.${e}`,c=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64",ut:L,klt:z(r),fqt:"0",secid:l,beg:o,end:i}),{klines:d,name:y,code:p}=await K(t,Te,c);return d.length===0?[]:d.map(T=>({...es(T),code:p||e,name:y||""}))}async function qr(t,e={}){let n=_nullishCoalesce(e.pageSize, () => (20)),r=[],o=0,i=0,a=1e3;do{let u=new URLSearchParams({orderBy:"dm",sort:"desc",pageSize:String(n),pageIndex:String(o),token:he,field:"dm,sc,name,p,zsjd,zde,zdf,f152,o,h,l,zjsj,vol,wp,np,ccl",blockName:"callback"}),l=`${qt}?${u.toString()}`,c=await t.get(l,{responseType:"json"});if(!c||!Array.isArray(c.list))break;o===0&&(i=_nullishCoalesce(c.total, () => (0)));let d=c.list.map(ts);if(r.push(...d),d.length===0)break;o++}while(r.length<i&&o<a);return r}function ts(t){return{code:t.dm||"",name:t.name||"",price:m(String(t.p)),change:m(String(t.zde)),changePercent:m(String(t.zdf)),open:m(String(t.o)),high:m(String(t.h)),low:m(String(t.l)),prevSettle:m(String(t.zjsj)),volume:m(String(t.vol)),buyVolume:m(String(t.wp)),sellVolume:m(String(t.np)),openInterest:m(String(t.ccl))}}function ns(t){let e=v(t),n=t.split(",");return{...e,openInterest:n.length>12?m(n[12]):null}}function rs(t){let e=t.match(/^([A-Z]+)/);if(!e)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid global futures symbol: "${t}". Expected format like HG00Y, CL2507`);return e[1]}async function zr(t,e,n={}){let{period:r="daily",startDate:o="19700101",endDate:i="20500101"}=n;q(r);let a=n.marketCode;if(a===void 0){let p=rs(e);if(a=Ge[p],a===void 0){let T=Object.keys(Ge).join(", ");throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown global futures variety: "${p}". Supported: ${T}. Or specify marketCode manually via options.`)}}let u=`${a}.${e}`,l=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64",ut:L,klt:z(r),fqt:"0",secid:u,beg:o,end:i}),{klines:c,name:d,code:y}=await K(t,Te,l);return c.length===0?[]:c.map(p=>({...ns(p),code:y||e,name:d||""}))}async function $r(t,e={}){let{pageSize:n=2e4}=e,r=new URLSearchParams({orderBy:"zdf",sort:"desc",pageSize:String(n),pageIndex:"0",token:he,field:"dm,sc,name,p,zsjd,zde,zdf,f152,vol,cje,ccl,xqj,syr,rz,zjsj,o"}),o=`${Yt}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _127 => _127.list]);return Array.isArray(a)?a.map(u=>({code:String(_nullishCoalesce(u.dm, () => (""))),name:String(_nullishCoalesce(u.name, () => (""))),price:s(u.p),change:s(u.zde),changePercent:s(u.zdf),volume:s(u.vol),amount:s(u.cje),openInterest:s(u.ccl),strikePrice:s(u.xqj),remainDays:s(u.syr),dailyChange:s(u.rz),prevSettle:s(u.zjsj),open:s(u.o)})):[]}async function Qr(t,e,n){let r=new URLSearchParams({type:"RPT_IF_BILLBOARD_TD",sty:"ALL",p:"1",ps:"200",source:"IFBILLBOARD",client:"WEB",ut:$,filter:`(SECURITY_CODE="${e}")(TRADE_DATE='${n}')`}),o=`${Wt}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _128 => _128.result, 'optionalAccess', async _129 => _129.data]);if(!Array.isArray(a))return[];function u(l){if(!l)return"";let c=String(l),d=c.match(/^(\d{4}-\d{2}-\d{2})/);return d?d[1]:c}return a.map(l=>({tradeType:String(_nullishCoalesce(l.TRADE_TYPE, () => (""))),date:u(l.TRADE_DATE),symbol:String(_nullishCoalesce(l.SECURITY_CODE, () => (""))),targetName:String(_nullishCoalesce(l.TARGET_NAME, () => (""))),memberName:String(_nullishCoalesce(l.MEMBER_NAME_ABBR, () => (""))),rank:_nullishCoalesce(s(l.MEMBER_RANK), () => (0)),sellVolume:s(l.SELL_VOLUME),sellVolumeChange:s(l.SELL_VOLUME_CHANGE),netSellVolume:s(l.NET_SELL_VOLUME),sellVolumeRatio:s(l.SELL_VOLUME_RATIO),buyVolume:s(l.BUY_VOLUME),buyVolumeChange:s(l.BUY_VOLUME_CHANGE),netBuyVolume:s(l.NET_BUY_VOLUME),buyVolumeRatio:s(l.BUY_VOLUME_RATIO),sellPosition:s(l.SELL_POSITION),sellPositionChange:s(l.SELL_POSITION_CHANGE),netSellPosition:s(l.NET_SELL_POSITION),sellPositionRatio:s(l.SELL_POSITION_RATIO),buyPosition:s(l.BUY_POSITION),buyPositionChange:s(l.BUY_POSITION_CHANGE),netBuyPosition:s(l.NET_BUY_POSITION),buyPositionRatio:s(l.BUY_POSITION_RATIO)}))}var os={gold:"EMI00069026",silver:"EMI00069027"};function jr(t){if(!t)return"";let e=String(t),n=e.match(/^(\d{4}-\d{2}-\d{2})/);return n?n[1]:e}async function Gr(t){return A(t,{reportName:"RPT_FUTU_POSITIONCODE",columns:"TRADE_MARKET_CODE,TRADE_CODE,TRADE_TYPE",filter:'(IS_MAINCODE="1")',pageSize:500,fetchAllPages:!1},e=>({code:String(_nullishCoalesce(e.TRADE_CODE, () => (""))),name:String(_nullishCoalesce(e.TRADE_TYPE, () => (""))),marketCode:String(_nullishCoalesce(e.TRADE_MARKET_CODE, () => ("")))}))}async function Yr(t,e,n={}){let{startDate:r="2020-10-28",pageSize:o=500}=n,i=e.toUpperCase();return A(t,{reportName:"RPT_FUTU_STOCKDATA",columns:"SECURITY_CODE,TRADE_DATE,ON_WARRANT_NUM,ADDCHANGE",filter:`(SECURITY_CODE="${i}")(TRADE_DATE>='${b(r)}')`,pageSize:o,sortColumns:"TRADE_DATE",sortTypes:"-1"},a=>({code:String(_nullishCoalesce(a.SECURITY_CODE, () => (e))),date:jr(a.TRADE_DATE),inventory:s(a.ON_WARRANT_NUM),change:s(a.ADDCHANGE)}))}async function Wr(t,e,n={}){let r=os[e];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid COMEX symbol: "${e}". Must be "gold" or "silver".`);let{pageSize:o=500}=n,i={gold:"\u9EC4\u91D1",silver:"\u767D\u94F6"};return A(t,{reportName:"RPT_FUTUOPT_GOLDSIL",sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:o,filter:`(INDICATOR_ID1="${r}")(@STORAGE_TON<>"NULL")`},a=>({date:jr(a.REPORT_DATE),name:_nullishCoalesce(i[e], () => (e)),storageTon:s(a.STORAGE_TON),storageOunce:s(a.STORAGE_OUNCE)}))}var Vr={daily:"101",weekly:"102",monthly:"103"},On="f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64,f65";function Xr(t){let e=t.split(",");return{date:_nullishCoalesce(e[0], () => ("")),mainNetInflow:m(e[1]),smallNetInflow:m(e[2]),mediumNetInflow:m(e[3]),largeNetInflow:m(e[4]),superLargeNetInflow:m(e[5]),mainNetInflowPercent:m(e[6]),smallNetInflowPercent:m(e[7]),mediumNetInflowPercent:m(e[8]),largeNetInflowPercent:m(e[9]),superLargeNetInflowPercent:m(e[10]),close:m(e[11]),changePercent:m(e[12])}}function is(t){let e=t.split(",");return{date:_nullishCoalesce(e[0], () => ("")),mainNetInflow:m(e[1]),smallNetInflow:m(e[2]),mediumNetInflow:m(e[3]),largeNetInflow:m(e[4]),superLargeNetInflow:m(e[5]),mainNetInflowPercent:m(e[6]),smallNetInflowPercent:m(e[7]),mediumNetInflowPercent:m(e[8]),largeNetInflowPercent:m(e[9]),superLargeNetInflowPercent:m(e[10]),shClose:m(e[11]),shChangePercent:m(e[12]),szClose:m(e[13]),szChangePercent:m(e[14])}}var Zr={today:{fid:"f62",fields:"f12,f14,f2,f3,f62,f184,f66,f69,f72,f75,f78,f81,f84,f87,f124",changePercentField:"f3",mainNet:"f62",mainPct:"f184",superLargeNet:"f66",superLargePct:"f69",largeNet:"f72",largePct:"f75",mediumNet:"f78",mediumPct:"f81",smallNet:"f84",smallPct:"f87"},"3day":{fid:"f267",fields:"f12,f14,f2,f127,f267,f268,f269,f270,f271,f272,f273,f274,f275,f276,f124",changePercentField:"f127",mainNet:"f267",mainPct:"f268",superLargeNet:"f269",superLargePct:"f270",largeNet:"f271",largePct:"f272",mediumNet:"f273",mediumPct:"f274",smallNet:"f275",smallPct:"f276"},"5day":{fid:"f164",fields:"f12,f14,f2,f109,f164,f165,f166,f167,f168,f169,f170,f171,f172,f173,f124",changePercentField:"f109",mainNet:"f164",mainPct:"f165",superLargeNet:"f166",superLargePct:"f167",largeNet:"f168",largePct:"f169",mediumNet:"f170",mediumPct:"f171",smallNet:"f172",smallPct:"f173"},"10day":{fid:"f174",fields:"f12,f14,f2,f160,f174,f175,f176,f177,f178,f179,f180,f181,f182,f183,f124",changePercentField:"f160",mainNet:"f174",mainPct:"f175",superLargeNet:"f176",superLargePct:"f177",largeNet:"f178",largePct:"f179",mediumNet:"f180",mediumPct:"f181",smallNet:"f182",smallPct:"f183"}},ss={industry:"m:90+t:2",concept:"m:90+t:3",region:"m:90+t:1"},as="m:0+t:6+f:!2,m:0+t:13+f:!2,m:0+t:80+f:!2,m:1+t:2+f:!2,m:1+t:23+f:!2,m:0+t:7+f:!2,m:1+t:3+f:!2";async function Jr(t,e,n=100,r=1e3){let o=[],i=1,a=0;do{let u=new URLSearchParams({...e,pn:String(i),pz:String(n)}),l=`${Bt}?${u.toString()}`,d=await _asyncOptionalChain([(await t.get(l,{responseType:"json"})), 'optionalAccess', async _130 => _130.data]);if(!d||!Array.isArray(d.diff)||(i===1&&(a=_nullishCoalesce(d.total, () => (0))),o.push(...d.diff),o.length>=a||d.diff.length<n))break;i++}while(o.length<a&&i<=r);return i>r&&o.length<a&&console.warn(`[stock-sdk] fetchClistAllPages truncated at maxPages=${r} (server reports total=${a}, fetched=${o.length}). Pass a larger \`maxPages\` to fetch the full dataset.`),o}async function eo(t,e,n={}){let{period:r="daily"}=n,o=Vr[r];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}. Must be daily/weekly/monthly.`);let i=_chunk3NSUE34Fcjs.h.call(void 0, _chunk3NSUE34Fcjs.d.call(void 0, e,{market:"CN"})),a=new URLSearchParams({lmt:"0",klt:o,secid:i,fields1:"f1,f2,f3,f7",fields2:On,ut:$}),u=`${fe}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _131 => _131.data, 'optionalAccess', async _132 => _132.klines]);return!Array.isArray(c)||c.length===0?[]:c.map(Xr)}async function to(t){let e=new URLSearchParams({lmt:"0",klt:"101",secid:"1.000001",secid2:"0.399001",fields1:"f1,f2,f3,f7",fields2:On,ut:$}),n=`${fe}?${e.toString()}`,o=await _asyncOptionalChain([(await t.get(n,{responseType:"json"})), 'optionalAccess', async _133 => _133.data, 'optionalAccess', async _134 => _134.klines]);return!Array.isArray(o)||o.length===0?[]:o.map(is)}async function no(t,e={}){let{indicator:n="today"}=e,r=Zr[n];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid indicator: ${n}.`);let o={fid:r.fid,po:"1",np:"1",fltt:"2",invt:"2",ut:$,fs:as,fields:r.fields};return(await Jr(t,o,100)).map(a=>({code:String(_nullishCoalesce(a.f12, () => (""))),name:String(_nullishCoalesce(a.f14, () => (""))),price:s(a.f2),changePercent:s(a[r.changePercentField]),mainNetInflow:s(a[r.mainNet]),mainNetInflowPercent:s(a[r.mainPct]),superLargeNetInflow:s(a[r.superLargeNet]),superLargeNetInflowPercent:s(a[r.superLargePct]),largeNetInflow:s(a[r.largeNet]),largeNetInflowPercent:s(a[r.largePct]),mediumNetInflow:s(a[r.mediumNet]),mediumNetInflowPercent:s(a[r.mediumPct]),smallNetInflow:s(a[r.smallNet]),smallNetInflowPercent:s(a[r.smallPct])}))}async function ro(t,e={}){let{indicator:n="today",sectorType:r="industry"}=e,o=Zr[n];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid indicator: ${n}.`);let i=ss[r];if(!i)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid sectorType: ${r}.`);let a=`${o.fields},f204,f205`,u={fid:o.fid,po:"1",np:"1",fltt:"2",invt:"2",ut:$,fs:i,fields:a};return(await Jr(t,u,100)).map(c=>({code:String(_nullishCoalesce(c.f12, () => (""))),name:String(_nullishCoalesce(c.f14, () => (""))),changePercent:s(c[o.changePercentField]),mainNetInflow:s(c[o.mainNet]),mainNetInflowPercent:s(c[o.mainPct]),superLargeNetInflow:s(c[o.superLargeNet]),largeNetInflow:s(c[o.largeNet]),mediumNetInflow:s(c[o.mediumNet]),smallNetInflow:s(c[o.smallNet]),topStockCode:c.f204?String(c.f204):void 0,topStockName:c.f205?String(c.f205):void 0}))}async function oo(t,e,n={}){let{period:r="daily"}=n,o=Vr[r];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}. Must be daily/weekly/monthly.`);let i=e.includes(".")?e:`90.${e}`,a=new URLSearchParams({lmt:"0",klt:o,secid:i,fields1:"f1,f2,f3,f7",fields2:On,ut:$}),u=`${fe}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _135 => _135.data, 'optionalAccess', async _136 => _136.klines]);return!Array.isArray(c)||c.length===0?[]:c.map(Xr)}var us={today:"1","3day":"3","5day":"5","10day":"10",month:"M",quarter:"Q",year:"Y"},ls={shanghai:"001",shenzhen:"003"};function io(t,e){let n=t.split(",");return{date:e,time:_nullishCoalesce(n[0], () => ("")),shanghaiNetInflow:m(n[1]),shenzhenNetInflow:m(n[3]),totalNetInflow:m(n[5])}}async function so(t,e="north"){He(e);let n=new URLSearchParams({fields1:"f1,f2,f3,f4",fields2:"f51,f54,f52,f58,f53,f62,f56,f57,f60,f61",ut:$}),r=`${Ht}?${n.toString()}`,i=await _asyncOptionalChain([(await t.get(r,{responseType:"json"})), 'optionalAccess', async _137 => _137.data]);if(!i)return[];if(e==="south"){let l=_nullishCoalesce(i.n2s, () => ([])),c=_nullishCoalesce(i.n2sDate, () => (""));return l.map(d=>io(d,b(c)))}let a=_nullishCoalesce(i.s2n, () => ([])),u=_nullishCoalesce(i.s2nDate, () => (""));return a.map(l=>io(l,b(u)))}async function ao(t){return A(t,{reportName:"RPT_MUTUAL_QUOTA",columns:"TRADE_DATE,MUTUAL_TYPE,BOARD_TYPE,MUTUAL_TYPE_NAME,FUNDS_DIRECTION,INDEX_CODE,INDEX_NAME,BOARD_CODE",quoteColumns:"status~07~BOARD_CODE,dayNetAmtIn~07~BOARD_CODE,dayAmtRemain~07~BOARD_CODE,dayAmtThreshold~07~BOARD_CODE,f104~07~BOARD_CODE,f105~07~BOARD_CODE,f106~07~BOARD_CODE,f3~03~INDEX_CODE~INDEX_f3,netBuyAmt~07~BOARD_CODE",quoteType:"0",sortColumns:"MUTUAL_TYPE",sortTypes:"1",pageSize:2e3,fetchAllPages:!1},e=>({date:F(e.TRADE_DATE),type:String(_nullishCoalesce(e.MUTUAL_TYPE, () => (""))),boardName:String(_nullishCoalesce(e.MUTUAL_TYPE_NAME, () => (""))),direction:String(_nullishCoalesce(e.FUNDS_DIRECTION, () => (""))),status:String(_nullishCoalesce(e.status, () => (""))),netBuyAmount:s(e.netBuyAmt),netInflow:s(e.dayNetAmtIn),remainAmount:s(e.dayAmtRemain),upCount:s(e.f104),flatCount:s(e.f106),downCount:s(e.f105),indexCode:String(_nullishCoalesce(e.INDEX_CODE, () => (""))),indexName:String(_nullishCoalesce(e.INDEX_NAME, () => (""))),indexChangePercent:s(e.INDEX_f3)}))}async function uo(t,e={}){let{market:n="all",period:r="5day",date:o}=e,i=us[r];if(!i)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}.`);let a=[`(INTERVAL_TYPE="${i}")`];return o&&a.push(`(TRADE_DATE='${o}')`),n!=="all"&&a.push(`(MUTUAL_TYPE="${ls[n]}")`),A(t,{reportName:"RPT_MUTUAL_STOCK_NORTHSTA",columns:"ALL",sortColumns:"ADD_MARKET_CAP",sortTypes:"-1",pageSize:500,filter:a.join("")},u=>({date:F(u.TRADE_DATE),code:String(_nullishCoalesce(u.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(_nullishCoalesce(u.SECURITY_NAME, () => (u.SECURITY_NAME_ABBR)), () => (""))),close:s(u.CLOSE_PRICE),changePercent:s(u.CHANGE_RATE),holdShares:s(u.HOLD_SHARES),holdMarketValue:s(u.HOLD_MARKET_CAP),holdRatioFloat:s(u.HOLD_RATIO),holdRatioTotal:s(u.A_SHARES_RATIO),addShares:s(u.ADD_SHARES),addMarketValue:s(u.ADD_MARKET_CAP),addMarketValuePercent:s(u.ADD_MARKET_CAP_PROPORTION),sector:String(_nullishCoalesce(u.BOARD_NAME, () => ("")))}))}async function lo(t,e="north",n={}){He(e);let{startDate:r,endDate:o}=n,i=[e==="north"?'(BOARD_TYPE="1")':'(BOARD_TYPE="0")'];return r&&i.push(`(TRADE_DATE>='${b(r)}')`),o&&i.push(`(TRADE_DATE<='${b(o)}')`),A(t,{reportName:"RPT_MUTUAL_DEAL_HISTORY",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500,filter:i.join("")},a=>({date:F(a.TRADE_DATE),netBuyAmount:s(a.NET_DEAL_AMT),buyAmount:s(a.BUY_AMT),sellAmount:s(a.SELL_AMT),accNetBuyAmount:s(a.ACCUM_DEAL_AMT),netInflow:s(a.FUND_INFLOW),remainAmount:s(a.QUOTA_BALANCE),topStockCode:a.LEAD_STOCKS_CODE?String(a.LEAD_STOCKS_CODE):null,topStockName:a.LEAD_STOCKS_NAME?String(a.LEAD_STOCKS_NAME):null,topStockChangePercent:s(a.LS_CHANGE_RATE)}))}async function co(t,e,n={}){let r=e.replace(/^(sh|sz|bj)/i,""),{startDate:o,endDate:i}=n,a=[`(SECURITY_CODE="${r}")`];return o&&a.push(`(TRADE_DATE>='${b(o)}')`),i&&a.push(`(TRADE_DATE<='${b(i)}')`),A(t,{reportName:"RPT_MUTUAL_HOLDSTOCKNORTH_STA",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500,filter:a.join("")},u=>({date:F(u.TRADE_DATE),holdShares:s(u.HOLD_SHARES),holdMarketValue:s(u.HOLD_MARKET_CAP),holdRatioFloat:s(u.HOLD_RATIO),holdRatioTotal:s(u.A_SHARES_RATIO),close:s(u.CLOSE_PRICE),changePercent:s(u.CHANGE_RATE)}))}var cs={zt:{path:"/getTopicZTPool",sort:"fbt:asc"},yesterday:{path:"/getYesterdayZTPool",sort:"zs:desc"},strong:{path:"/getTopicQSPool",sort:"zdp:desc"},sub_new:{path:"/getTopicCXPool",sort:"ods:asc"},broken:{path:"/getTopicZBPool",sort:"fbt:asc"},dt:{path:"/getTopicDTPool",sort:"fund:asc"}},ds={rocket_launch:"8201",quick_rebound:"8202",large_buy:"8193",limit_up_seal:"4",limit_down_open:"32",big_buy_order:"64",auction_up:"8207",high_open_5d:"8209",gap_up:"8211",high_60d:"8213",surge_60d:"8215",accelerate_down:"8204",high_dive:"8203",large_sell:"8194",limit_down_seal:"8",limit_up_open:"16",big_sell_order:"128",auction_down:"8208",low_open_5d:"8210",gap_down:"8212",low_60d:"8214",drop_60d:"8216"},ps={8201:"\u706B\u7BAD\u53D1\u5C04",8202:"\u5FEB\u901F\u53CD\u5F39",8193:"\u5927\u7B14\u4E70\u5165",4:"\u5C01\u6DA8\u505C\u677F",32:"\u6253\u5F00\u8DCC\u505C\u677F",64:"\u6709\u5927\u4E70\u76D8",8207:"\u7ADE\u4EF7\u4E0A\u6DA8",8209:"\u9AD8\u5F005\u65E5\u7EBF",8211:"\u5411\u4E0A\u7F3A\u53E3",8213:"60\u65E5\u65B0\u9AD8",8215:"60\u65E5\u5927\u5E45\u4E0A\u6DA8",8204:"\u52A0\u901F\u4E0B\u8DCC",8203:"\u9AD8\u53F0\u8DF3\u6C34",8194:"\u5927\u7B14\u5356\u51FA",8:"\u5C01\u8DCC\u505C\u677F",16:"\u6253\u5F00\u6DA8\u505C\u677F",128:"\u6709\u5927\u5356\u76D8",8208:"\u7ADE\u4EF7\u4E0B\u8DCC",8210:"\u4F4E\u5F005\u65E5\u7EBF",8212:"\u5411\u4E0B\u7F3A\u53E3",8214:"60\u65E5\u65B0\u4F4E",8216:"60\u65E5\u5927\u5E45\u4E0B\u8DCC"};function Pn(t){if(t==null)return"";let e=String(t).padStart(6,"0");return`${e.slice(0,2)}:${e.slice(2,4)}:${e.slice(4,6)}`}function ms(t){if(!t||typeof t!="object")return"";let e=t;return`${_nullishCoalesce(e.days, () => (""))}/${_nullishCoalesce(e.ct, () => (""))}`}function gs(t){let e=s(t.p),n=s(t.tp);return{code:String(_nullishCoalesce(_nullishCoalesce(t.c, () => (t.m)), () => (""))),name:String(_nullishCoalesce(t.n, () => (""))),price:e!==null?e/1e3:null,changePercent:s(t.zdp),limitPrice:n!==null?n/1e3:null,amount:s(_nullishCoalesce(t.amount, () => (t.zb))),floatMarketValue:s(t.ltsz),totalMarketValue:s(t.tshare),turnoverRate:s(t.hs),continuousBoardCount:s(t.lbc),firstBoardTime:t.fbt!==void 0&&t.fbt!==null?Pn(t.fbt):null,lastBoardTime:t.lbt!==void 0&&t.lbt!==null?Pn(t.lbt):null,boardAmount:s(t.fund),sealAmount:s(t.fund),failedCount:s(t.zbc),industry:String(_nullishCoalesce(t.hybk, () => (""))),ztStatistics:ms(t.zttj),amplitude:s(t.zf),speed:s(t.zs)}}function fs(t){if(t)return/^\d{8}$/.test(t)?t:t.replace(/-/g,"")}function ys(){return Y(E.CN).replace(/-/g,"")}async function po(t,e="zt",n){let r=cs[e];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid ZTPool type: ${e}.`);let o=_nullishCoalesce(fs(n), () => (ys())),i=new URLSearchParams({ut:L,dpt:"wz.ztzt",Pageindex:"0",pagesize:"10000",sort:r.sort,date:o}),a=`${ye}${r.path}?${i.toString()}`,l=await _asyncOptionalChain([(await t.get(a,{responseType:"json"})), 'optionalAccess', async _138 => _138.data, 'optionalAccess', async _139 => _139.pool]);return!Array.isArray(l)||l.length===0?[]:l.map(gs)}async function mo(t,e="large_buy"){let n=ds[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid StockChangeType: ${e}.`);let r=new URLSearchParams({type:n,pageindex:"0",pagesize:"5000",ut:L,dpt:"wzchanges"}),o=`${ye}/getAllStockChanges?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _140 => _140.data, 'optionalAccess', async _141 => _141.allstock]);return!Array.isArray(a)||a.length===0?[]:a.map(u=>{let l=String(_nullishCoalesce(u.t, () => (n)));return{time:Pn(u.tm),code:String(_nullishCoalesce(u.c, () => (""))),name:String(_nullishCoalesce(u.n, () => (""))),changeType:e,changeTypeLabel:_nullishCoalesce(ps[l], () => ("")),info:String(_nullishCoalesce(u.i, () => ("")))}})}async function go(t){let e=new URLSearchParams({ut:L,dpt:"wzchanges",pageindex:"0",pagesize:"5000"}),n=`${ye}/getAllBKChanges?${e.toString()}`,o=await _asyncOptionalChain([(await t.get(n,{responseType:"json"})), 'optionalAccess', async _142 => _142.data, 'optionalAccess', async _143 => _143.allbk]);return!Array.isArray(o)||o.length===0?[]:o.map(i=>{let a=_nullishCoalesce(i.ms, () => ({})),u=a.m===0?"\u5927\u7B14\u4E70\u5165":a.m===1?"\u5927\u7B14\u5356\u51FA":"",l={},c=_nullishCoalesce(i.bkdf, () => (i.bkdfdis));if(c&&typeof c=="object")for(let[d,y]of Object.entries(c))l[d]=Number(y)||0;return{name:String(_nullishCoalesce(i.bkn, () => (""))),changePercent:s(i.bkz),mainNetInflow:s(i.bkj),totalChangeCount:s(i.bkc),topStockCode:String(_nullishCoalesce(a.c, () => (""))),topStockName:String(_nullishCoalesce(a.n, () => (""))),topStockDirection:u,changeTypeDistribution:l}})}var fo={"1month":"01","3month":"02","6month":"03","1year":"04"};async function yo(t,e){let n=b(e.startDate),r=b(e.endDate);return A(t,{reportName:"RPT_DAILYBILLBOARD_DETAILSNEW",columns:"SECURITY_CODE,SECUCODE,SECURITY_NAME_ABBR,TRADE_DATE,EXPLAIN,CLOSE_PRICE,CHANGE_RATE,BILLBOARD_NET_AMT,BILLBOARD_BUY_AMT,BILLBOARD_SELL_AMT,BILLBOARD_DEAL_AMT,ACCUM_AMOUNT,DEAL_NET_RATIO,DEAL_AMOUNT_RATIO,TURNOVERRATE,FREE_MARKET_CAP,EXPLANATION,D1_CLOSE_ADJCHRATE,D2_CLOSE_ADJCHRATE,D5_CLOSE_ADJCHRATE,D10_CLOSE_ADJCHRATE",sortColumns:"SECURITY_CODE,TRADE_DATE",sortTypes:"1,-1",pageSize:5e3,filter:`(TRADE_DATE<='${r}')(TRADE_DATE>='${n}')`},o=>({code:String(_nullishCoalesce(o.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(o.SECURITY_NAME_ABBR, () => (""))),date:F(o.TRADE_DATE),close:s(o.CLOSE_PRICE),changePercent:s(o.CHANGE_RATE),netBuyAmount:s(o.BILLBOARD_NET_AMT),buyAmount:s(o.BILLBOARD_BUY_AMT),sellAmount:s(o.BILLBOARD_SELL_AMT),dealAmount:s(o.BILLBOARD_DEAL_AMT),totalAmount:s(o.ACCUM_AMOUNT),netBuyRatio:s(o.DEAL_NET_RATIO),dealAmountRatio:s(o.DEAL_AMOUNT_RATIO),turnoverRate:s(o.TURNOVERRATE),floatMarketValue:s(o.FREE_MARKET_CAP),reason:String(_nullishCoalesce(_nullishCoalesce(o.EXPLANATION, () => (o.EXPLAIN)), () => (""))),afterChange1d:s(o.D1_CLOSE_ADJCHRATE),afterChange2d:s(o.D2_CLOSE_ADJCHRATE),afterChange5d:s(o.D5_CLOSE_ADJCHRATE),afterChange10d:s(o.D10_CLOSE_ADJCHRATE)}))}async function To(t,e="1month"){let n=fo[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${e}.`);return A(t,{reportName:"RPT_BILLBOARD_TRADEALL",columns:"ALL",sortColumns:"BILLBOARD_TIMES,LATEST_TDATE,SECURITY_CODE",sortTypes:"-1,-1,1",pageSize:5e3,filter:`(STATISTICS_CYCLE="${n}")`},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),latestDate:F(r.LATEST_TDATE),close:s(r.CLOSE_PRICE),changePercent:s(r.CHANGE_RATE),count:s(r.BILLBOARD_TIMES),totalBuyAmount:s(r.BILLBOARD_BUY_AMT),totalSellAmount:s(r.BILLBOARD_SELL_AMT),totalNetAmount:s(r.BILLBOARD_NET_AMT),totalDealAmount:s(r.BILLBOARD_DEAL_AMT),buyOrgCount:s(r.ORG_BUY_TIMES),sellOrgCount:s(r.ORG_SELL_TIMES)}))}async function ho(t,e){let n=b(e.startDate),r=b(e.endDate);return A(t,{reportName:"RPT_ORGANIZATION_TRADE_DETAILS",columns:"ALL",sortColumns:"TRADE_DATE,SECURITY_CODE",sortTypes:"-1,1",pageSize:5e3,filter:`(TRADE_DATE<='${r}')(TRADE_DATE>='${n}')`},o=>({code:String(_nullishCoalesce(o.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(o.SECURITY_NAME_ABBR, () => (""))),date:F(o.TRADE_DATE),close:s(o.CLOSE_PRICE),changePercent:s(o.CHANGE_RATE),buyOrgCount:s(o.BUY_TIMES),sellOrgCount:s(o.SELL_TIMES),orgBuyAmount:s(o.BUY_AMT),orgSellAmount:s(o.SELL_AMT),orgNetAmount:s(o.NET_AMT)}))}async function So(t,e="1month"){let n=fo[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${e}.`);return A(t,{reportName:"RPT_BILLBOARD_TRADEDETAILS",columns:"ALL",sortColumns:"TOTAL_BUYER_SALESTIMES",sortTypes:"-1",pageSize:5e3,filter:`(STATISTICS_CYCLE="${n}")`},r=>({code:String(_nullishCoalesce(r.OPERATEDEPT_CODE, () => (""))),name:String(_nullishCoalesce(r.OPERATEDEPT_NAME, () => (""))),totalBuyAmount:s(_nullishCoalesce(r.TOTAL_BUYAMT, () => (r.BUY_AMT))),totalSellAmount:s(_nullishCoalesce(r.TOTAL_SELLAMT, () => (r.SELL_AMT))),buyCount:s(_nullishCoalesce(r.TOTAL_BUYER_SALESTIMES, () => (r.BUY_TIMES))),sellCount:s(_nullishCoalesce(r.TOTAL_SELLER_SALESTIMES, () => (r.SELL_TIMES))),totalCount:s(r.TOTAL_TIMES)}))}async function Eo(t,e,n){let r=e.replace(/^(sh|sz|bj)/i,""),o=b(n),i=`(SECURITY_CODE="${r}")(TRADE_DATE='${o}')`,[a,u]=await Promise.all([A(t,{reportName:"RPT_BILLBOARD_DAILYDETAILSBUY",columns:"ALL",sortColumns:"BUY_AMT_REAL",sortTypes:"-1",pageSize:100,filter:i},(l,c)=>({rank:_nullishCoalesce(s(l.RANK), () => (c+1)),branchName:String(_nullishCoalesce(l.OPERATEDEPT_NAME, () => (""))),buyAmount:s(_nullishCoalesce(l.BUY_AMT_REAL, () => (l.BUY_AMT))),buyAmountRatio:s(_nullishCoalesce(l.BUY_RATIO_TOTAL, () => (l.BUY_AMT_RATIO))),sellAmount:s(_nullishCoalesce(l.SELL_AMT_REAL, () => (l.SELL_AMT))),sellAmountRatio:s(_nullishCoalesce(l.SELL_RATIO_TOTAL, () => (l.SELL_AMT_RATIO))),netAmount:s(l.NET_AMT),side:"buy"})),A(t,{reportName:"RPT_BILLBOARD_DAILYDETAILSSELL",columns:"ALL",sortColumns:"SELL_AMT_REAL",sortTypes:"-1",pageSize:100,filter:i},(l,c)=>({rank:_nullishCoalesce(s(l.RANK), () => (c+1)),branchName:String(_nullishCoalesce(l.OPERATEDEPT_NAME, () => (""))),buyAmount:s(_nullishCoalesce(l.BUY_AMT_REAL, () => (l.BUY_AMT))),buyAmountRatio:s(_nullishCoalesce(l.BUY_RATIO_TOTAL, () => (l.BUY_AMT_RATIO))),sellAmount:s(_nullishCoalesce(l.SELL_AMT_REAL, () => (l.SELL_AMT))),sellAmountRatio:s(_nullishCoalesce(l.SELL_RATIO_TOTAL, () => (l.SELL_AMT_RATIO))),netAmount:s(l.NET_AMT),side:"sell"}))]);return[...a,...u]}function Ro(t){if(!t)return"";let e=t.startDate?b(t.startDate):void 0,n=t.endDate?b(t.endDate):void 0,r=[];return e&&r.push(`(TRADE_DATE>='${e}')`),n&&r.push(`(TRADE_DATE<='${n}')`),r.join("")}async function _o(t){return A(t,{reportName:"PRT_BLOCKTRADE_MARKET_STA",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500},e=>({date:F(e.TRADE_DATE),shClose:s(_nullishCoalesce(e.CLOSE_PRICE, () => (e.SH_CLOSE_PRICE))),shChangePercent:s(_nullishCoalesce(e.CHANGE_RATE, () => (e.SH_CHANGE_RATE))),totalAmount:s(_nullishCoalesce(e.TURNOVER, () => (e.TOTAL_AMOUNT))),premiumAmount:s(_nullishCoalesce(e.PREMIUM_TURNOVER, () => (e.PREMIUM_AMOUNT))),premiumRatio:s(e.PREMIUM_RATIO),discountAmount:s(_nullishCoalesce(e.DISCOUNT_TURNOVER, () => (e.DISCOUNT_AMOUNT))),discountRatio:s(e.DISCOUNT_RATIO)}))}async function Co(t,e={}){let n=Ro(e);return A(t,{reportName:"RPT_BLOCK_TRADE_DETAIL",columns:"ALL",sortColumns:"TRADE_DATE,SECURITY_CODE",sortTypes:"-1,1",pageSize:5e3,filter:n||void 0},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:F(r.TRADE_DATE),close:s(r.CLOSE_PRICE),changePercent:s(r.CHANGE_RATE),dealPrice:s(_nullishCoalesce(r.DEAL_PRICE, () => (r.PRICE))),dealVolume:s(_nullishCoalesce(r.DEAL_VOLUME, () => (r.VOLUME))),dealAmount:s(_nullishCoalesce(r.DEAL_AMT, () => (r.TURNOVER))),premiumRate:s(_nullishCoalesce(r.PREMIUM_RATIO, () => (r.PREMIUM_RATE))),buyBranch:String(_nullishCoalesce(_nullishCoalesce(r.BUYER_DEPT, () => (r.BUYER_OPERATEDEPT_NAME)), () => (""))),sellBranch:String(_nullishCoalesce(_nullishCoalesce(r.SELLER_DEPT, () => (r.SELLER_OPERATEDEPT_NAME)), () => ("")))}))}async function Ao(t,e={}){let n=Ro(e);return A(t,{reportName:"RPT_BLOCK_TRADE_STA",columns:"ALL",sortColumns:"TRADE_DATE,DEAL_AMT",sortTypes:"-1,-1",pageSize:5e3,filter:n||void 0},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:F(r.TRADE_DATE),changePercent:s(r.CHANGE_RATE),close:s(r.CLOSE_PRICE),dealCount:s(_nullishCoalesce(r.DEAL_NUM, () => (r.DEAL_COUNT))),dealTotalAmount:s(_nullishCoalesce(r.DEAL_AMT, () => (r.TOTAL_AMOUNT))),dealTotalVolume:s(_nullishCoalesce(r.DEAL_VOLUME, () => (r.TOTAL_VOLUME))),premiumAmount:s(_nullishCoalesce(r.PREMIUM_AMT, () => (r.PREMIUM_AMOUNT))),discountAmount:s(_nullishCoalesce(r.DISCOUNT_AMT, () => (r.DISCOUNT_AMOUNT)))}))}async function Oo(t){return A(t,{reportName:"RPTA_WEB_MARGIN_DAILYTRADE",columns:"ALL",sortColumns:"STATISTICS_DATE",sortTypes:"-1",pageSize:500},e=>({date:F(_nullishCoalesce(e.STATISTICS_DATE, () => (e.TRADE_DATE))),finBalance:s(e.FIN_BALANCE),loanBalance:s(e.LOAN_BALANCE),finBuyAmount:s(e.FIN_BUY_AMT),loanSellAmount:s(e.LOAN_SELL_AMT),investorCount:s(_nullishCoalesce(e.OPERATE_INVESTOR_NUM, () => (e.INVESTOR_NUM))),liabilityInvestorCount:s(e.MARGIN_INVESTOR_NUM),totalGuarantee:s(e.TOTAL_GUARANTEE),avgGuaranteeRatio:s(e.AVG_GUARANTEE_RATIO)}))}async function Po(t,e){let n=e?`(TRADE_DATE='${e}')`:void 0;return A(t,{reportName:"RPT_MARGIN_TRADE_DETAIL",columns:"ALL",sortColumns:"FIN_BALANCE",sortTypes:"-1",pageSize:5e3,filter:n},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:F(r.TRADE_DATE),finBalance:s(r.FIN_BALANCE),finBuyAmount:s(r.FIN_BUY_AMT),finRepayAmount:s(r.FIN_REPAY_AMT),loanBalance:s(r.LOAN_BALANCE),loanSellVolume:s(r.LOAN_SELL_VOLUME),loanRepayVolume:s(r.LOAN_REPAY_VOLUME)}))}var B={};_chunk4VDLQK6Fcjs.a.call(void 0, B,{getCommodityOptionKline:()=>Uo,getCommodityOptionSpot:()=>xo,getETFOption5DayMinute:()=>Fo,getETFOptionDailyKline:()=>Lo,getETFOptionExpireDay:()=>Mo,getETFOptionMinute:()=>ko,getETFOptionMonths:()=>bo,getIndexOptionKline:()=>Io,getIndexOptionSpot:()=>Do});function Ts(t){return{buyVolume:s(t[0]),buyPrice:s(t[1]),price:s(t[2]),askPrice:s(t[3]),askVolume:s(t[4]),openInterest:s(t[5]),change:s(t[6]),strikePrice:s(t[7]),symbol:_nullishCoalesce(t[8], () => (""))}}function hs(t){return{buyVolume:s(t[0]),buyPrice:s(t[1]),price:s(t[2]),askPrice:s(t[3]),askVolume:s(t[4]),openInterest:s(t[5]),change:s(t[6]),strikePrice:null,symbol:_nullishCoalesce(t[7], () => (""))}}async function Do(t,e){let n=`${Se}?type=futures&product=${t}&exchange=cffex&pinzhong=${e}`,r=await x(n),o=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _144 => _144.result, 'optionalAccess', _145 => _145.data, 'optionalAccess', _146 => _146.up]), () => ([])),i=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _147 => _147.result, 'optionalAccess', _148 => _148.data, 'optionalAccess', _149 => _149.down]), () => ([]));return{calls:o.map(Ts),puts:i.map(hs)}}async function Io(t){let e=`${Ee}?symbol=${t}`,n=await x(e,{callbackMode:"path"});return Array.isArray(n)?n.map(r=>({date:r.d,open:s(r.o),high:s(r.h),low:s(r.l),close:s(r.c),volume:s(r.v)})):[]}async function bo(t){let e=`${$t}?exchange=null&cate=${encodeURIComponent(t)}`,r=await _asyncOptionalChain([(await x(e)), 'optionalAccess', async _150 => _150.result, 'optionalAccess', async _151 => _151.data]),o=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _152 => _152.contractMonth]), () => ([]));return{months:o.length>1?o.slice(1):o,stockId:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _153 => _153.stockId]), () => ("")),cateId:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _154 => _154.cateId]), () => ("")),cateList:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _155 => _155.cateList]), () => ([]))}}async function Mo(t,e){let n=`${Ye}?exchange=null&cate=${encodeURIComponent(t)}&date=${e}`,r=await x(n),o=_optionalChain([r, 'optionalAccess', _156 => _156.result, 'optionalAccess', _157 => _157.data, 'optionalAccess', _158 => _158.remainderDays]);if(typeof o=="number"&&o<0){let a=`${Ye}?exchange=null&cate=${encodeURIComponent("XD"+t)}&date=${e}`;r=await x(a)}let i=_optionalChain([r, 'optionalAccess', _159 => _159.result, 'optionalAccess', _160 => _160.data]);return{expireDay:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _161 => _161.expireDay]), () => ("")),remainderDays:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _162 => _162.remainderDays]), () => (0)),stockId:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _163 => _163.stockId]), () => ("")),name:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _164 => _164.other, 'optionalAccess', _165 => _165.name]), () => (""))}}function No(t){let e="";return t.map(n=>(n.d&&(e=n.d),{time:n.i,date:e,price:s(n.p),volume:s(n.v),openInterest:s(n.t),avgPrice:s(n.a)}))}async function ko(t){let e=`CON_OP_${t}`,n=`${Qt}?symbol=${e}`,o=await _asyncOptionalChain([(await x(n)), 'optionalAccess', async _166 => _166.result, 'optionalAccess', async _167 => _167.data]);return Array.isArray(o)?No(o):[]}async function Lo(t){let e=`CON_OP_${t}`,n=`${jt}?symbol=${e}`,r=await x(n,{callbackMode:"path"});return Array.isArray(r)?r.map(o=>({date:o.d,open:s(o.o),high:s(o.h),low:s(o.l),close:s(o.c),volume:s(o.v)})):[]}async function Fo(t){let e=`CON_OP_${t}`,n=`${Gt}?symbol=${e}`,o=await _asyncOptionalChain([(await x(n)), 'optionalAccess', async _168 => _168.result, 'optionalAccess', async _169 => _169.data]);if(!Array.isArray(o))return[];let i=[];for(let a of o)Array.isArray(a)&&i.push(...No(a));return i}function Ss(t){return{buyVolume:s(t[0]),buyPrice:s(t[1]),price:s(t[2]),askPrice:s(t[3]),askVolume:s(t[4]),openInterest:s(t[5]),change:s(t[6]),strikePrice:s(t[7]),symbol:_nullishCoalesce(t[8], () => (""))}}function Es(t){return{buyVolume:s(t[0]),buyPrice:s(t[1]),price:s(t[2]),askPrice:s(t[3]),askVolume:s(t[4]),openInterest:s(t[5]),change:s(t[6]),strikePrice:null,symbol:_nullishCoalesce(t[7], () => (""))}}async function xo(t,e){let n=We[t];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown commodity option variety: "${t}". Available: ${Object.keys(We).join(", ")}`);let r=`${Se}?type=futures&product=${n.product}&exchange=${n.exchange}&pinzhong=${e}`,o=await x(r),i=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _170 => _170.result, 'optionalAccess', _171 => _171.data, 'optionalAccess', _172 => _172.up]), () => ([])),a=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _173 => _173.result, 'optionalAccess', _174 => _174.data, 'optionalAccess', _175 => _175.down]), () => ([]));return{calls:i.map(Ss),puts:a.map(Es)}}async function Uo(t){let e=`${Ee}?symbol=${t}`,n=await x(e,{callbackMode:"path"});return Array.isArray(n)?n.map(r=>({date:r.d,open:s(r.o),high:s(r.h),low:s(r.l),close:s(r.c),volume:s(r.v)})):[]}var D=class{constructor(e){this.client=e}};var Ie=class extends D{constructor(e){super(e)}getFundDividendList(e){return g.getFundDividendList(this.client,e)}getFundNavHistory(e){return g.getFundNavHistory(this.client,e)}getFundEstimate(e){return g.getFundEstimate(this.client,e)}getFundRankHistory(e){return g.getFundRankHistory(this.client,e)}getFundProfile(e){return g.getFundProfile(this.client,e)}};var be=class extends D{constructor(e){super(e)}getFullQuotes(e){return I.getFullQuotes(this.client,e)}getSimpleQuotes(e){return I.getSimpleQuotes(this.client,e)}getHKQuotes(e){return I.getHKQuotes(this.client,e)}getUSQuotes(e){return I.getUSQuotes(this.client,e)}getFundQuotes(e){return I.getFundQuotes(this.client,e)}getFundFlow(e){return I.getFundFlow(this.client,e)}getPanelLargeOrder(e){return I.getPanelLargeOrder(this.client,e)}getTodayTimeline(e){return I.getTodayTimeline(this.client,e)}search(e){return I.search(this.client,e)}getAShareCodeList(e){return I.getAShareCodeList(this.client,e)}getUSCodeList(e){return I.getUSCodeList(this.client,e)}getHKCodeList(){return I.getHKCodeList(this.client)}getFundCodeList(){return I.getFundCodeList(this.client)}async getAllAShareQuotes(e={}){let{market:n,...r}=e,o=await this.getAShareCodeList({market:n});return I.getAllQuotesByCodes(this.client,o,r)}async getAllHKShareQuotes(e={}){let n=await this.getHKCodeList();return I.getAllHKQuotesByCodes(this.client,n,e)}async getAllUSShareQuotes(e={}){let{market:n,...r}=e,o=await this.getUSCodeList({simple:!0,market:n});return I.getAllUSQuotesByCodes(this.client,o,r)}getAllQuotesByCodes(e,n={}){return I.getAllQuotesByCodes(this.client,e,n)}batchRaw(e){return this.client.getTencentQuote(e)}getTradingCalendar(){return I.getTradingCalendar(this.client)}getDividendDetail(e){return g.getDividendDetail(this.client,e)}};var Me=class extends D{constructor(e){super(e)}getIndustryList(){return g.getIndustryList(this.client)}getIndustrySpot(e){return g.getIndustrySpot(this.client,e)}getIndustryConstituents(e){return g.getIndustryConstituents(this.client,e)}getIndustryKline(e,n){return g.getIndustryKline(this.client,e,n)}getIndustryMinuteKline(e,n){return g.getIndustryMinuteKline(this.client,e,n)}getConceptList(){return g.getConceptList(this.client)}getConceptSpot(e){return g.getConceptSpot(this.client,e)}getConceptConstituents(e){return g.getConceptConstituents(this.client,e)}getConceptKline(e,n){return g.getConceptKline(this.client,e,n)}getConceptMinuteKline(e,n){return g.getConceptMinuteKline(this.client,e,n)}};var Ne=class extends D{constructor(e){super(e)}getHistoryKline(e,n){return g.getHistoryKline(this.client,e,n)}getMinuteKline(e,n){return g.getMinuteKline(this.client,e,n)}getHKHistoryKline(e,n){return g.getHKHistoryKline(this.client,e,n)}getHKMinuteKline(e,n){return g.getHKMinuteKline(this.client,e,n)}getUSHistoryKline(e,n){return g.getUSHistoryKline(this.client,e,n)}getUSMinuteKline(e,n){return g.getUSMinuteKline(this.client,e,n)}};var ke=class extends D{constructor(e){super(e)}getFuturesKline(e,n){return g.getFuturesHistoryKline(this.client,e,n)}getGlobalFuturesSpot(e){return g.getGlobalFuturesSpot(this.client,e)}getGlobalFuturesKline(e,n){return g.getGlobalFuturesKline(this.client,e,n)}getFuturesInventorySymbols(){return g.getFuturesInventorySymbols(this.client)}getFuturesInventory(e,n){return g.getFuturesInventory(this.client,e,n)}getComexInventory(e,n){return g.getComexInventory(this.client,e,n)}};var Le=class extends D{constructor(e){super(e)}getIndexOptionSpot(e,n){return B.getIndexOptionSpot(e,n)}getIndexOptionKline(e){return B.getIndexOptionKline(e)}getCFFEXOptionQuotes(e){return g.getCFFEXOptionQuotes(this.client,e)}getETFOptionMonths(e){return B.getETFOptionMonths(e)}getETFOptionExpireDay(e,n){return B.getETFOptionExpireDay(e,n)}getETFOptionMinute(e){return B.getETFOptionMinute(e)}getETFOptionDailyKline(e){return B.getETFOptionDailyKline(e)}getETFOption5DayMinute(e){return B.getETFOption5DayMinute(e)}getCommodityOptionSpot(e,n){return B.getCommodityOptionSpot(e,n)}getCommodityOptionKline(e){return B.getCommodityOptionKline(e)}getOptionLHB(e,n){return g.getOptionLHB(this.client,e,n)}};var Rs=500,_s=15,Fe=class{constructor(e,n){this.klineService=e;this.quoteService=n}detectMarket(e){let n=_chunk3NSUE34Fcjs.e.call(void 0, e);return n==="HK"?"HK":n==="US"?"US":"A"}calcActualStartDate(e,n,r=1.5){let o=this.toCompactDate(e),i=Math.ceil(n*r),a=new Date(parseInt(o.slice(0,4)),parseInt(o.slice(4,6))-1,parseInt(o.slice(6,8)));a.setDate(a.getDate()-i);let u=a.getFullYear(),l=String(a.getMonth()+1).padStart(2,"0"),c=String(a.getDate()).padStart(2,"0");return`${u}${l}${c}`}calcActualStartDateByCalendar(e,n,r){if(!r||r.length===0)return;let o=r.findIndex(a=>a>=e);o===-1&&(o=r.length-1);let i=Math.max(0,o-n);return this.toCompactDate(r[i])}tryNormalizeDate(e){let n=e.trim();return/^\d{4}-\d{2}-\d{2}/.test(n)?n.slice(0,10):/^\d{8}$/.test(n)?`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}`:null}normalizeUserDate(e){let n=this.tryNormalizeDate(e);if(n===null)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`\u65E5\u671F\u683C\u5F0F\u5E94\u4E3A 'YYYY-MM-DD' \u6216 'YYYYMMDD',\u5F97\u5230 '${e}'`,{argument:"date",value:e});return n}normalizeRowDate(e){return _nullishCoalesce(this.tryNormalizeDate(e), () => (e))}toCompactDate(e){return e.replace(/-/g,"")}async getKlineWithIndicators(e,n={}){let{indicators:r={}}=n,o=n.startDate?this.normalizeUserDate(n.startDate):void 0,i=n.endDate?this.normalizeUserDate(n.endDate):void 0,a=_nullishCoalesce(n.market, () => (this.detectMarket(e))),{requiredBars:u,maxRecursiveLookback:l}=_chunkPMERLSCUcjs.v.call(void 0, r),c={A:1.5,HK:1.46,US:1.45},d;if(o)if(a==="A")try{let O=await this.quoteService.getTradingCalendar();d=_nullishCoalesce(this.calcActualStartDateByCalendar(o,u,O), () => (this.calcActualStartDate(o,u,c[a])))}catch (e11){d=this.calcActualStartDate(o,u,c[a])}else d=this.calcActualStartDate(o,u,c[a]);let y={period:n.period,adjust:n.adjust,startDate:d,endDate:i?this.toCompactDate(i):void 0},p;switch(a){case"HK":p=await this.klineService.getHKHistoryKline(e,y);break;case"US":p=await this.klineService.getUSHistoryKline(e,y);break;default:p=await this.klineService.getHistoryKline(e,y)}let T=_nullishCoalesce(n.period, () => ("daily")),R=30+(T==="weekly"?7:T==="monthly"?31:0),P=p.length===0||d===void 0||this.normalizeRowDate(p[0].date)<=ge(this.normalizeRowDate(d),R),S=!1;if(o&&p.length<u&&P)switch(S=!0,a){case"HK":p=await this.klineService.getHKHistoryKline(e,{...y,startDate:void 0});break;case"US":p=await this.klineService.getUSHistoryKline(e,{...y,startDate:void 0});break;default:p=await this.klineService.getHistoryKline(e,{...y,startDate:void 0})}if(o){let O=p.findIndex(H=>this.normalizeRowDate(H.date)>=o);if(O===-1)return[];let N=p;if(S&&!_chunkPMERLSCUcjs.t.call(void 0, r)){let H=l>0?Math.max(u,Rs,_s*l):u;N=p.slice(Math.max(0,O-H))}return _chunkPMERLSCUcjs.w.call(void 0, N,r).filter(H=>{let w=this.normalizeRowDate(H.date);return w>=o&&(i===void 0||w<=i)})}return _chunkPMERLSCUcjs.w.call(void 0, p,r)}};var xe=class extends D{constructor(e){super(e)}getIndividualFundFlow(e,n){return g.getIndividualFundFlow(this.client,e,n)}getMarketFundFlow(){return g.getMarketFundFlow(this.client)}getFundFlowRank(e){return g.getFundFlowRank(this.client,e)}getSectorFundFlowRank(e){return g.getSectorFundFlowRank(this.client,e)}getSectorFundFlowHistory(e,n){return g.getSectorFundFlowHistory(this.client,e,n)}};var Ue=class extends D{constructor(e){super(e)}getNorthboundMinute(e){return g.getNorthboundMinute(this.client,e)}getNorthboundFlowSummary(){return g.getNorthboundFlowSummary(this.client)}getNorthboundHoldingRank(e){return g.getNorthboundHoldingRank(this.client,e)}getNorthboundHistory(e,n){return g.getNorthboundHistory(this.client,e,n)}getNorthboundIndividual(e,n){return g.getNorthboundIndividual(this.client,e,n)}};var we=class extends D{constructor(e){super(e)}getZTPool(e,n){return g.getZTPool(this.client,e,n)}getStockChanges(e){return g.getStockChanges(this.client,e)}getBoardChanges(){return g.getBoardChanges(this.client)}};var ve=class extends D{constructor(e){super(e)}getDragonTigerDetail(e){return g.getDragonTigerDetail(this.client,e)}getDragonTigerStockStats(e){return g.getDragonTigerStockStats(this.client,e)}getDragonTigerInstitution(e){return g.getDragonTigerInstitution(this.client,e)}getDragonTigerBranchRank(e){return g.getDragonTigerBranchRank(this.client,e)}getDragonTigerStockSeatDetail(e,n){return g.getDragonTigerStockSeatDetail(this.client,e,n)}};var Ke=class extends D{constructor(e){super(e)}getBlockTradeMarketStat(){return g.getBlockTradeMarketStat(this.client)}getBlockTradeDetail(e){return g.getBlockTradeDetail(this.client,e)}getBlockTradeDailyStat(e){return g.getBlockTradeDailyStat(this.client,e)}getMarginAccountInfo(){return g.getMarginAccountInfo(this.client)}getMarginTargetList(e){return g.getMarginTargetList(this.client,e)}};var Dn=class{constructor(e={}){this._ns={};this.client=new Ae(e),this.quoteService=new be(this.client),this.boardService=new Me(this.client),this.klineService=new Ne(this.client),this.futuresService=new ke(this.client),this.optionsService=new Le(this.client),this.indicatorService=new Fe(this.klineService,this.quoteService),this.fundFlowService=new xe(this.client),this.northboundService=new Ue(this.client),this.marketEventService=new we(this.client),this.dragonTigerService=new ve(this.client),this.dataService=new Ke(this.client),this.tradingCalendarService=new Oe(this.quoteService),this.fundService=new Ie(this.client)}memoNs(e,n){let r=this._ns[e];return r===void 0&&(r=n(),this._ns[e]=r),r}get quotes(){return this.memoNs("quotes",()=>{let e=this.quoteService;return{cn:e.getFullQuotes.bind(e),cnSimple:e.getSimpleQuotes.bind(e),hk:e.getHKQuotes.bind(e),us:e.getUSQuotes.bind(e),fund:e.getFundQuotes.bind(e),fundFlow:e.getFundFlow.bind(e),largeOrder:e.getPanelLargeOrder.bind(e),timeline:e.getTodayTimeline.bind(e)}})}get codes(){return this.memoNs("codes",()=>{let e=this.quoteService;return{cn:e.getAShareCodeList.bind(e),us:e.getUSCodeList.bind(e),hk:e.getHKCodeList.bind(e),fund:e.getFundCodeList.bind(e)}})}get batch(){return this.memoNs("batch",()=>{let e=this.quoteService;return{cn:e.getAllAShareQuotes.bind(e),hk:e.getAllHKShareQuotes.bind(e),us:e.getAllUSShareQuotes.bind(e),byCodes:e.getAllQuotesByCodes.bind(e),raw:e.batchRaw.bind(e)}})}get kline(){return this.memoNs("kline",()=>{let e=this.klineService,n=this.indicatorService;return{cn:e.getHistoryKline.bind(e),cnMinute:e.getMinuteKline.bind(e),hk:e.getHKHistoryKline.bind(e),hkMinute:e.getHKMinuteKline.bind(e),us:e.getUSHistoryKline.bind(e),usMinute:e.getUSMinuteKline.bind(e),withIndicators:n.getKlineWithIndicators.bind(n)}})}get board(){return this.memoNs("board",()=>{let e=this.boardService;return{industry:{list:e.getIndustryList.bind(e),spot:e.getIndustrySpot.bind(e),constituents:e.getIndustryConstituents.bind(e),kline:e.getIndustryKline.bind(e),minuteKline:e.getIndustryMinuteKline.bind(e)},concept:{list:e.getConceptList.bind(e),spot:e.getConceptSpot.bind(e),constituents:e.getConceptConstituents.bind(e),kline:e.getConceptKline.bind(e),minuteKline:e.getConceptMinuteKline.bind(e)}}})}get options(){return this.memoNs("options",()=>{let e=this.optionsService;return{index:{spot:e.getIndexOptionSpot.bind(e),kline:e.getIndexOptionKline.bind(e)},etf:{months:e.getETFOptionMonths.bind(e),expireDay:e.getETFOptionExpireDay.bind(e),minute:e.getETFOptionMinute.bind(e),dailyKline:e.getETFOptionDailyKline.bind(e),fiveDayMinute:e.getETFOption5DayMinute.bind(e)},commodity:{spot:e.getCommodityOptionSpot.bind(e),kline:e.getCommodityOptionKline.bind(e)},cffex:{quotes:e.getCFFEXOptionQuotes.bind(e)},lhb:e.getOptionLHB.bind(e)}})}get futures(){return this.memoNs("futures",()=>{let e=this.futuresService;return{kline:e.getFuturesKline.bind(e),globalSpot:e.getGlobalFuturesSpot.bind(e),globalKline:e.getGlobalFuturesKline.bind(e),inventorySymbols:e.getFuturesInventorySymbols.bind(e),inventory:e.getFuturesInventory.bind(e),comexInventory:e.getComexInventory.bind(e)}})}get fundFlow(){return this.memoNs("fundFlow",()=>{let e=this.fundFlowService;return{individual:e.getIndividualFundFlow.bind(e),market:e.getMarketFundFlow.bind(e),rank:e.getFundFlowRank.bind(e),sectorRank:e.getSectorFundFlowRank.bind(e),sectorHistory:e.getSectorFundFlowHistory.bind(e)}})}get northbound(){return this.memoNs("northbound",()=>{let e=this.northboundService;return{minute:e.getNorthboundMinute.bind(e),summary:e.getNorthboundFlowSummary.bind(e),holdingRank:e.getNorthboundHoldingRank.bind(e),history:e.getNorthboundHistory.bind(e),individual:e.getNorthboundIndividual.bind(e)}})}get marketEvent(){return this.memoNs("marketEvent",()=>{let e=this.marketEventService;return{ztPool:e.getZTPool.bind(e),stockChanges:e.getStockChanges.bind(e),boardChanges:e.getBoardChanges.bind(e)}})}get dragonTiger(){return this.memoNs("dragonTiger",()=>{let e=this.dragonTigerService;return{detail:e.getDragonTigerDetail.bind(e),stockStats:e.getDragonTigerStockStats.bind(e),institution:e.getDragonTigerInstitution.bind(e),branchRank:e.getDragonTigerBranchRank.bind(e),seatDetail:e.getDragonTigerStockSeatDetail.bind(e)}})}get blockTrade(){return this.memoNs("blockTrade",()=>{let e=this.dataService;return{marketStat:e.getBlockTradeMarketStat.bind(e),detail:e.getBlockTradeDetail.bind(e),dailyStat:e.getBlockTradeDailyStat.bind(e)}})}get margin(){return this.memoNs("margin",()=>{let e=this.dataService;return{accountInfo:e.getMarginAccountInfo.bind(e),targetList:e.getMarginTargetList.bind(e)}})}get fund(){return this.memoNs("fund",()=>{let e=this.fundService;return{dividendList:e.getFundDividendList.bind(e),navHistory:e.getFundNavHistory.bind(e),estimate:e.getFundEstimate.bind(e),rankHistory:e.getFundRankHistory.bind(e),profile:e.getFundProfile.bind(e)}})}get calendar(){return this.memoNs("calendar",()=>{let e=this.tradingCalendarService;return{isTradingDay:e.isTradingDay.bind(e),nextTradingDay:e.nextTradingDay.bind(e),prevTradingDay:e.prevTradingDay.bind(e),marketStatus:e.getMarketStatus.bind(e)}})}get reference(){return this.memoNs("reference",()=>{let e=this.quoteService;return{dividendDetail:e.getDividendDetail.bind(e),tradingCalendar:e.getTradingCalendar.bind(e)}})}search(e){return this.quoteService.search(e)}},Dd= exports.u =Dn;exports.a = pt; exports.b = mt; exports.c = f; exports.d = _; exports.e = ce; exports.f = de; exports.g = qe; exports.h = x; exports.i = pe; exports.j = Yo; exports.k = se; exports.l = yt; exports.m = E; exports.n = ae; exports.o = k; exports.p = ht; exports.q = St; exports.r = Oe; exports.s = Ie; exports.t = Dn; exports.u = Dd;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});function ge(a,p){let m,g=p.reduce((i,F)=>{if(!(i==null||typeof i!="object"))return m=i,i[F]},a);if(typeof g=="function")return{fn:g,parent:m}}var B=["qfq","hfq","none"],w=["daily","weekly","monthly"],v=["1","5","15","30","60"],L=["sh","sz","bj","kc","cy"],x=["NASDAQ","NYSE","AMEX"],R= exports.b =["A","HK","US"],_=["north","south"],H= exports.c =["zt","yesterday","strong","sub_new","broken","dt"],h=["1month","3month","6month","1year"],D=["50ETF","300ETF","500ETF","\u79D1\u521B50","\u79D1\u521B\u677F50"],U=["ho","io","mo"],z=["gold","silver"],j=["rocket_launch","quick_rebound","large_buy","limit_up_seal","limit_down_open","big_buy_order","auction_up","high_open_5d","gap_up","high_60d","surge_60d","accelerate_down","high_dive","large_sell","limit_down_seal","limit_up_open","big_sell_order","auction_down","low_open_5d","gap_down","low_60d","drop_60d"],r= exports.d ={flag:"adjust",type:"enum",enum:B,map:{none:""},default:"qfq",desc:"\u590D\u6743\uFF1Aqfq \u524D\u590D\u6743(\u9ED8\u8BA4) / hfq \u540E\u590D\u6743 / none \u4E0D\u590D\u6743",mcpDesc:"\u590D\u6743\uFF1Aqfq=\u524D\u590D\u6743(\u9ED8\u8BA4,\u770B\u8D70\u52BF) / hfq=\u540E\u590D\u6743(\u7B97\u6536\u76CA) / ''=\u4E0D\u590D\u6743"},y={...r,default:"",mcpDesc:"\u590D\u6743\u65B9\u5F0F\uFF0C\u9ED8\u8BA4\u4E0D\u590D\u6743\uFF08''\uFF09\uFF1B\u9700\u524D\u590D\u6743\u4F20 qfq\uFF08\u770B\u8D70\u52BF\uFF09\uFF0C\u540E\u590D\u6743\u4F20 hfq\uFF08\u7B97\u6536\u76CA\uFF09"},s= exports.e ={flag:"period",type:"enum",enum:w,default:"daily",desc:"K \u7EBF\u5468\u671F daily/weekly/monthly",mcpDesc:"\u5386\u53F2 K \u7EBF\u5468\u671F"},S={...s,mcpDesc:"\u8D44\u91D1\u6D41\u7EDF\u8BA1\u5468\u671F\uFF08\u65E5 / \u5468 / \u6708\uFF09"},u= exports.f ={flag:"period",type:"enum",enum:v,default:"1",desc:"\u5206\u949F\u5468\u671F 1/5/15/30/60",mcpDesc:"\u5206\u949F\u5468\u671F\uFF1B1=\u5F53\u65E5\u5206\u65F6"},Y={...u,default:"5",mcpDesc:"\u5206\u949F\u5468\u671F\uFF1B\u9ED8\u8BA4 5\uFF085 \u5206\u949F K \u7EBF\uFF09\uFF0C\u5F53\u65E5\u5206\u65F6\u8BF7\u4F20 period=1"},t= exports.g ={flag:"start",field:"startDate",type:"string",desc:"\u5F00\u59CB\u65E5\u671F YYYYMMDD",mcpDesc:"\u8D77\u59CB\u65E5\u671F YYYYMMDD"},o= exports.h ={flag:"end",field:"endDate",type:"string",desc:"\u7ED3\u675F\u65E5\u671F YYYYMMDD",mcpDesc:"\u7ED3\u675F\u65E5\u671F YYYYMMDD"},f={...t,required:!0},M={...o,required:!0},Q={...t,mcpDesc:"\u5F00\u59CB\u65F6\u95F4"},G={...o,mcpDesc:"\u7ED3\u675F\u65F6\u95F4"},Z={...t,mcpDesc:"\u5F00\u59CB\u65F6\u95F4 YYYY-MM-DD HH:mm\uFF08\u6E2F\u80A1\u672C\u5730\u65F6\u533A\uFF09"},X={...o,mcpDesc:"\u7ED3\u675F\u65F6\u95F4 YYYY-MM-DD HH:mm\uFF08\u6E2F\u80A1\u672C\u5730\u65F6\u533A\uFF09"},V={...t,mcp:!1},J={...o,mcp:!1},C={...t,mcpDesc:"\u8D77\u59CB\u65E5\u671F YYYY-MM-DD"},I={...o,mcpDesc:"\u7ED3\u675F\u65E5\u671F YYYY-MM-DD"},W={...C,cli:!1},$={...I,cli:!1},N=[{...t,mcpDesc:"\u8D77\u59CB\u65E5\u671F YYYYMMDD \u6216 YYYY-MM-DD"},{...o,mcpDesc:"\u7ED3\u675F\u65E5\u671F YYYYMMDD \u6216 YYYY-MM-DD"}],b= exports.i ={flag:"ndays",jsonKey:"recentDays",type:"number",desc:"\u6700\u8FD1 N \u4E2A\u4EA4\u6613\u65E5\u5206\u65F6(\u4EC5 period=1 \u751F\u6548)",mcpDesc:"\u4EC5 period=1 \u751F\u6548\uFF1A\u8FD4\u56DE\u6700\u8FD1 N \u4E2A\u4EA4\u6613\u65E5\u7684\u5206\u65F6\uFF0C\u9ED8\u8BA4 1\uFF08\u5F53\u65E5\uFF09"},k={flag:"market",type:"enum",enum:L,desc:"\u5E02\u573A\u7B5B\u9009 sh/sz/bj/kc/cy",mcpDesc:"\u6309\u677F\u5757\u7B5B\u9009"},A={flag:"market",type:"enum",enum:x,upper:!0,desc:"\u4EA4\u6613\u6240\u7B5B\u9009 NASDAQ/NYSE/AMEX"},ee= exports.j ={flag:"market",type:"enum",enum:R,upper:!0,desc:"\u5E02\u573A(\u9ED8\u8BA4\u81EA\u52A8\u8BC6\u522B)",mcpDesc:"\u5E02\u573A\u7C7B\u578B A / HK / US\uFF1B\u4E0D\u4F20\u5219\u7531 symbol \u81EA\u52A8\u8BC6\u522B"},c={flag:"batchSize",type:"number",desc:"\u5355\u6279\u6570\u91CF(\u9ED8\u8BA4 500)",mcpDesc:"\u5355\u6279\u4EE3\u7801\u6570\uFF0C\u9ED8\u8BA4 500"},l={flag:"concurrency",type:"number",desc:"\u5E76\u53D1\u6570(\u9ED8\u8BA4 7)",mcpDesc:"\u5E76\u53D1\u6570\uFF0C\u9ED8\u8BA4 7"},O={flag:"simple",type:"boolean",desc:"\u53BB\u6389\u4EA4\u6613\u6240\u524D\u7F00"},ae={...O,mcpDesc:"\u53BB\u6389\u5E02\u573A\u524D\u7F00"},E={flag:"direction",type:"enum",enum:_,mcp:!1,desc:"\u65B9\u5411 north / south"},te= exports.k =["ma","rsi","wr","bias"],oe= exports.l =["macd","kdj","boll","cci","atr","obv","roc","dmi","sar","kc"],se=[...te.map(a=>({flag:a,type:"number[]",mcp:!1,desc:`${a.toUpperCase()} \u5468\u671F(\u9017\u53F7\u5206\u9694\uFF0C\u5982 5,10\uFF1B\u4EC5 --${a} \u7528\u9ED8\u8BA4)`})),...oe.map(a=>({flag:a,type:"boolean",mcp:!1,desc:`\u542F\u7528 ${a.toUpperCase()}`}))],P={flag:"indicator",type:"enum",enum:["today","3day","5day","10day"],default:"today",cli:!1,desc:"\u6392\u540D\u5468\u671F today/3day/5day/10day",mcpDesc:"\u6392\u540D\u5468\u671F\uFF1Atoday=\u4ECA\u65E5(\u9ED8\u8BA4) / 3day / 5day / 10day"},re={flag:"sectorType",type:"enum",enum:["industry","concept","region"],default:"industry",cli:!1,desc:"\u677F\u5757\u7C7B\u578B industry/concept/region",mcpDesc:"\u677F\u5757\u7C7B\u578B\uFF1Aindustry=\u884C\u4E1A(\u9ED8\u8BA4) / concept=\u6982\u5FF5 / region=\u5730\u57DF"},ne={flag:"market",type:"enum",enum:["all","shanghai","shenzhen"],default:"all",cli:!1,desc:"\u5E02\u573A all/shanghai/shenzhen",mcpDesc:"\u5E02\u573A:all(\u9ED8\u8BA4) / shanghai=\u6CAA\u80A1\u901A / shenzhen=\u6DF1\u80A1\u901A"},pe={flag:"period",type:"enum",enum:["today","3day","5day","10day","month","quarter","year"],default:"5day",cli:!1,desc:"\u6392\u540D\u5468\u671F today/3day/5day/10day/month/quarter/year",mcpDesc:"\u6392\u540D\u5468\u671F:today / 3day / 5day(\u9ED8\u8BA4) / 10day / month / quarter / year"},me={flag:"date",type:"string",cli:!1,desc:"\u6307\u5B9A\u4EA4\u6613\u65E5 YYYY-MM-DD",mcpDesc:"\u6307\u5B9A\u4EA4\u6613\u65E5 YYYY-MM-DD\uFF08\u9ED8\u8BA4\u670D\u52A1\u7AEF\u6700\u65B0\u4EA4\u6613\u65E5\uFF09"},ie={flag:"pageSize",type:"number",cli:!1,desc:"\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 20"},ce={flag:"pageSize",type:"number",cli:!1,desc:"\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 20000"},T={flag:"pageSize",type:"number",cli:!1,desc:"\u5355\u9875\u6279\u91CF\u5927\u5C0F\uFF0C\u9ED8\u8BA4 500\uFF1B\u63A5\u53E3\u8FD4\u56DE\u5168\u91CF\u5386\u53F2\uFF0C\u8FC7\u5927\u65F6\u4F1A\u88AB\u88C1\u526A"},le={flag:"marketCode",type:"number",cli:!1,desc:"\u4E1C\u8D22\u5E02\u573A\u4EE3\u7801\uFF08\u672A\u5185\u7F6E\u54C1\u79CD\u65F6\u624B\u52A8\u6307\u5B9A\uFF09"},de={flag:"start",field:"startDate",type:"string",cli:!1,desc:"\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF0C\u9ED8\u8BA4 2020-10-28"},K={...r,mcp:!1},q="\u7EDF\u8BA1\u5468\u671F\uFF1A1month / 3month / 6month / 1year\uFF0C\u9ED8\u8BA4 1month",ue=[{flag:"year",type:"string",cli:!1,desc:'\u67E5\u8BE2\u5E74\u4EFD\uFF0C\u5982 "2026"\uFF1B\u9ED8\u8BA4\u5F53\u524D\u5E74\uFF08Asia/Shanghai\uFF09'},{flag:"page",type:"string",cli:!1,desc:"\u9875\u7801\uFF08\u4ECE 1 \u5F00\u59CB\uFF09\u7684\u6570\u5B57\u5B57\u7B26\u4E32\uFF0C\u6216 'all' \u81EA\u52A8\u7FFB\u5B8C\u8BE5\u5E74\u6240\u6709\u9875\u5E76\u805A\u5408\uFF1B\u9ED8\u8BA4 1"},{flag:"fundType",type:"string",cli:!1,desc:"\u57FA\u91D1\u7C7B\u578B\u7B5B\u9009\uFF0C\u7A7A\u8868\u793A\u5168\u90E8\uFF0C\u5982 '\u80A1\u7968\u578B' / '\u6307\u6570\u578B-\u80A1\u7968' / '\u6DF7\u5408\u578B-\u504F\u80A1' / 'REITs'"},{flag:"rank",type:"enum",enum:["BZDM","ABBNAME","DJR","FSRQ","FHFCZ","FFR"],default:"FSRQ",cli:!1,desc:"\u6392\u5E8F\u5B57\u6BB5\uFF1ABZDM=\u57FA\u91D1\u4EE3\u7801 / ABBNAME=\u57FA\u91D1\u7B80\u79F0 / DJR=\u6743\u76CA\u767B\u8BB0\u65E5 / FSRQ=\u9664\u606F\u65E5\u671F(\u9ED8\u8BA4) / FHFCZ=\u5206\u7EA2(\u5143/\u4EFD) / FFR=\u5206\u7EA2\u53D1\u653E\u65E5"},{flag:"sort",type:"enum",enum:["asc","desc"],default:"desc",cli:!1,desc:"\u6392\u5E8F\u65B9\u5411\uFF1Aasc=\u5347\u5E8F / desc=\u964D\u5E8F(\u9ED8\u8BA4)"},{flag:"code",type:"string",cli:!1,desc:"\u6309\u57FA\u91D1\u4EE3\u7801\u8FC7\u6EE4\uFF08\u5BA2\u6237\u7AEF\u8FC7\u6EE4\uFF09\uFF0C\u4E00\u822C\u642D\u914D page='all' \u4F7F\u7528"}],e=a=>({name:"symbol",required:!0,desc:a}),n=a=>({name:"code",required:!0,desc:a}),d="\u5355\u53EA\u80A1\u7968\u4EE3\u7801\uFF0C\u5982 600519 / sh600519",_e= exports.m =[{path:["quotes","cn"],toolName:"get_a_share_quotes",tier:"core",summary:"A\u80A1\u5168\u91CF\u884C\u60C5(\u542B\u4E94\u6863)",mcpDesc:"\u83B7\u53D6 A \u80A1 / \u6307\u6570\u5168\u91CF\u884C\u60C5\uFF08\u817E\u8BAF\uFF09\uFF1A\u6700\u65B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u4E94\u6863\u76D8\u53E3\u3001\u5E02\u503C\u3001PE/PB \u7B49\u3002",argShape:"codes[]"},{path:["quotes","cnSimple"],toolName:"get_a_share_simple_quotes",summary:"A\u80A1\u7B80\u8981\u884C\u60C5",mcpDesc:"\u83B7\u53D6 A \u80A1 / \u6307\u6570\u7B80\u8981\u884C\u60C5\uFF08\u4EF7\u683C\u3001\u6DA8\u8DCC\u5E45\u3001\u6210\u4EA4\u91CF\u989D\uFF09\u3002",argShape:"codes[]"},{path:["quotes","hk"],toolName:"get_hk_quotes",tier:"core",summary:"\u6E2F\u80A1\u884C\u60C5",mcpDesc:"\u83B7\u53D6\u6E2F\u80A1\u884C\u60C5\u3002\u4EE3\u7801 5 \u4F4D\u6570\u5B57\uFF0C\u5E26\u4E0D\u5E26 hk \u524D\u7F00\u5747\u53EF\uFF08\u5982 00700 / hk00700\uFF09\u3002",argShape:"codes[]"},{path:["quotes","us"],toolName:"get_us_quotes",tier:"core",summary:"\u7F8E\u80A1\u884C\u60C5",mcpDesc:"\u83B7\u53D6\u7F8E\u80A1\u884C\u60C5\u3002\u4EE3\u7801\u5982 AAPL / BABA\u3002",argShape:"codes[]"},{path:["quotes","fund"],toolName:"get_fund_quotes",tier:"core",summary:"\u57FA\u91D1\u884C\u60C5",mcpDesc:"\u83B7\u53D6\u516C\u52DF\u57FA\u91D1\u884C\u60C5\uFF08\u573A\u5185 / \u573A\u5916\uFF0C\u51C0\u503C\u7C7B\uFF09\u3002",argShape:"codes[]"},{path:["quotes","fundFlow"],toolName:"get_fund_flow",summary:"\u8D44\u91D1\u6D41\u5411(\u7B80\u7248)",mcpDesc:"\u83B7\u53D6\u8D44\u91D1\u6D41\u5411\uFF08\u7B80\u7248\uFF0C\u6309\u4EE3\u7801\u6279\u91CF\uFF09\u3002",argShape:"codes[]"},{path:["quotes","largeOrder"],toolName:"get_panel_large_order",summary:"\u76D8\u53E3\u5927\u5355\u5360\u6BD4",mcpDesc:"\u83B7\u53D6\u76D8\u53E3\u5927\u5355\u5360\u6BD4\u3002",argShape:"codes[]"},{path:["quotes","timeline"],toolName:"get_today_timeline",tier:"core",summary:"\u5F53\u65E5\u5206\u65F6",mcpDesc:"\u83B7\u53D6 A \u80A1\u5F53\u65E5\u5206\u65F6\u8D70\u52BF\uFF08\u5355\u53EA\uFF09\u3002",argShape:"positional",positional:[n(d)]},{path:["codes","cn"],toolName:"get_a_share_code_list",summary:"A\u80A1\u4EE3\u7801\u5217\u8868",mcpDesc:"\u83B7\u53D6 A \u80A1\u5168\u91CF\u4EE3\u7801\u5217\u8868\uFF08\u53EF\u6309\u5E02\u573A\u7B5B\u9009 / \u53BB\u4EA4\u6613\u6240\u524D\u7F00\uFF09\u3002",argShape:"options",params:[O,k]},{path:["codes","us"],toolName:"get_us_code_list",summary:"\u7F8E\u80A1\u4EE3\u7801\u5217\u8868",mcpDesc:"\u83B7\u53D6\u7F8E\u80A1\u5168\u91CF\u4EE3\u7801\u5217\u8868\u3002",argShape:"options",params:[ae,A]},{path:["codes","hk"],toolName:"get_hk_code_list",summary:"\u6E2F\u80A1\u4EE3\u7801\u5217\u8868",mcpDesc:"\u83B7\u53D6\u6E2F\u80A1\u5168\u91CF\u4EE3\u7801\u5217\u8868\u3002",argShape:"none"},{path:["codes","fund"],toolName:"get_fund_code_list",summary:"\u57FA\u91D1\u4EE3\u7801\u5217\u8868",mcpDesc:"\u83B7\u53D6\u57FA\u91D1\u5168\u91CF\u4EE3\u7801\u5217\u8868\u3002",argShape:"none"},{path:["batch","cn"],toolName:"get_all_a_share_quotes",summary:"\u5168\u5E02\u573AA\u80A1\u884C\u60C5",mcpDesc:"\u6279\u91CF\u62C9\u53D6\u5168\u5E02\u573A A \u80A1\u884C\u60C5\u3002\u26A0\uFE0F \u53EF\u80FD\u8017\u65F6\u6570\u5341\u79D2\u3001\u8FD4\u56DE\u6570\u5343\u6761\uFF08MCP tools/call \u5927\u6570\u7EC4\u4F1A\u88AB\u88C1\u526A\u81F3 200 \u6761\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\uFF09\u3002",argShape:"options",params:[c,l,k]},{path:["batch","hk"],toolName:"get_all_hk_quotes",summary:"\u5168\u5E02\u573A\u6E2F\u80A1\u884C\u60C5",mcpDesc:"\u6279\u91CF\u62C9\u53D6\u5168\u5E02\u573A\u6E2F\u80A1\u884C\u60C5\u3002\u26A0\uFE0F \u8017\u65F6\u3002",argShape:"options",params:[c,l]},{path:["batch","us"],toolName:"get_all_us_quotes",summary:"\u5168\u5E02\u573A\u7F8E\u80A1\u884C\u60C5",mcpDesc:"\u6279\u91CF\u62C9\u53D6\u5168\u5E02\u573A\u7F8E\u80A1\u884C\u60C5\u3002\u26A0\uFE0F \u8017\u65F6\u3002",argShape:"options",params:[c,l,A]},{path:["batch","byCodes"],toolName:"get_quotes_by_codes",summary:"\u6309\u4EE3\u7801\u6279\u91CF\u884C\u60C5",mcpDesc:"\u6309\u4EE3\u7801\u5217\u8868\u6279\u91CF\u62C9\u53D6\u5B8C\u6574\u884C\u60C5\u3002",argShape:"codes+options",params:[c,l]},{path:["batch","raw"],summary:"\u817E\u8BAF\u539F\u59CB\u6279\u91CF",argShape:"positional",positional:[{name:"params",required:!0,desc:"\u817E\u8BAF raw \u6279\u91CF\u67E5\u8BE2\u53C2\u6570\u5B57\u7B26\u4E32\uFF08provider \u539F\u59CB\u683C\u5F0F\uFF0C\u5982 sh600519,sz000001\uFF09"}],mcp:!1},{path:["kline","cn"],toolName:"get_history_kline",tier:"core",summary:"A\u80A1\u5386\u53F2K\u7EBF",mcpDesc:"A \u80A1 / \u6307\u6570\u5386\u53F2 K \u7EBF\uFF08\u65E5 / \u5468 / \u6708\uFF0C\u542B\u590D\u6743\uFF09\uFF1A\u5F00\u9AD8\u4F4E\u6536\u3001\u6210\u4EA4\u91CF\u989D\u3001\u632F\u5E45\u3001\u6DA8\u8DCC\u5E45\u7B49\u3002\u590D\u6743\u9ED8\u8BA4 qfq\uFF08\u524D\u590D\u6743\uFF0C\u770B\u8D70\u52BF\uFF09\uFF1B\u505A\u56DE\u6D4B / \u6536\u76CA\u8BA1\u7B97\u8BF7\u663E\u5F0F\u4F20 hfq\uFF08\u540E\u590D\u6743\uFF09\u6216 ''\uFF08\u4E0D\u590D\u6743\uFF09\u3002\u65E5\u671F\u683C\u5F0F YYYYMMDD\u3002",argShape:"symbol+options",positional:[e("\u80A1\u7968 / \u6307\u6570\u4EE3\u7801\uFF0C\u5982 600519 / sh600519")],params:[s,r,t,o]},{path:["kline","cnMinute"],toolName:"get_minute_kline",tier:"core",summary:"A\u80A1\u5206\u949FK\u7EBF/\u5206\u65F6",mcpDesc:"A \u80A1\u5206\u949F K \u7EBF / \u5F53\u65E5\u5206\u65F6\u3002period=1 \u8FD4\u56DE\u6700\u8FD1\u7EA6 5 \u4E2A\u4EA4\u6613\u65E5\u7684\u5206\u65F6\uFF08\u4E0D\u652F\u6301\u590D\u6743\uFF0C\u53EF\u7528 startDate/endDate \u6536\u7A84\u5230\u5F53\u65E5\uFF09\uFF1Bperiod=5/15/30/60 \u8FD4\u56DE\u5206\u949F K \u7EBF\uFF08adjust \u4EC5\u6B64\u65F6\u6709\u6548\uFF0C\u9ED8\u8BA4 qfq\uFF09\u3002",argShape:"symbol+options",positional:[e("\u80A1\u7968 / \u6307\u6570\u4EE3\u7801\uFF0C\u5982 600519 / sh600519")],params:[u,r,Q,G]},{path:["kline","hk"],toolName:"get_hk_history_kline",tier:"core",summary:"\u6E2F\u80A1\u5386\u53F2K\u7EBF",mcpDesc:"\u6E2F\u80A1\u5386\u53F2 K \u7EBF\uFF08\u65E5 / \u5468 / \u6708\uFF0C\u542B\u590D\u6743\uFF0C\u5E01\u79CD HKD\uFF09\u3002\u4EE3\u7801 5 \u4F4D\u6570\u5B57\uFF0C\u5E26\u4E0D\u5E26 hk \u524D\u7F00\u5747\u53EF\uFF08\u5982 00700 / hk00700\uFF09\u3002\u590D\u6743\u9ED8\u8BA4 qfq\uFF1B\u65E5\u671F\u683C\u5F0F YYYYMMDD\u3002",argShape:"symbol+options",positional:[e("\u6E2F\u80A1\u4EE3\u7801\uFF0C\u5982 00700 / hk00700")],params:[s,r,t,o]},{path:["kline","hkMinute"],toolName:"get_hk_minute_kline",summary:"\u6E2F\u80A1\u5206\u949FK\u7EBF/\u5206\u65F6",mcpDesc:"\u6E2F\u80A1\u5206\u949F K \u7EBF / \u5F53\u65E5\u5206\u65F6\u3002period=1 \u8FD4\u56DE\u5F53\u65E5\u5206\u65F6\uFF08\u4E0D\u652F\u6301\u590D\u6743\uFF0C\u53EF\u7528 recentDays \u53D6\u8FD1 N \u65E5\uFF09\uFF1Bperiod=5/15/30/60 \u8FD4\u56DE\u5206\u949F K \u7EBF\uFF08adjust \u4EC5\u6B64\u65F6\u6709\u6548\uFF0C\u9ED8\u8BA4 qfq\uFF09\u3002\u65F6\u95F4\u683C\u5F0F YYYY-MM-DD HH:mm\uFF08\u6E2F\u80A1\u672C\u5730\u65F6\u533A Asia/Hong_Kong\uFF09\u3002",argShape:"symbol+options",positional:[e("\u6E2F\u80A1\u4EE3\u7801\uFF0C\u5982 00700 / hk00700")],params:[u,r,Z,X,b]},{path:["kline","us"],toolName:"get_us_history_kline",tier:"core",summary:"\u7F8E\u80A1\u5386\u53F2K\u7EBF",mcpDesc:"\u7F8E\u80A1\u5386\u53F2 K \u7EBF\uFF08\u65E5 / \u5468 / \u6708\uFF0C\u542B\u590D\u6743\uFF0C\u5E01\u79CD USD\uFF09\u3002\u4EE3\u7801\u683C\u5F0F {market}.{ticker}\uFF08\u5982 105.AAPL / 106.BABA\uFF09\u3002\u590D\u6743\u9ED8\u8BA4 qfq\uFF1B\u65E5\u671F\u683C\u5F0F YYYYMMDD\u3002",argShape:"symbol+options",positional:[e("\u7F8E\u80A1\u4EE3\u7801\uFF0C\u683C\u5F0F {market}.{ticker}\uFF0C\u5982 105.AAPL / 106.BABA")],params:[s,r,t,o]},{path:["kline","usMinute"],toolName:"get_us_minute_kline",summary:"\u7F8E\u80A1\u5206\u949FK\u7EBF/\u5206\u65F6",mcpDesc:"\u7F8E\u80A1\u5206\u949F K \u7EBF / \u5F53\u65E5\u5206\u65F6\uFF08\u4EC5\u5E38\u89C4\u4EA4\u6613\u65F6\u6BB5\uFF0C\u4E0D\u542B\u76D8\u524D / \u76D8\u540E\uFF09\u3002period=1 \u8FD4\u56DE\u5F53\u65E5\u5206\u65F6\uFF08\u4E0D\u652F\u6301\u590D\u6743\uFF0C\u53EF\u7528 recentDays \u53D6\u8FD1 N \u65E5\uFF09\uFF1Bperiod=5/15/30/60 \u8FD4\u56DE\u5206\u949F K \u7EBF\uFF08adjust \u4EC5\u6B64\u65F6\u6709\u6548\uFF0C\u9ED8\u8BA4 qfq\uFF09\u3002\u4EE3\u7801\u683C\u5F0F {market}.{ticker}\uFF0C\u5982 105.AAPL\u3002",argShape:"symbol+options",positional:[e("\u7F8E\u80A1\u4EE3\u7801\uFF0C\u683C\u5F0F {market}.{ticker}\uFF0C\u5982 105.AAPL / 106.BABA")],params:[u,r,V,J,b]},{path:["kline","withIndicators"],toolName:"get_kline_with_indicators",tier:"core",summary:"\u5E26\u6307\u6807K\u7EBF(--ma 5,10 --macd --kdj --rsi ...)",mcpDesc:"\u5E26\u6280\u672F\u6307\u6807\u7684\u5386\u53F2 K \u7EBF\uFF08A \u80A1 / \u6E2F\u80A1 / \u7F8E\u80A1\uFF0Cmarket \u4E0D\u4F20\u81EA\u52A8\u6309 symbol \u8BC6\u522B\uFF09\u3002\u5468\u671F\u9ED8\u8BA4 daily\uFF0C\u590D\u6743\u9ED8\u8BA4\u6309 SDK \u9ED8\u8BA4\uFF08qfq\uFF09\uFF1B\u65E5\u671F\u652F\u6301 YYYYMMDD \u6216 YYYY-MM-DD\u3002indicators \u4E3A\u5BF9\u8C61\uFF0C\u952E\u53D6\u81EA 14 \u4E2A\u6307\u6807\uFF1Ama / macd / boll / kdj / rsi / wr / bias / cci / atr / obv / roc / dmi / sar / kc\uFF0C\u6BCF\u4E2A\u952E\u4F20 true \u5373\u7528\u9ED8\u8BA4\u53C2\u6570\u5F00\u542F\uFF0C\u6216\u4F20\u914D\u7F6E\u5BF9\u8C61\uFF08\u5982 { ma: { periods: [5,10,20] }, macd: { short: 12, long: 26, signal: 9 } }\uFF09\u3002SDK \u4F1A\u6309\u6307\u6807\u4F9D\u8D56\u81EA\u52A8\u5411\u524D\u591A\u53D6\u82E5\u5E72 bar \u4FDD\u8BC1\u9996\u65E5\u6709\u6548\u3002",argShape:"symbol+options",positional:[e("\u80A1\u7968\u4EE3\u7801\uFF08A \u80A1 / \u6E2F\u80A1 / \u7F8E\u80A1\uFF09")],params:[s,r,t,o,ee,...se],mcpCustom:!0},{path:["board","industry","list"],toolName:"get_industry_list",tier:"core",summary:"\u884C\u4E1A\u677F\u5757\u5217\u8868",mcpDesc:"\u83B7\u53D6\u884C\u4E1A\u677F\u5757\u5217\u8868\uFF08\u4E1C\u65B9\u8D22\u5BCC\uFF09\uFF1A\u677F\u5757\u4EE3\u7801\u3001\u540D\u79F0\u3001\u6700\u65B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u6210\u4EA4\u989D\u3001\u9886\u6DA8\u80A1\u7B49\u3002\u65E0\u53C2\u3002",argShape:"none"},{path:["board","industry","spot"],toolName:"get_industry_spot",summary:"\u884C\u4E1A\u677F\u5757\u5B9E\u65F6\u6307\u6807",mcpDesc:"\u83B7\u53D6\u6307\u5B9A\u884C\u4E1A\u677F\u5757\u7684\u5B9E\u65F6\u884C\u60C5\u6307\u6807\uFF08\u6700\u65B0\u3001\u6700\u9AD8\u3001\u6700\u4F4E\u3001\u5F00\u76D8\u3001\u6210\u4EA4\u91CF\u989D\u3001\u6DA8\u8DCC\u5E45\u3001\u632F\u5E45\u3001\u6362\u624B\u7387\u7B49\uFF09\uFF0C\u8FD4\u56DE `{ item, value }[]`\u3002\u6210\u5206\u80A1\u5217\u8868\u8BF7\u7528 `constituents`\uFF1B\u6210\u5206\u80A1\u884C\u60C5\u4EA6\u89C1 `constituents`\uFF08\u542B\u4EF7\u683C/\u6DA8\u8DCC\u5E45\uFF09\u3002symbol \u4E3A\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u540D\u79F0\u3002",argShape:"positional",positional:[e("\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u677F\u5757\u540D\u79F0")]},{path:["board","industry","constituents"],toolName:"get_industry_constituents",tier:"core",summary:"\u884C\u4E1A\u677F\u5757\u6210\u5206\u80A1",mcpDesc:"\u83B7\u53D6\u6307\u5B9A\u884C\u4E1A\u677F\u5757\u7684\u6210\u5206\u80A1\u5217\u8868\uFF08\u4EE3\u7801\u3001\u540D\u79F0\u7B49\u57FA\u7840\u4FE1\u606F\uFF09\u3002symbol \u4E3A\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u540D\u79F0\u3002",argShape:"positional",positional:[e("\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u677F\u5757\u540D\u79F0")]},{path:["board","industry","kline"],toolName:"get_industry_kline",summary:"\u884C\u4E1A\u677F\u5757K\u7EBF",mcpDesc:"\u83B7\u53D6\u884C\u4E1A\u677F\u5757\u5386\u53F2 K \u7EBF\uFF08\u65E5/\u5468/\u6708\uFF09\uFF1A\u65E5\u671F\u3001\u5F00\u9AD8\u4F4E\u6536\u3001\u6210\u4EA4\u91CF\u989D\u3001\u6DA8\u8DCC\u5E45\u3002\u4EF7\u683C\u5355\u4F4D\u4E3A\u5143\u3002\u590D\u6743\u9ED8\u8BA4\u4E0D\u590D\u6743\uFF0C\u9700\u524D/\u540E\u590D\u6743\u8BF7\u663E\u5F0F\u4F20 adjust\u3002",argShape:"symbol+options",positional:[e("\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u677F\u5757\u540D\u79F0")],params:[s,y,t,o]},{path:["board","industry","minuteKline"],toolName:"get_industry_minute_kline",summary:"\u884C\u4E1A\u677F\u5757\u5206\u65F6",mcpDesc:"\u83B7\u53D6\u884C\u4E1A\u677F\u5757\u5206\u65F6/\u5206\u949F K \u7EBF\u3002period=1 \u8FD4\u56DE\u5F53\u65E5\u5206\u65F6\uFF1B5/15/30/60 \u8FD4\u56DE\u5BF9\u5E94\u5206\u949F K \u7EBF\u3002\u9ED8\u8BA4 5\uFF085 \u5206\u949F K \u7EBF\uFF09\uFF0C\u5F53\u65E5\u5206\u65F6\u8BF7\u4F20 period=1\u3002",argShape:"symbol+options",positional:[e("\u884C\u4E1A\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0475\uFF09\u6216\u677F\u5757\u540D\u79F0")],params:[Y]},{path:["board","concept","list"],toolName:"get_concept_list",tier:"core",summary:"\u6982\u5FF5\u677F\u5757\u5217\u8868",mcpDesc:"\u83B7\u53D6\u6982\u5FF5\u677F\u5757\u5217\u8868\uFF08\u4E1C\u65B9\u8D22\u5BCC\uFF09\uFF1A\u677F\u5757\u4EE3\u7801\u3001\u540D\u79F0\u3001\u6700\u65B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u6210\u4EA4\u989D\u3001\u9886\u6DA8\u80A1\u7B49\u3002\u65E0\u53C2\u3002",argShape:"none"},{path:["board","concept","spot"],toolName:"get_concept_spot",summary:"\u6982\u5FF5\u677F\u5757\u5B9E\u65F6\u6307\u6807",mcpDesc:"\u83B7\u53D6\u6307\u5B9A\u6982\u5FF5\u677F\u5757\u7684\u5B9E\u65F6\u884C\u60C5\u6307\u6807\uFF08\u6700\u65B0\u3001\u6700\u9AD8\u3001\u6700\u4F4E\u3001\u5F00\u76D8\u3001\u6210\u4EA4\u91CF\u989D\u3001\u6DA8\u8DCC\u5E45\u3001\u632F\u5E45\u3001\u6362\u624B\u7387\u7B49\uFF09\uFF0C\u8FD4\u56DE `{ item, value }[]`\u3002\u6210\u5206\u80A1\u5217\u8868\u8BF7\u7528 `constituents`\uFF1B\u6210\u5206\u80A1\u884C\u60C5\u4EA6\u89C1 `constituents`\uFF08\u542B\u4EF7\u683C/\u6DA8\u8DCC\u5E45\uFF09\u3002symbol \u4E3A\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u540D\u79F0\u3002",argShape:"positional",positional:[e("\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u677F\u5757\u540D\u79F0")]},{path:["board","concept","constituents"],toolName:"get_concept_constituents",tier:"core",summary:"\u6982\u5FF5\u677F\u5757\u6210\u5206\u80A1",mcpDesc:"\u83B7\u53D6\u6307\u5B9A\u6982\u5FF5\u677F\u5757\u7684\u6210\u5206\u80A1\u5217\u8868\uFF08\u4EE3\u7801\u3001\u540D\u79F0\u7B49\u57FA\u7840\u4FE1\u606F\uFF09\u3002symbol \u4E3A\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u540D\u79F0\u3002",argShape:"positional",positional:[e("\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u677F\u5757\u540D\u79F0")]},{path:["board","concept","kline"],toolName:"get_concept_kline",summary:"\u6982\u5FF5\u677F\u5757K\u7EBF",mcpDesc:"\u83B7\u53D6\u6982\u5FF5\u677F\u5757\u5386\u53F2 K \u7EBF\uFF08\u65E5/\u5468/\u6708\uFF09\uFF1A\u65E5\u671F\u3001\u5F00\u9AD8\u4F4E\u6536\u3001\u6210\u4EA4\u91CF\u989D\u3001\u6DA8\u8DCC\u5E45\u3002\u4EF7\u683C\u5355\u4F4D\u4E3A\u5143\u3002\u590D\u6743\u9ED8\u8BA4\u4E0D\u590D\u6743\uFF0C\u9700\u524D/\u540E\u590D\u6743\u8BF7\u663E\u5F0F\u4F20 adjust\u3002",argShape:"symbol+options",positional:[e("\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u677F\u5757\u540D\u79F0")],params:[s,y,t,o]},{path:["board","concept","minuteKline"],toolName:"get_concept_minute_kline",summary:"\u6982\u5FF5\u677F\u5757\u5206\u65F6",mcpDesc:"\u83B7\u53D6\u6982\u5FF5\u677F\u5757\u5206\u65F6/\u5206\u949F K \u7EBF\u3002period=1 \u8FD4\u56DE\u5F53\u65E5\u5206\u65F6\uFF1B5/15/30/60 \u8FD4\u56DE\u5BF9\u5E94\u5206\u949F K \u7EBF\u3002\u9ED8\u8BA4 5\uFF085 \u5206\u949F K \u7EBF\uFF09\uFF0C\u5F53\u65E5\u5206\u65F6\u8BF7\u4F20 period=1\u3002",argShape:"symbol+options",positional:[e("\u6982\u5FF5\u677F\u5757\u4EE3\u7801\uFF08\u5982 BK0815\uFF09\u6216\u677F\u5757\u540D\u79F0")],params:[Y]},{path:["options","index","spot"],toolName:"get_index_option_spot",summary:"\u80A1\u6307\u671F\u6743T\u578B\u62A5\u4EF7",mcpDesc:"\u83B7\u53D6\u4E2D\u91D1\u6240\u80A1\u6307\u671F\u6743 T \u578B\u5B9E\u65F6\u62A5\u4EF7\uFF08\u8BA4\u8D2D/\u8BA4\u6CBD\u5206\u5217\uFF09\u3002product=\u4EA7\u54C1\u4EE3\u7801(ho/io/mo)\uFF1Bcontract=\u5408\u7EA6\u6708\u4EFD\u3002",argShape:"positional",positional:[{name:"product",required:!0,enum:U,desc:"\u4EA7\u54C1\u4EE3\u7801\uFF1Aho / io / mo"},{name:"contract",required:!0,desc:"\u5408\u7EA6\uFF08\u6708\u4EFD\uFF09\uFF0C\u5982 2406"}]},{path:["options","index","kline"],toolName:"get_index_option_kline",summary:"\u80A1\u6307\u671F\u6743\u65E5K",mcpDesc:"\u83B7\u53D6\u4E2D\u91D1\u6240\u80A1\u6307\u671F\u6743\u67D0\u5408\u7EA6\u7684\u65E5 K \u7EBF\u3002",argShape:"positional",positional:[e("\u671F\u6743\u5408\u7EA6\u4EE3\u7801")]},{path:["options","etf","months"],toolName:"get_etf_option_months",summary:"ETF\u671F\u6743\u6708\u4EFD",mcpDesc:"\u83B7\u53D6 ETF \u671F\u6743\u53EF\u4EA4\u6613\u6708\u4EFD\u5217\u8868\uFF08\u542B\u6807\u7684/\u54C1\u79CD\u4FE1\u606F\uFF09\u3002cate=\u671F\u6743\u54C1\u79CD\u3002",argShape:"positional",positional:[{name:"cate",required:!0,enum:D,desc:"\u671F\u6743\u54C1\u79CD\uFF1A50ETF / 300ETF / 500ETF / \u79D1\u521B50 / \u79D1\u521B\u677F50"}]},{path:["options","etf","expireDay"],toolName:"get_etf_option_expire_day",summary:"ETF\u671F\u6743\u5230\u671F\u65E5",mcpDesc:"\u83B7\u53D6 ETF \u671F\u6743\u6307\u5B9A\u6708\u4EFD\u7684\u5230\u671F\u65E5\u4E0E\u5269\u4F59\u5929\u6570\u3002month \u683C\u5F0F YYYY-MM\uFF08\u5982 2024-06\uFF09\uFF0C\u53EF\u76F4\u63A5\u53D6\u81EA get_etf_option_months \u8FD4\u56DE\u7684\u6708\u4EFD\u3002",argShape:"positional",positional:[{name:"cate",required:!0,enum:D,desc:"\u671F\u6743\u54C1\u79CD\uFF1A50ETF / 300ETF / 500ETF / \u79D1\u521B50 / \u79D1\u521B\u677F50"},{name:"month",required:!0,desc:"\u6708\u4EFD YYYY-MM\uFF0C\u5982 2024-06\uFF08\u53EF\u53D6\u81EA get_etf_option_months \u8FD4\u56DE\u7684\u6708\u4EFD\uFF09"}]},{path:["options","etf","minute"],toolName:"get_etf_option_minute",summary:"ETF\u671F\u6743\u5F53\u65E5\u5206\u65F6",mcpDesc:"\u83B7\u53D6 ETF \u671F\u6743\u67D0\u5408\u7EA6\u7684\u5F53\u65E5\u5206\u65F6\u6570\u636E\uFF08\u4EF7\u683C\u3001\u6210\u4EA4\u91CF\u3001\u6301\u4ED3\u91CF\u3001\u5747\u4EF7\uFF09\u3002",argShape:"positional",positional:[n("\u671F\u6743\u5408\u7EA6\u4EE3\u7801")]},{path:["options","etf","dailyKline"],toolName:"get_etf_option_daily_kline",summary:"ETF\u671F\u6743\u65E5K",mcpDesc:"\u83B7\u53D6 ETF \u671F\u6743\u67D0\u5408\u7EA6\u7684\u65E5 K \u7EBF\u3002",argShape:"positional",positional:[n("\u671F\u6743\u5408\u7EA6\u4EE3\u7801")]},{path:["options","etf","fiveDayMinute"],toolName:"get_etf_option_five_day_minute",summary:"ETF\u671F\u67435\u65E5\u5206\u65F6",mcpDesc:"\u83B7\u53D6 ETF \u671F\u6743\u67D0\u5408\u7EA6\u7684\u8FD1 5 \u65E5\u5206\u65F6\u6570\u636E\u3002",argShape:"positional",positional:[n("\u671F\u6743\u5408\u7EA6\u4EE3\u7801")]},{path:["options","commodity","spot"],toolName:"get_commodity_option_spot",summary:"\u5546\u54C1\u671F\u6743T\u578B\u62A5\u4EF7",mcpDesc:"\u83B7\u53D6\u5546\u54C1\u671F\u6743 T \u578B\u5B9E\u65F6\u62A5\u4EF7\uFF08\u8BA4\u8D2D/\u8BA4\u6CBD\u5206\u5217\uFF09\u3002variety=\u54C1\u79CD\u4EE3\u7801\uFF08\u5982 cu/m/au\uFF09\uFF1Bcontract=\u5408\u7EA6\u6708\u4EFD\u3002",argShape:"positional",positional:[{name:"variety",required:!0,desc:"\u54C1\u79CD\u4EE3\u7801\uFF0C\u5982 cu / m / au"},{name:"contract",required:!0,desc:"\u5408\u7EA6\uFF08\u6708\u4EFD\uFF09\uFF0C\u5982 2406"}]},{path:["options","commodity","kline"],toolName:"get_commodity_option_kline",summary:"\u5546\u54C1\u671F\u6743\u65E5K",mcpDesc:"\u83B7\u53D6\u5546\u54C1\u671F\u6743\u67D0\u5408\u7EA6\u7684\u65E5 K \u7EBF\u3002",argShape:"positional",positional:[e("\u671F\u6743\u5408\u7EA6\u4EE3\u7801")]},{path:["options","cffex","quotes"],toolName:"get_cffex_option_quotes",summary:"\u4E2D\u91D1\u6240\u671F\u6743\u5F53\u65E5\u62A5\u4EF7",mcpDesc:"\u83B7\u53D6\u4E2D\u91D1\u6240\u5168\u90E8\u671F\u6743\u5B9E\u65F6\u884C\u60C5\u5217\u8868\uFF08\u4EF7\u683C\u3001\u6DA8\u8DCC\u3001\u6210\u4EA4\u3001\u6301\u4ED3\u3001\u884C\u6743\u4EF7\u3001\u5269\u4F59\u5929\u6570\u7B49\uFF09\u3002\u26A0\uFE0F \u4F53\u79EF\u5927\uFF1A\u9ED8\u8BA4 pageSize=20000 \u8FD4\u56DE\u5168\u5E02\u573A\u5408\u7EA6\u3002",argShape:"options",params:[ce]},{path:["options","lhb"],toolName:"get_option_lhb",summary:"\u671F\u6743\u9F99\u864E\u699C",mcpDesc:"\u83B7\u53D6\u671F\u6743\u9F99\u864E\u699C\uFF08\u6309\u6807\u7684\u4E0E\u65E5\u671F\uFF0C\u542B\u6210\u4EA4\u91CF/\u6301\u4ED3\u91CF\u6392\u540D\u3001\u4F1A\u5458\u5E2D\u4F4D\u3001\u51C0\u4E70\u5356\u7B49\uFF09\u3002date \u683C\u5F0F YYYY-MM-DD\u3002",argShape:"positional",positional:[{name:"symbol",required:!0,desc:"\u671F\u6743\u6807\u7684/\u5408\u7EA6\u4EE3\u7801"},{name:"date",required:!0,desc:"\u65E5\u671F YYYY-MM-DD\uFF0C\u5982 2024-06-03"}]},{path:["futures","kline"],toolName:"get_futures_kline",tier:"core",summary:"\u56FD\u5185\u671F\u8D27K\u7EBF",mcpDesc:"\u83B7\u53D6\u56FD\u5185\u671F\u8D27\u5386\u53F2 K \u7EBF\uFF08\u4E1C\u8D22\uFF09\uFF1A\u5F00\u9AD8\u4F4E\u6536\u3001\u6210\u4EA4\u91CF\u3001\u6301\u4ED3\u91CF\u7B49\u3002symbol \u4E3A\u5408\u7EA6\u4EE3\u7801\uFF0C\u5982 rb2605(\u87BA\u7EB9\u94A2) / IF2604(\u6CAA\u6DF1300\u80A1\u6307) / au2606(\u9EC4\u91D1)\uFF0Cperiod \u9ED8\u8BA4 daily(\u65E5\u7EBF)\uFF0CstartDate/endDate \u4E3A YYYYMMDD\u3002",argShape:"symbol+options",positional:[e("\u671F\u8D27\u5408\u7EA6\u4EE3\u7801\uFF0C\u5982 rb2605 / IF2604 / au2606")],params:[s,K,t,o]},{path:["futures","globalSpot"],toolName:"get_global_futures_spot",summary:"\u5168\u7403\u671F\u8D27\u5B9E\u65F6\u884C\u60C5",mcpDesc:"\u83B7\u53D6\u5168\u7403\u671F\u8D27\u5B9E\u65F6\u884C\u60C5\uFF08\u4E1C\u8D22\uFF09\uFF1A\u56FD\u9645\u539F\u6CB9\u3001\u9EC4\u91D1\u3001\u5916\u76D8\u6307\u6570\u671F\u8D27\u7B49\u7684\u6700\u65B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u6210\u4EA4\u91CF\u3002pageSize \u4E3A\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 20\u3002",argShape:"options",params:[ie]},{path:["futures","globalKline"],toolName:"get_global_futures_kline",summary:"\u5168\u7403\u671F\u8D27K\u7EBF",mcpDesc:"\u83B7\u53D6\u5168\u7403\u671F\u8D27\u5386\u53F2 K \u7EBF\uFF08\u4E1C\u8D22\uFF09\uFF1A\u5F00\u9AD8\u4F4E\u6536\u3001\u6210\u4EA4\u91CF\u7B49\u3002symbol \u4E3A\u5408\u7EA6\u4EE3\u7801\uFF0Cperiod \u9ED8\u8BA4 daily\uFF0CstartDate/endDate \u4E3A YYYYMMDD\u3002marketCode \u4E3A\u4E1C\u8D22\u5E02\u573A\u4EE3\u7801\uFF08\u7528\u4E8E\u672A\u5185\u7F6E\u54C1\u79CD\uFF0C\u53EF\u4ECE\u5168\u7403\u671F\u8D27\u5B9E\u65F6\u884C\u60C5\u7ED3\u679C\u53CD\u67E5\uFF09\u3002",argShape:"symbol+options",positional:[e("\u5168\u7403\u671F\u8D27\u5408\u7EA6\u4EE3\u7801\uFF0C\u5982 CONC(WTI \u539F\u6CB9) / GC00Y(COMEX \u9EC4\u91D1)")],params:[s,K,t,o,le]},{path:["futures","inventorySymbols"],toolName:"get_futures_inventory_symbols",summary:"\u671F\u8D27\u5E93\u5B58\u54C1\u79CD\u5217\u8868",mcpDesc:"\u83B7\u53D6\u671F\u8D27\u5E93\u5B58\u54C1\u79CD\u5217\u8868\uFF08\u4E1C\u8D22\uFF09\uFF1A\u53EF\u67E5\u5E93\u5B58\u7684\u54C1\u79CD\u4EE3\u7801\u4E0E\u540D\u79F0\uFF0C\u4F9B get_futures_inventory \u4F7F\u7528\u3002",argShape:"none"},{path:["futures","inventory"],toolName:"get_futures_inventory",summary:"\u671F\u8D27\u5E93\u5B58\u5386\u53F2",mcpDesc:"\u83B7\u53D6\u6307\u5B9A\u54C1\u79CD\u7684\u671F\u8D27\u5E93\u5B58\u5386\u53F2\uFF08\u4E1C\u8D22\uFF09\uFF1A\u4EA4\u6613\u6240\u6CE8\u518C\u4ED3\u5355 / \u5E93\u5B58\u91CF\u53CA\u589E\u51CF\u3002symbol \u4E3A\u54C1\u79CD\u4EE3\u7801\uFF08\u89C1 get_futures_inventory_symbols\uFF09\uFF0CstartDate \u4E3A YYYY-MM-DD(\u9ED8\u8BA4 2020-10-28)\u3002pageSize \u4EC5\u4E3A\u5355\u9875\u6279\u91CF\u5927\u5C0F\uFF08\u9ED8\u8BA4 500\uFF09\uFF0C\u63A5\u53E3\u8FD4\u56DE\u5168\u91CF\u5386\u53F2\uFF0C\u8FC7\u5927\u65F6\u4F1A\u88AB\u88C1\u526A\u3002",argShape:"symbol+options",positional:[e("\u5E93\u5B58\u54C1\u79CD\u4EE3\u7801\uFF08\u89C1 get_futures_inventory_symbols\uFF09")],params:[de,T]},{path:["futures","comexInventory"],toolName:"get_comex_inventory",summary:"COMEX \u5E93\u5B58",mcpDesc:"\u83B7\u53D6 COMEX \u9EC4\u91D1 / \u767D\u94F6\u5E93\u5B58\u5386\u53F2\uFF08\u4E1C\u8D22\uFF09\uFF1A\u6CE8\u518C\u5E93\u5B58\u3001\u5408\u683C\u5E93\u5B58\u53CA\u603B\u91CF\u53D8\u5316\u3002symbol \u5FC5\u586B\uFF0C\u53D6 'gold'(\u9EC4\u91D1) \u6216 'silver'(\u767D\u94F6)\u3002pageSize \u4EC5\u4E3A\u5355\u9875\u6279\u91CF\u5927\u5C0F\uFF08\u9ED8\u8BA4 500\uFF09\uFF0C\u63A5\u53E3\u8FD4\u56DE\u5168\u91CF\u5386\u53F2\uFF0C\u8FC7\u5927\u65F6\u4F1A\u88AB\u88C1\u526A\u3002",argShape:"symbol+options",positional:[{name:"symbol",required:!0,enum:z,desc:"\u54C1\u79CD\uFF1Agold=\u9EC4\u91D1 / silver=\u767D\u94F6"}],params:[T]},{path:["fundFlow","individual"],toolName:"get_individual_fund_flow",tier:"core",summary:"\u4E2A\u80A1\u8D44\u91D1\u6D41\u5386\u53F2",mcpDesc:"\u83B7\u53D6\u4E2A\u80A1\u8D44\u91D1\u6D41\u5386\u53F2\uFF08\u65E5 / \u5468 / \u6708\uFF09\uFF1A\u4E3B\u529B / \u8D85\u5927\u5355 / \u5927\u5355 / \u4E2D\u5355 / \u5C0F\u5355\u51C0\u6D41\u5165\uFF08\u91D1\u989D\u5355\u4F4D\u5143\u3001\u5360\u6BD4\u4E3A\u767E\u5206\u6BD4\uFF09\u3002",argShape:"symbol+options",positional:[e("\u80A1\u7968\u4EE3\u7801\uFF0C\u5E26\u4E0D\u5E26 sh/sz/bj \u524D\u7F00\u5747\u53EF\uFF0C\u5982 600519 / sh600519")],params:[{...S,cli:!1}]},{path:["fundFlow","market"],toolName:"get_market_fund_flow",summary:"\u5927\u76D8\u8D44\u91D1\u6D41",mcpDesc:"\u83B7\u53D6\u5927\u76D8\u8D44\u91D1\u6D41\uFF08\u4E0A\u8BC1\u7EFC\u6307 + \u6DF1\u8BC1\u6210\u6307(399001)\uFF09\uFF1A\u5404\u5206\u7C7B\u8D44\u91D1\u51C0\u6D41\u5165\u91D1\u989D\uFF08\u5143\uFF09\u4E0E\u5360\u6BD4\uFF08%\uFF09\u3002",argShape:"none"},{path:["fundFlow","rank"],toolName:"get_fund_flow_rank",tier:"core",summary:"\u4E2A\u80A1\u8D44\u91D1\u6D41\u6392\u540D",mcpDesc:"\u83B7\u53D6\u4E2A\u80A1\u8D44\u91D1\u6D41\u6392\u540D\uFF08\u6CAA\u6DF1\u5317 A \u80A1\u5168\u5E02\u573A\uFF09\uFF1A\u6309\u4E3B\u529B\u51C0\u6D41\u5165\u6392\u5E8F\uFF0C\u91D1\u989D\u5355\u4F4D\u5143\u3001\u5360\u6BD4\u4E3A\u767E\u5206\u6BD4\u3002\u26A0\uFE0F MCP tools/call \u5927\u6570\u7EC4\u4F1A\u88AB\u88C1\u526A\u81F3\u524D 200 \u6761\uFF08\u6309\u4E3B\u529B\u51C0\u6D41\u5165\u964D\u5E8F\uFF09\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\u3002",argShape:"options",params:[P]},{path:["fundFlow","sectorRank"],toolName:"get_sector_fund_flow_rank",summary:"\u677F\u5757\u8D44\u91D1\u6D41\u6392\u540D",mcpDesc:"\u83B7\u53D6\u677F\u5757\u8D44\u91D1\u6D41\u6392\u540D\uFF08\u884C\u4E1A / \u6982\u5FF5 / \u5730\u57DF\uFF09\uFF1A\u6309\u677F\u5757\u4E3B\u529B\u51C0\u6D41\u5165\u6392\u5E8F\uFF0C\u91D1\u989D\u5355\u4F4D\u5143\u3001\u5360\u6BD4\u4E3A\u767E\u5206\u6BD4\u3002",argShape:"options",params:[P,re]},{path:["fundFlow","sectorHistory"],toolName:"get_sector_fund_flow_history",summary:"\u5355\u677F\u5757\u5386\u53F2\u8D44\u91D1\u6D41",mcpDesc:"\u83B7\u53D6\u5355\u4E2A\u677F\u5757\u7684\u5386\u53F2\u8D44\u91D1\u6D41\uFF08\u65E5 / \u5468 / \u6708\uFF09\uFF1A\u5404\u5206\u7C7B\u8D44\u91D1\u51C0\u6D41\u5165\u91D1\u989D\uFF08\u5143\uFF09\u4E0E\u5360\u6BD4\uFF08%\uFF09\u3002symbol \u4E3A\u677F\u5757\u7F16\u53F7\uFF0C\u5982 BK0438 \u6216\u5168\u524D\u7F00 90.BK0438\u3002",argShape:"symbol+options",positional:[e("\u677F\u5757\u7F16\u53F7\uFF0C\u5982 BK0438 \u6216\u5168\u524D\u7F00 90.BK0438")],params:[{...S,cli:!1}]},{path:["northbound","minute"],toolName:"get_northbound_minute",summary:"\u5317\u5411/\u5357\u5411\u5206\u65F6(--direction north|south \u6216\u4F4D\u7F6E\u53C2\u6570)",mcpDesc:"\u83B7\u53D6\u5317\u5411 / \u5357\u5411\u8D44\u91D1\u5206\u65F6\u6570\u636E\uFF08\u5F53\u65E5\uFF0C\u6309 HH:MM\uFF09\u3002\u8FD4\u56DE\u6CAA/\u6DF1\u5206\u9879\u4E0E\u5408\u8BA1\u51C0\u6D41\u5165\uFF08\u5355\u4F4D:\u4E07\u5143\uFF09\u3002direction:north=\u5317\u5411(\u9ED8\u8BA4) / south=\u5357\u5411\u3002",argShape:"positional",positional:[{name:"direction",enum:_,default:"north",desc:"\u8D44\u91D1\u65B9\u5411:north=\u5317\u5411(\u9ED8\u8BA4) / south=\u5357\u5411"}],params:[E]},{path:["northbound","summary"],toolName:"get_northbound_flow_summary",tier:"core",summary:"\u6CAA\u6DF1\u6E2F\u901A\u8D44\u91D1\u6C47\u603B",mcpDesc:"\u83B7\u53D6\u6CAA\u6DF1\u6E2F\u901A\u5E02\u573A\u8D44\u91D1\u6D41\u5411\u6C47\u603B\uFF08\u5317\u5411 + \u5357\u5411 + \u6E2F\u80A1\u901A\u62C6\u5206\uFF09\uFF1A\u542B\u677F\u5757\u540D\u3001\u51C0\u4E70\u989D/\u51C0\u6D41\u5165(\u5143)\u3001\u5F53\u65E5\u4F59\u989D\u3001\u76F8\u5173\u6307\u6570\u6DA8\u8DCC\u5E45\u7B49\u3002",argShape:"none"},{path:["northbound","holdingRank"],toolName:"get_northbound_holding_rank",summary:"\u5317\u5411\u6301\u80A1\u6392\u884C",mcpDesc:"\u83B7\u53D6\u5317\u5411 / \u6CAA\u80A1\u901A / \u6DF1\u80A1\u901A\u6301\u80A1\u4E2A\u80A1\u6392\u884C\uFF1A\u542B\u6301\u80A1\u80A1\u6570\u3001\u6301\u80A1\u5E02\u503C(\u5143)\u3001\u5360\u6D41\u901A\u80A1/\u603B\u80A1\u672C\u6BD4(%)\u3001\u533A\u95F4\u589E\u6301\u4F30\u8BA1\u7B49\u3002market:all(\u9ED8\u8BA4)/shanghai/shenzhen;period \u9ED8\u8BA4 5day;date \u987B\u4E3A\u6709\u6570\u636E\u7684\u4EA4\u6613\u65E5\uFF0C\u5426\u5219\u8FD4\u56DE\u7A7A\u3002",argShape:"options",params:[ne,pe,me]},{path:["northbound","history"],toolName:"get_northbound_history",summary:"\u5317\u5411/\u5357\u5411\u5386\u53F2(--direction north|south\uFF1B--start/--end)",mcpDesc:"\u83B7\u53D6\u5317\u5411 / \u5357\u5411\u8D44\u91D1\u5386\u53F2\uFF08\u6309\u65E5\uFF09\uFF1A\u6210\u4EA4\u51C0\u4E70\u989D\u3001\u4E70/\u5356\u6210\u4EA4\u989D\u3001\u5386\u53F2\u7D2F\u8BA1\u51C0\u4E70\u989D\u3001\u5F53\u65E5\u8D44\u91D1\u6D41\u5165/\u4F59\u989D(\u5143)\u53CA\u9886\u6DA8\u80A1\u3002direction:north(\u9ED8\u8BA4)/south;\u4E0D\u4F20 startDate/endDate \u53D6\u5168\u91CF\u533A\u95F4\u3002",argShape:"symbol+options",positional:[{name:"direction",enum:_,default:"north",desc:"\u8D44\u91D1\u65B9\u5411:north=\u5317\u5411(\u9ED8\u8BA4) / south=\u5357\u5411"}],params:[E,C,I]},{path:["northbound","individual"],toolName:"get_northbound_individual",summary:"\u4E2A\u80A1\u5317\u5411\u6301\u4ED3\u5386\u53F2",mcpDesc:"\u83B7\u53D6\u4E2A\u80A1\u7684\u5317\u5411\u6301\u4ED3\u5386\u53F2\uFF08\u6309\u65E5\uFF09\uFF1A\u6301\u80A1\u6570\u91CF\u3001\u6301\u80A1\u5E02\u503C(\u5143)\u3001\u5360\u6D41\u901A\u80A1/\u603B\u80A1\u672C\u6BD4(%)\u3001\u5F53\u65E5\u6536\u76D8\u4EF7\u4E0E\u6DA8\u8DCC\u5E45\u3002\u4E0D\u4F20 startDate/endDate \u53D6\u5168\u91CF\u533A\u95F4\u3002",argShape:"symbol+options",positional:[e(d)],params:[W,$]},{path:["marketEvent","ztPool"],toolName:"get_zt_pool",tier:"core",summary:"\u6DA8\u505C\u80A1\u6C60",mcpDesc:"\u83B7\u53D6\u6DA8\u505C\u80A1\u6C60\uFF08\u4E1C\u65B9\u8D22\u5BCC\uFF09\uFF1A\u6DA8\u505C / \u6628\u65E5\u6DA8\u505C / \u5F3A\u52BF / \u6B21\u65B0 / \u70B8\u677F / \u8DCC\u505C\u3002\u5B57\u6BB5\u542B\u4EF7\u683C(\u5143)\u3001\u6DA8\u8DCC\u5E45(%)\u3001\u6210\u4EA4\u989D(\u5143)\u3001\u6D41\u901A/\u603B\u5E02\u503C(\u5143)\u3001\u6362\u624B\u7387(%)\u3001\u8FDE\u677F\u6570\u3001\u5C01\u677F\u65F6\u95F4(HHMMSS) \u7B49\u3002type \u9ED8\u8BA4 zt\uFF1Bdate \u4E0D\u4F20\u4E3A\u6700\u65B0\u4EA4\u6613\u65E5\u3002",argShape:"positional",positional:[{name:"type",enum:H,default:"zt",desc:"\u80A1\u6C60\u7C7B\u578B\uFF1Azt=\u6DA8\u505C / yesterday=\u6628\u65E5\u6DA8\u505C / strong=\u5F3A\u52BF / sub_new=\u6B21\u65B0 / broken=\u70B8\u677F / dt=\u8DCC\u505C"},{name:"date",desc:"\u65E5\u671F YYYYMMDD \u6216 YYYY-MM-DD\uFF0C\u4E0D\u4F20\u4E3A\u6700\u65B0\u4EA4\u6613\u65E5"}]},{path:["marketEvent","stockChanges"],toolName:"get_stock_changes",summary:"\u76D8\u53E3\u5F02\u52A8",mcpDesc:"\u83B7\u53D6\u5F53\u65E5\u76D8\u53E3\u5F02\u52A8\u5217\u8868\uFF08\u4E1C\u65B9\u8D22\u5BCC\uFF09\uFF1A\u6BCF\u6761\u542B\u53D1\u751F\u65F6\u95F4(HH:MM:SS)\u3001\u4EE3\u7801\u3001\u540D\u79F0\u3001\u5F02\u52A8\u7C7B\u578B\u53CA\u4E2D\u6587\u6807\u7B7E\u3001\u76F8\u5173\u4FE1\u606F\u3002type \u4E0D\u4F20\u9ED8\u8BA4 large_buy(\u5927\u7B14\u4E70\u5165)\u3002",argShape:"positional",positional:[{name:"type",enum:j,default:"large_buy",desc:"\u5F02\u52A8\u7C7B\u578B\u7B5B\u9009\uFF1Arocket_launch=\u706B\u7BAD\u53D1\u5C04 / quick_rebound=\u5FEB\u901F\u53CD\u5F39 / large_buy=\u5927\u7B14\u4E70\u5165 / limit_up_seal=\u5C01\u6DA8\u505C\u677F / limit_down_open=\u6253\u5F00\u8DCC\u505C\u677F / big_buy_order=\u6709\u5927\u4E70\u76D8 / auction_up=\u7ADE\u4EF7\u4E0A\u6DA8 / high_open_5d=\u9AD8\u5F005\u65E5\u7EBF / gap_up=\u5411\u4E0A\u7F3A\u53E3 / high_60d=60\u65E5\u65B0\u9AD8 / surge_60d=60\u65E5\u5927\u5E45\u4E0A\u6DA8 / accelerate_down=\u52A0\u901F\u4E0B\u8DCC / high_dive=\u9AD8\u53F0\u8DF3\u6C34 / large_sell=\u5927\u7B14\u5356\u51FA / limit_down_seal=\u5C01\u8DCC\u505C\u677F / limit_up_open=\u6253\u5F00\u6DA8\u505C\u677F / big_sell_order=\u6709\u5927\u5356\u76D8 / auction_down=\u7ADE\u4EF7\u4E0B\u8DCC / low_open_5d=\u4F4E\u5F005\u65E5\u7EBF / gap_down=\u5411\u4E0B\u7F3A\u53E3 / low_60d=60\u65E5\u65B0\u4F4E / drop_60d=60\u65E5\u5927\u5E45\u4E0B\u8DCC"}]},{path:["marketEvent","boardChanges"],toolName:"get_board_changes",summary:"\u677F\u5757\u5F02\u52A8",mcpDesc:"\u83B7\u53D6\u5F53\u65E5\u677F\u5757\u5F02\u52A8\u6C47\u603B\uFF08\u4E1C\u65B9\u8D22\u5BCC\uFF09\uFF1A\u6BCF\u6761\u542B\u677F\u5757\u540D\u79F0\u3001\u6DA8\u8DCC\u5E45(%)\u3001\u4E3B\u529B\u51C0\u6D41\u5165(\u5143)\u3001\u5F02\u52A8\u603B\u6B21\u6570\u3001\u5F02\u52A8\u6700\u9891\u7E41\u4E2A\u80A1\uFF08\u4EE3\u7801 / \u540D\u79F0 / \u65B9\u5411\uFF09\u53CA\u5F02\u52A8\u7C7B\u578B\u5206\u5E03\u3002\u65E0\u53C2\u3002",argShape:"none"},{path:["dragonTiger","detail"],toolName:"get_dragon_tiger_detail",tier:"core",summary:"\u9F99\u864E\u699C\u8BE6\u60C5(\u5FC5\u586B --start/--end)",mcpDesc:"\u83B7\u53D6\u9F99\u864E\u699C\u4E0A\u699C\u4E2A\u80A1\u660E\u7EC6\uFF08\u6309\u65E5\u671F\u8303\u56F4\uFF09\uFF1A\u4EE3\u7801\u3001\u540D\u79F0\u3001\u4E0A\u699C\u65E5\u671F\u3001\u6536\u76D8\u4EF7\u3001\u6DA8\u8DCC\u5E45(%)\u3001\u51C0\u4E70\u989D/\u4E70\u5165\u989D/\u5356\u51FA\u989D/\u6210\u4EA4\u989D(\u5143)\u3001\u5360\u603B\u6210\u4EA4\u6BD4(%)\u3001\u6362\u624B\u7387(%)\u3001\u6D41\u901A\u5E02\u503C(\u5143)\u3001\u4E0A\u699C\u539F\u56E0\u3001\u4E0A\u699C\u540E 1/2/5/10 \u65E5\u6DA8\u8DCC\u5E45(%)\u3002\u65E5\u671F\u683C\u5F0F YYYYMMDD\uFF0CstartDate / endDate \u5747\u5FC5\u586B\u3002\u65E5\u671F\u533A\u95F4\u8FC7\u5927\u65F6 MCP tools/call \u8D85 200 \u6761\u4F1A\u88AB\u88C1\u526A\uFF0C\u8BF7\u6536\u7A84\u533A\u95F4\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\u3002",argShape:"options",params:[f,M]},{path:["dragonTiger","stockStats"],toolName:"get_dragon_tiger_stock_stats",summary:"\u4E2A\u80A1\u4E0A\u699C\u7EDF\u8BA1",mcpDesc:"\u83B7\u53D6\u9F99\u864E\u699C\u4E2A\u80A1\u4E0A\u699C\u7EDF\u8BA1\uFF08\u6309\u5468\u671F\u805A\u5408\uFF09\uFF1A\u4EE3\u7801\u3001\u540D\u79F0\u3001\u6700\u8FD1\u4E0A\u699C\u65E5\u3001\u6536\u76D8\u4EF7\u3001\u6DA8\u8DCC\u5E45(%)\u3001\u4E0A\u699C\u6B21\u6570\u3001\u7D2F\u8BA1\u4E70\u5165/\u5356\u51FA/\u51C0\u989D/\u6210\u4EA4\u989D(\u5143)\u3001\u7D2F\u8BA1\u4E70/\u5356\u65B9\u673A\u6784\u6B21\u6570\u3002period \u53EF\u9009\uFF0C\u9ED8\u8BA4 1month\u3002\u26A0\uFE0F MCP tools/call \u8D85 200 \u6761\u4F1A\u88AB\u88C1\u526A\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\u3002",argShape:"positional",positional:[{name:"period",enum:h,default:"1month",desc:q}]},{path:["dragonTiger","institution"],toolName:"get_dragon_tiger_institution",summary:"\u673A\u6784\u4E70\u5356\u7EDF\u8BA1(\u5FC5\u586B --start/--end)",mcpDesc:"\u83B7\u53D6\u9F99\u864E\u699C\u673A\u6784\u4E70\u5356\u660E\u7EC6\uFF08\u6309\u65E5\u671F\u8303\u56F4\uFF09\uFF1A\u4EE3\u7801\u3001\u540D\u79F0\u3001\u4E0A\u699C\u65E5\u671F\u3001\u6536\u76D8\u4EF7\u3001\u6DA8\u8DCC\u5E45(%)\u3001\u4E70/\u5356\u65B9\u673A\u6784\u6570\u3001\u673A\u6784\u4E70\u5165\u989D/\u5356\u51FA\u989D/\u51C0\u989D(\u5143)\u3002\u65E5\u671F\u683C\u5F0F YYYYMMDD\uFF0CstartDate / endDate \u5747\u5FC5\u586B\u3002\u65E5\u671F\u533A\u95F4\u8FC7\u5927\u65F6 MCP tools/call \u8D85 200 \u6761\u4F1A\u88AB\u88C1\u526A\uFF0C\u8BF7\u6536\u7A84\u533A\u95F4\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\u3002",argShape:"options",params:[f,M]},{path:["dragonTiger","branchRank"],toolName:"get_dragon_tiger_branch_rank",summary:"\u8425\u4E1A\u90E8\u6392\u884C",mcpDesc:"\u83B7\u53D6\u9F99\u864E\u699C\u8425\u4E1A\u90E8\uFF08\u5E2D\u4F4D\uFF09\u6392\u884C\uFF08\u6309\u5468\u671F\u805A\u5408\uFF09\uFF1A\u8425\u4E1A\u90E8\u4EE3\u7801\u3001\u540D\u79F0\u3001\u4E70\u5165\u603B\u989D/\u5356\u51FA\u603B\u989D(\u5143)\u3001\u4E70\u5165/\u5356\u51FA\u6B21\u6570\u3001\u4E0A\u699C\u6B21\u6570\u3002period \u53EF\u9009\uFF0C\u9ED8\u8BA4 1month\u3002\u26A0\uFE0F MCP tools/call \u8D85 200 \u6761\u4F1A\u88AB\u88C1\u526A\uFF1BSDK \u76F4\u8FDE\u8FD4\u56DE\u5168\u91CF\u3002",argShape:"positional",positional:[{name:"period",enum:h,default:"1month",desc:q}]},{path:["dragonTiger","seatDetail"],toolName:"get_dragon_tiger_seat_detail",summary:"\u4E2A\u80A1\u5E2D\u4F4D\u660E\u7EC6",mcpDesc:"\u83B7\u53D6\u4E2A\u80A1\u67D0\u65E5\u9F99\u864E\u699C\u5E2D\u4F4D\u660E\u7EC6\uFF1A\u6392\u540D\u3001\u8425\u4E1A\u90E8\u540D\u79F0\u3001\u4E70\u5165\u989D/\u5356\u51FA\u989D/\u51C0\u989D(\u5143)\u3001\u4E70\u5165/\u5356\u51FA\u5360\u603B\u6210\u4EA4\u6BD4(%)\u3001\u4E70\u5356\u65B9\u5411(buy/sell)\u3002symbol \u4E0E date \u5747\u5FC5\u586B\uFF1Bdate \u652F\u6301 YYYYMMDD \u6216 YYYY-MM-DD\u3002",argShape:"positional",positional:[{name:"symbol",required:!0,desc:d},{name:"date",required:!0,desc:"\u4E0A\u699C\u65E5\u671F\uFF0CYYYYMMDD \u6216 YYYY-MM-DD"}]},{path:["blockTrade","marketStat"],summary:"\u5927\u5B97\u4EA4\u6613\u5E02\u573A\u7EDF\u8BA1",mcpDesc:"\u83B7\u53D6\u5927\u5B97\u4EA4\u6613\u5E02\u573A\u6BCF\u65E5\u603B\u89C8\uFF08\u6210\u4EA4\u989D\u3001\u6EA2\u4EF7\u7387\u3001\u4E70\u5356\u65B9\u7EDF\u8BA1\u7B49\uFF09\u3002",argShape:"none",mcp:!1},{path:["blockTrade","detail"],summary:"\u5927\u5B97\u4EA4\u6613\u660E\u7EC6",mcpDesc:"\u83B7\u53D6\u5927\u5B97\u4EA4\u6613\u660E\u7EC6\uFF08\u6309\u65E5\u671F\u8303\u56F4\u7B5B\u9009\uFF09\uFF1A\u6210\u4EA4\u4EF7\u3001\u6210\u4EA4\u91CF\u3001\u4E70\u5356\u8425\u4E1A\u90E8\u7B49\u3002\u7701\u7565\u65E5\u671F\u5219\u9ED8\u8BA4\u6700\u8FD1\u4E00\u6BB5\u65F6\u95F4\u3002",argShape:"options",params:N,mcp:!1},{path:["blockTrade","dailyStat"],summary:"\u5927\u5B97\u4EA4\u6613\u6BCF\u65E5\u7EDF\u8BA1",mcpDesc:"\u83B7\u53D6\u5927\u5B97\u4EA4\u6613\u6BCF\u65E5\u7EDF\u8BA1\uFF08\u6309\u80A1\u7968\u6C47\u603B\uFF09\uFF1A\u6210\u4EA4\u7B14\u6570\u3001\u6210\u4EA4\u989D\u3001\u6EA2\u4EF7\u7387\u7B49\u3002\u7701\u7565\u65E5\u671F\u5219\u9ED8\u8BA4\u6700\u8FD1\u4E00\u6BB5\u65F6\u95F4\u3002",argShape:"options",params:N,mcp:!1},{path:["margin","accountInfo"],summary:"\u878D\u8D44\u878D\u5238\u8D26\u6237\u7EDF\u8BA1",mcpDesc:"\u83B7\u53D6\u878D\u8D44\u878D\u5238\u8D26\u6237\u7EDF\u8BA1\uFF08\u878D\u8D44\u4F59\u989D\u3001\u878D\u5238\u4F59\u91CF\u3001\u4E24\u878D\u4F59\u989D\u7B49\uFF09\u3002",argShape:"none",mcp:!1},{path:["margin","targetList"],summary:"\u878D\u8D44\u878D\u5238\u6807\u7684",mcpDesc:"\u83B7\u53D6\u878D\u8D44\u878D\u5238\u6807\u7684\u660E\u7EC6\u5217\u8868\uFF08\u53EF\u878D\u8D44 / \u53EF\u878D\u5238\u6807\u5FD7\u3001\u6298\u7B97\u7387\u7B49\uFF09\u3002",argShape:"positional",positional:[{name:"date",desc:"\u4EA4\u6613\u65E5 YYYYMMDD \u6216 YYYY-MM-DD\uFF1B\u4E0D\u4F20\u5219\u53D6\u6700\u65B0\u53EF\u7528\u65E5\u671F"}],mcp:!1},{path:["fund","dividendList"],toolName:"get_fund_dividend_list",summary:"\u57FA\u91D1\u5206\u7EA2\u660E\u7EC6",mcpDesc:"\u83B7\u53D6\u57FA\u91D1\u5206\u7EA2\u660E\u7EC6\u5217\u8868\uFF08\u4E1C\u65B9\u8D22\u5BCC\u5206\u7EA2\u9001\u914D\u9891\u9053\uFF09\u3002\u63A5\u53E3\u4EC5\u652F\u6301\u300C\u5E74\u4EFD+\u5168\u5E02\u573A+\u7FFB\u9875\u300D\u67E5\u8BE2\uFF0C\u4E0D\u652F\u6301\u670D\u52A1\u7AEF\u6309\u4EE3\u7801\u7CBE\u786E\u67E5\uFF1B\u8981\u62FF\u5355\u53EA\u57FA\u91D1\u5B8C\u6574\u5206\u7EA2\u8BB0\u5F55\u8BF7\u540C\u65F6\u8BBE page='all' \u4E0E code\uFF08code \u4E3A\u5BA2\u6237\u7AEF\u8FC7\u6EE4\uFF09\u3002\u9ED8\u8BA4\u62C9\u5F53\u524D\u5E74\u7B2C 1 \u9875\u3001\u6309\u9664\u606F\u65E5(FSRQ)\u5012\u5E8F\u3002",argShape:"options",params:ue},{path:["fund","navHistory"],toolName:"get_fund_nav_history",summary:"\u57FA\u91D1\u5386\u53F2\u51C0\u503C",mcpDesc:"\u83B7\u53D6\u57FA\u91D1\u5386\u53F2\u51C0\u503C\uFF08\u5355\u4F4D\u51C0\u503C + \u7D2F\u8BA1\u51C0\u503C\uFF0C\u5168\u5386\u53F2\u4E00\u6B21\u8FD4\u56DE\uFF0C\u6309\u65E5\u671F\u5347\u5E8F\uFF09\u3002\u5F00\u653E\u5F0F / ETF / LOF / \u8D27\u5E01 / QDII \u5747\u901A\u7528\u3002\u26A0\uFE0F \u4F53\u79EF\u5927\uFF1A\u5168\u5386\u53F2\u6570\u5343\u6761\u3001\u54CD\u5E94\u4F53\u7EA6 600KB\uFF0C\u5EFA\u8BAE\u5E94\u7528\u5C42\u7F13\u5B58\u3002",argShape:"positional",positional:[n("\u57FA\u91D1\u4EE3\u7801\uFF0C\u7EAF\u6570\u5B57\uFF0C\u5982 110011")]},{path:["fund","estimate"],toolName:"get_fund_estimate",tier:"core",summary:"\u57FA\u91D1\u5F53\u65E5\u4F30\u503C",mcpDesc:"\u83B7\u53D6\u57FA\u91D1\u5F53\u65E5\u5B9E\u65F6\u4F30\u503C\uFF08\u5929\u5929\u57FA\u91D1 fundgz \u63A5\u53E3\uFF09\u3002\u540C\u65F6\u8FD4\u56DE\u6700\u65B0\u5DF2\u7ED3\u7B97\u5355\u4F4D\u51C0\u503C\uFF08nav/navDate\uFF09\u4E0E\u76D8\u4E2D\u5B9E\u65F6\u4F30\u7B97\uFF08estimatedNav/estimatedChangePercent/estimateTime\uFF0C\u6DA8\u8DCC\u5E45\u5355\u4F4D %\uFF09\u3002QDII / \u975E\u4EA4\u6613\u65E5 / \u90E8\u5206\u5C0F\u4F17\u57FA\u91D1\u7684\u4F30\u7B97\u5B57\u6BB5\u53EF\u80FD\u4E3A null\u3002",argShape:"positional",positional:[n("\u57FA\u91D1\u4EE3\u7801\uFF0C\u7EAF\u6570\u5B57\uFF0C\u5982 005827")]},{path:["fund","rankHistory"],toolName:"get_fund_rank_history",summary:"\u57FA\u91D1\u540C\u7C7B\u6392\u540D\u8D70\u52BF",mcpDesc:"\u83B7\u53D6\u57FA\u91D1\u540C\u7C7B\u6392\u540D\u8D70\u52BF\uFF08\u6BCF\u65E5\u8FD1\u4E09\u6708\u6392\u540D + \u540C\u7C7B\u603B\u6570 + \u6392\u540D\u767E\u5206\u4F4D %\uFF0C\u6309\u65E5\u671F\u5347\u5E8F\uFF09\u3002\u9002\u5408\u753B\u300C\u8BE5\u57FA\u91D1\u5728\u540C\u7C7B\u91CC\u7684\u76F8\u5BF9\u8868\u73B0\u300D\u6298\u7EBF\u56FE\u3002\u6570\u636E\u6E90\u540C get_fund_nav_history\u3002",argShape:"positional",positional:[n("\u57FA\u91D1\u4EE3\u7801\uFF0C\u7EAF\u6570\u5B57\uFF0C\u5982 110011")]},{path:["fund","profile"],toolName:"get_fund_profile",summary:"\u57FA\u91D1\u6DF1\u5EA6\u8D44\u6599",mcpDesc:"\u4E00\u6B21\u8BF7\u6C42\u83B7\u53D6\u57FA\u91D1\u6DF1\u5EA6\u8D44\u6599\uFF08\u4E1C\u65B9\u8D22\u5BCC pingzhongdata \u5168\u91CF\u5B57\u6BB5\uFF09\uFF1A\u524D\u5341\u5927\u91CD\u4ED3\u80A1\u3001\u524D\u4E94\u5927\u503A\u5238\u3001\u5B63\u5EA6\u8D44\u4EA7\u914D\u7F6E\u3001\u6BCF\u65E5\u80A1\u7968\u4ED3\u4F4D\u6D4B\u7B97\u3001\u57FA\u91D1\u7ECF\u7406\uFF08\u542B\u661F\u7EA7\u4E0E\u80FD\u529B\u8BC4\u5206\uFF09\u3001\u4E1A\u7EE9\u8BC4\u4EF7\u3001\u6301\u6709\u4EBA\u7ED3\u6784\u3001\u89C4\u6A21\u53D8\u52A8\u3001\u7533\u8D2D\u8D4E\u56DE\u3001\u9636\u6BB5\u6536\u76CA\u7387\uFF08\u8FD11\u6708/3\u6708/6\u6708/1\u5E74\uFF09\u3001\u540C\u7C7B\u57FA\u91D1\u7B49\u3002\u5B57\u6BB5\u968F\u57FA\u91D1\u7C7B\u578B\u4E0E\u6570\u636E\u5B8C\u6574\u5EA6\u53EF\u80FD\u4E3A\u7A7A\u3002\u4E0E navHistory / rankHistory \u540C\u6E90\uFF08\u540C\u4E00\u4EFD pingzhongdata \u6587\u4EF6\uFF0C\u7EA6 600KB\uFF09\uFF0C\u5EFA\u8BAE\u5E94\u7528\u5C42\u7F13\u5B58\u3002",argShape:"positional",positional:[n("\u57FA\u91D1\u4EE3\u7801\uFF0C\u7EAF\u6570\u5B57\uFF0C\u5982 000001")]},{path:["calendar","isTradingDay"],toolName:"is_trading_day",tier:"core",summary:"\u662F\u5426\u4EA4\u6613\u65E5",mcpDesc:"\u5224\u65AD\u67D0\u5929\u662F\u5426\u4E3A A \u80A1\u4EA4\u6613\u65E5\uFF08\u57FA\u4E8E\u4E0A\u6E38\u5B98\u65B9\u65E5\u5386\uFF0C\u80FD\u8BC6\u522B\u6CD5\u5B9A\u5047\u65E5\uFF09\u3002date \u53EF\u9009\uFF0C\u652F\u6301 YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u5219\u5224\u65AD\u4ECA\u5929\u3002\u8FD4\u56DE boolean\u3002",argShape:"positional",positional:[{name:"date",desc:"\u65E5\u671F YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u4E3A\u4ECA\u5929"}]},{path:["calendar","nextTradingDay"],toolName:"next_trading_day",summary:"\u4E0B\u4E00\u4EA4\u6613\u65E5",mcpDesc:"\u8FD4\u56DE\u7ED9\u5B9A\u65E5\u671F\u4E4B\u540E\u6700\u8FD1\u7684\u4E00\u4E2A A \u80A1\u4EA4\u6613\u65E5\uFF08YYYY-MM-DD\uFF09\u3002date \u53EF\u9009\uFF0C\u652F\u6301 YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u5219\u4EE5\u4ECA\u5929\u4E3A\u57FA\u51C6\u3002",argShape:"positional",positional:[{name:"date",desc:"\u57FA\u51C6\u65E5\u671F YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u4E3A\u4ECA\u5929"}]},{path:["calendar","prevTradingDay"],toolName:"prev_trading_day",summary:"\u4E0A\u4E00\u4EA4\u6613\u65E5",mcpDesc:"\u8FD4\u56DE\u7ED9\u5B9A\u65E5\u671F\u4E4B\u524D\u6700\u8FD1\u7684\u4E00\u4E2A A \u80A1\u4EA4\u6613\u65E5\uFF08YYYY-MM-DD\uFF09\u3002date \u53EF\u9009\uFF0C\u652F\u6301 YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u5219\u4EE5\u4ECA\u5929\u4E3A\u57FA\u51C6\u3002",argShape:"positional",positional:[{name:"date",desc:"\u57FA\u51C6\u65E5\u671F YYYY-MM-DD \u6216 YYYYMMDD\uFF1B\u4E0D\u4F20\u4E3A\u4ECA\u5929"}]},{path:["calendar","marketStatus"],toolName:"get_market_status",tier:"core",summary:"\u5E02\u573A\u72B6\u6001",mcpDesc:"\u83B7\u53D6\u5E02\u573A\u5F53\u524D\u5B9E\u65F6\u72B6\u6001\uFF1Apre_market(\u76D8\u524D) / open(\u4EA4\u6613\u4E2D) / lunch_break(\u5348\u4F11) / after_hours(\u76D8\u540E) / closed(\u4F11\u5E02)\u3002market \u53EF\u9009\u679A\u4E3E A/HK/US\uFF0C\u9ED8\u8BA4 A\u3002\u26A0\uFE0F \u540C\u6B65\u672C\u5730\u65F6\u949F\u5224\u65AD\u3001\u4E0D\u53D1\u8BF7\u6C42\uFF1AA \u80A1\u57FA\u4E8E\u4EA4\u6613\u65F6\u6BB5\u4F46\u4E0D\u8BC6\u522B\u6CD5\u5B9A\u5047\u65E5\uFF0C\u6E2F\u80A1/\u7F8E\u80A1\u9000\u5316\u4E3A'\u5468\u4E00-\u5468\u4E94 + \u5DF2\u77E5\u4EA4\u6613\u65F6\u6BB5'\u8FD1\u4F3C\u3002",argShape:"positional",positional:[{name:"market",upper:!0,enum:R,default:"A",desc:"\u5E02\u573A\uFF1AA=A\u80A1 / HK=\u6E2F\u80A1 / US=\u7F8E\u80A1\uFF0C\u9ED8\u8BA4 A"}]},{path:["reference","dividendDetail"],toolName:"get_dividend_detail",summary:"\u5206\u7EA2\u914D\u80A1\u660E\u7EC6",mcpDesc:"\u83B7\u53D6 A \u80A1\u5206\u7EA2\u914D\u80A1\u660E\u7EC6\uFF1A\u5386\u5E74\u9001\u8F6C\u3001\u6D3E\u606F\uFF08\u6BCF 10 \u80A1\u6D3E X \u5143\uFF09\u3001\u9664\u6743\u9664\u606F\u65E5\u3001\u80A1\u6743\u767B\u8BB0\u65E5\u7B49\u3002\u4EE3\u7801\u5E26\u4E0D\u5E26\u4EA4\u6613\u6240\u524D\u7F00\u5747\u53EF\uFF08\u5982 600519 / sh600519\uFF09\u3002",argShape:"positional",positional:[e(d)]},{path:["reference","tradingCalendar"],toolName:"get_trading_calendar",summary:"\u4EA4\u6613\u65E5\u5386(\u539F\u59CB\u6570\u7EC4)",mcpDesc:"\u83B7\u53D6 A \u80A1\u4EA4\u6613\u65E5\u5386\u539F\u59CB\u6570\u7EC4\uFF08\u5347\u5E8F 'YYYY-MM-DD' \u5B57\u7B26\u4E32\u5217\u8868\uFF0C\u6765\u81EA\u817E\u8BAF\u63A5\u53E3\uFF0C\u5E26 12 \u5C0F\u65F6\u7F13\u5B58\uFF09\u3002\u26A0\uFE0F \u4F53\u79EF\u5927\uFF1A\u8FD4\u56DE\u6570\u5343\u4E2A\u4EA4\u6613\u65E5\u3002\u53EA\u9700\u5224\u65AD\u67D0\u65E5\u662F\u5426\u4EA4\u6613\u65E5 / \u53D6\u4E0A\u4E00\u6216\u4E0B\u4E00\u4EA4\u6613\u65E5\u65F6\uFF0C\u4F18\u5148\u7528 calendar \u547D\u540D\u7A7A\u95F4\u4E0B\u7684\u5DE5\u5177\uFF0C\u65E0\u9700\u62C9\u5168\u91CF\u3002",argShape:"none"},{path:["search"],toolName:"search",tier:"core",summary:"\u641C\u7D22\u80A1\u7968/\u6307\u6570/\u57FA\u91D1",mcpDesc:"\u6A21\u7CCA\u641C\u7D22\u80A1\u7968 / \u6307\u6570 / \u57FA\u91D1\uFF08\u4EE3\u7801 / \u540D\u79F0 / \u62FC\u97F3\uFF09\u3002\u8FD4\u56DE code\u3001name\u3001market\u3001category\u3002",argShape:"positional",positional:[{name:"keyword",required:!0,desc:"\u641C\u7D22\u5173\u952E\u8BCD"}]}];function De(a){let p=_e.find(m=>m.path.join(".")===a);if(!p)throw new Error(`spec \u4E2D\u4E0D\u5B58\u5728\u65B9\u6CD5: ${a}`);return p}exports.a = ge; exports.b = R; exports.c = H; exports.d = r; exports.e = s; exports.f = u; exports.g = t; exports.h = o; exports.i = b; exports.j = ee; exports.k = te; exports.l = oe; exports.m = _e; exports.n = De;
|