feat: harden trading SDK examples
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Shared Infrastructure
|
||||
|
||||
[中文](README_CN.md)
|
||||
|
||||
Demonstrates sharing one `TradingInfrastructure` across multiple wallet-specific `TradingClient` values. This reduces connection, memory, and initialization overhead in multi-wallet services.
|
||||
|
||||
Replace the RPC, SWQoS credentials, and all wallet placeholders in `src/main.rs`. The example initializes clients and prints sharing information; it does not submit a trade.
|
||||
|
||||
```bash
|
||||
cargo run --package shared_infrastructure
|
||||
```
|
||||
|
||||
Only share infrastructure when wallets use the same RPC, commitment, and submission routes. Keep wallet signing and position state isolated.
|
||||
@@ -0,0 +1,13 @@
|
||||
# 多钱包共享基础设施
|
||||
|
||||
[English](README.md)
|
||||
|
||||
展示多个钱包专属 `TradingClient` 共享一份 `TradingInfrastructure`,降低多钱包服务的连接数、内存和初始化开销。
|
||||
|
||||
运行前替换 `src/main.rs` 中的 RPC、SWQoS 凭证和全部钱包占位值。示例只初始化客户端并打印共享信息,不提交交易。
|
||||
|
||||
```bash
|
||||
cargo run --package shared_infrastructure
|
||||
```
|
||||
|
||||
只有钱包使用相同 RPC、commitment 和提交通道时才共享基础设施;签名权限和持仓状态仍必须按钱包隔离。
|
||||
Reference in New Issue
Block a user