这是我第一次使用robinhood api,我正在试用他们的文档:https://readthedocs.org/projects/robin-stocks/downloads/pdf/latest/,但其中一个关键功能不起作用。当我打电话时 robin_stocks.get_current_positions()
我得到了错误 AttributeError: module 'robin_stocks' has no attribute 'get_current_positions'
这是我的密码:
import robin_stocks, json
from robin_stocks import *
import robin_stocks as r
import sys
import time
import requests
content = open('config.json').read()
config = json.loads(content)
login = r.login(config['username'],config['password'], store_session=True)
my_stocks = robin_stocks.build_holdings()
for key,value in my_stocks.items():
mystocks = key,value
print(mystocks)
WEIbalance = mystocks[1]['equity']
WEI = mystocks[0]
print('YY', WEI)
positions_data = robin_stocks.get_current_positions()
print('my equity', WEIbalance)
print(positions_data)
这是我的错误吗?
1条答案
按热度按时间pgvzfuti1#
截至本次提交时,获取当前头寸已重命名为获取未结库存头寸(),相应的问题可在此处找到