| 1 | { |
| 2 | "data": { |
| 3 | "404.qelo.near": { |
| 4 | "widget": { |
| 5 | "Rebalancing": { |
| 6 | "": "// Initialize State\\\\nState.init({\\\\n targetAlt: 60,\\\\n targetStable: 40,\\\\n currAlt: 0,\\\\n currStable: 0,\\\\n showResult: false,\\\\n});\\\\n\\\\nconst calculateRebalance = () => {\\\\n const total = parseFloat(state.currAlt) + parseFloat(state.currStable);\\\\n const targetAltVal = total * (state.targetAlt / 100);\\\\n const diff = targetAltVal - state.currAlt;\\\\n\\\\n State.update({\\\\n diff: diff,\\\\n showResult: true,\\\\n });\\\\n};\\\\n\\\\nconst Container = styled.div`\\\\n background: #1a1b1e;\\\\n color: #fff;\\\\n padding: 20px;\\\\n border-radius: 12px;\\\\n font-family: sans-serif;\\\\n max-width: 400px;\\\\n margin: 0 auto;\\\\n`;\\\\n\\\\nconst InputGroup = styled.div`\\\\n margin-bottom: 15px;\\\\n label { display: block; font-size: 12px; color: #aaa; margin-bottom: 4px; }\\\\n input { \\\\n width: 100%; \\\\n background: #2c2e33; \\\\n border: 1px solid #3f4248; \\\\n color: #fff; \\\\n padding: 8px; \\\\n border-radius: 6px; \\\\n }\\\\n`;\\\\n\\\\nconst Button = styled.button`\\\\n width: 100%;\\\\n background: #00ec97; // NEAR Mint Green\\\\n color: #111;\\\\n border: none;\\\\n padding: 12px;\\\\n border-radius: 6px;\\\\n font-weight: bold;\\\\n cursor: pointer;\\\\n &:hover { opacity: 0.8; }\\\\n`;\\\\n\\\\nconst Result = styled.div`\\\\n margin-top: 20px;\\\\n padding: 15px;\\\\n background: #25262b;\\\\n border-left: 4px solid ${(props) => (props.isBuy ? \\\\\\\"#00ec97\\\\\\\" : \\\\\\\"#ff585d\\\\\\\")};\\\\n border-radius: 4px;\\\\n`;\\\\n\\\\nreturn (\\\\n <Container>\\\\n <h3 style={{ marginBottom: \\\\\\\"20px\\\\\\\", fontSize: \\\\\\\"18px\\\\\\\" }}>\\\\n Portfolio Rebalancer\\\\n </h3>\\\\n\\\\n <div style={{ display: \\\\\\\"flex\\\\\\\", gap: \\\\\\\"10px\\\\\\\" }}>\\\\n <InputGroup>\\\\n <label>Target Alt %</label>\\\\n <input\\\\n type=\\\\\\\"number\\\\\\\"\\\\n value={state.targetAlt}\\\\n onChange={(e) => State.update({ targetAlt: e.target.value })}\\\\n />\\\\n </InputGroup>\\\\n <InputGroup>\\\\n <label>Target Stable %</label>\\\\n <input\\\\n type=\\\\\\\"number\\\\\\\"\\\\n value={state.targetStable}\\\\n onChange={(e) => State.update({ targetStable: e.target.value })}\\\\n />\\\\n </InputGroup>\\\\n </div>\\\\n\\\\n <hr style={{ borderColor: \\\\\\\"#333\\\\\\\", margin: \\\\\\\"10px 0 20px 0\\\\\\\" }} />\\\\n\\\\n <InputGroup>\\\\n <label>Current Altcoins (USD)</label>\\\\n <input\\\\n type=\\\\\\\"number\\\\\\\"\\\\n placeholder=\\\\\\\"0.00\\\\\\\"\\\\n onChange={(e) => State.update({ currAlt: e.target.value })}\\\\n />\\\\n </InputGroup>\\\\n\\\\n <InputGroup>\\\\n <label>Current Stables (USD)</label>\\\\n <input\\\\n type=\\\\\\\"number\\\\\\\"\\\\n placeholder=\\\\\\\"0.00\\\\\\\"\\\\n onChange={(e) => State.update({ currStable: e.target.value })}\\\\n />\\\\n </InputGroup>\\\\n\\\\n <Button onClick={calculateRebalance}>Calculate Action</Button>\\\\n\\\\n {state.showResult && state.diff !== 0 && (\\\\n <Result isBuy={state.diff > 0}>\\\\n <div style={{ fontSize: \\\\\\\"12px\\\\\\\", color: \\\\\\\"#aaa\\\\\\\" }}>Recommendation:</div>\\\\n <div style={{ fontSize: \\\\\\\"16px\\\\\\\", fontWeight: \\\\\\\"bold\\\\\\\", marginTop: \\\\\\\"5px\\\\\\\" }}>\\\\n {state.diff > 0 ? (\\\\n <span>BUY ${state.diff.toFixed(2)} Altcoins</span>\\\\n ) : (\\\\n <span>SELL ${Math.abs(state.diff).toFixed(2)} Altcoins</span>\\\\n )}\\\\n </div>\\\\n <div style={{ fontSize: \\\\\\\"11px\\\\\\\", marginTop: \\\\\\\"5px\\\\\\\", opacity: 0.7 }}>\\\\n To maintain {state.targetAlt}/{state.targetStable} ratio.\\\\n </div>\\\\n </Result>\\\\n )}\\\\n </Container>\\\\n);\\\\n" |
| 7 | } |
| 8 | } |
| 9 | } |
| 10 | } |
| 11 | } |
| 1 | eyJibG9ja19oZWlnaHQiOiIxOTI0NjEzODUifQ== |
| 1 | |
| 1 | { |
| 2 | "deposit": "9660177164666300000000" |
| 3 | } |
Empty Result
| 1 | |