feat: add xyz dex balance calculation, market data providers, and UI improvements

- Fix xyz dex balance calculation (use marginSummary for isolated margin)
- Add Alpaca provider for US stocks market data
- Add TwelveData provider for forex & metals market data
- Add Hyperliquid kline provider
- Centralize API keys in config system
- Add builder fee for order routing
- Improve chart UI with compact design
- Fix position history fee display precision
- Add comprehensive balance calculation tests
This commit is contained in:
tinkle-community
2025-12-29 22:16:48 +08:00
parent 4776fc37ce
commit 47bff87966
21 changed files with 3863 additions and 393 deletions

View File

@@ -315,9 +315,11 @@ function PositionRow({ position }: { position: HistoricalPosition }) {
</div>
</td>
{/* Fee */}
{/* Fee - show more precision for small fees */}
<td className="py-3 px-4 text-right font-mono text-xs" style={{ color: '#848E9C' }}>
-{(position.fee || 0).toFixed(2)}
-{((position.fee || 0) < 0.01 && (position.fee || 0) > 0)
? (position.fee || 0).toFixed(4)
: (position.fee || 0).toFixed(2)}
</td>
{/* Duration */}