Schwab API获取账户哈希时持续返回500内部服务器错误的排查求助
Schwab API获取账户哈希时持续返回500内部服务器错误的排查求助
我正在搭建一个能通过我的嘉信(Schwab)账户进行股票交易的API。根据要求,在发送任何交易订单之前,我需要先获取账户哈希。我尝试用下面的Python代码来获取账户哈希,但一直收到500 Internal Server Error,这种情况已经持续好几天了。
我不确定这是Schwab API的内部服务器问题,还是我的代码哪里写得不对。有没有人能帮我检查一下,给点建议?
我的代码
import requests import json import base64 # Log the start of the process print("Starting token refresh process...") # Load tokens from the JSON file with open('C:/######/tokens.json') as f: tokens = json.load(f) # Access the refresh and access tokens directly refresh_token = tokens['refresh_token'] access_token = tokens['access_token'] print("Tokens loaded successfully.") # Prepare the headers and payload...
备注:内容来源于stack exchange,提问作者Johnny Zhao
相关产品推荐
相关产品推荐

