You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 12:49:36