Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何把token信息 配置在yaml文件里面读取,而不是env里面读取 #113

Open
cunsheng153 opened this issue Nov 15, 2024 · 4 comments

Comments

@cunsheng153
Copy link

问题描述

如何把需要导入的token信息放入到yml里面读取,而不是从env::var获取,用自己封装的struct覆盖Config

代码例子

![image](https://github.com/user-attachments/assets/45fed702-dfad-456b-b277-8aa365e17d99)

错误信息或结果截图

如果可以,请给出一些执行的结果截图,最好给完整截图,避免关键信息遗漏(请注意保护你的 Access Token)
image

你的环境信息

  • 操作系统: liunx
  • 开发语言: rust
  • SDK 版本号:
@flisky
Copy link
Contributor

flisky commented Nov 15, 2024

可以自行解析 yaml 文件后调用 Config::new 创建 Config 对象。

@crazydragon8888
Copy link

可以自行解析 yaml 文件后调用 Config::new 创建 Config 对象。

这个错误怎么解决呢?
大佬 出现 code":602001,"message":"time in force not support", "data”:nu11}
长桥不在交易时间
长桥1

@cunsheng153
Copy link
Author

可以自行解析 yaml 文件后调用 Config::new 创建 Config 对象。

这个错误怎么解决呢? 大佬 出现 code":602001,"message":"time in force not support", "data”:nu11} 长桥不在交易时间 长桥1

没遇到,你可以自己开个issue,问开源方。

@BenXiangYangGuang
Copy link

  ConfigBuilder builder = new ConfigBuilder(appKey,appSecret,accessToken);
  Config config = builder.build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants