import{y as t,Q as r}from"./index.b616fdab.js";const b=()=>t({url:"/trader/api/v1/accounts",method:"GET"}),l=s=>t({url:"/trader/api/v1/tick/"+s,method:"GET"}),_=()=>t({url:"/trader/api/v1/ticks",method:"GET"}),h=s=>t({url:"/trader/api/v1/order",method:"POST",data:s}),u=s=>t({url:"/trader/api/v1/subscribe/"+s,method:"GET"}),a=()=>t({url:"/trader/api/v1/subscribe/vt_symbols",method:"GET"}),d=s=>t({url:"/trader/api/v1/subscribe/"+s,method:"DELETE"}),c=()=>t({url:"/trader/api/v1/vt_symbols",method:"GET"}),o=()=>t({url:"/trader/api/v1/exchanges",method:"GET"}),m=r({id:"strategy",state:()=>({class_names:[],vt_symbols:new Map,subscribe_vt_symbols:[],exchanges:[]}),actions:{async select_exchanges(){this.exchanges.length==0&&o().then(s=>{this.$patch({exchanges:s.data.exchanges})})},async select_vt_symbols(){this.vt_symbols.size==0&&c().then(s=>{Object.keys(s.data.vt_symbols).forEach(e=>{this.vt_symbols.set(e,s.data.vt_symbols[e])})})},async select_subscribe_vt_symbols(){this.subscribe_vt_symbols.length==0&&a().then(s=>{this.$patch({subscribe_vt_symbols:s.data.vt_symbols})})}}});export{u as a,b,d as c,l as d,h as e,_ as g,m as s};
