robinhoodApi
  1. 持股
robinhoodApi
  • 身份验证
    • 登录
      POST
    • 登录令牌刷新
      POST
  • 账户
    • 用户信息
      GET
    • 用户基本信息
      GET
    • 账户持有人的关联信息
      GET
    • 账户列表
      GET
    • 账户信息
      GET
    • 账户持有人的就业数据
      GET
    • 账户持有人的投资概况数据
      GET
  • 持股
    • 账户头寸
      GET
    • 账户仓位
      GET
  • 股票
    • 股票列表
      GET
    • 股票信息
      GET
    • 股票信息2
      GET
    • 股票报价信息
      GET
  • 订单
    • 订单详情
      GET
    • 订单列表
      GET
    • 下单
      POST
    • 取消订单
      POST
  • 投资组合
    • 投资组合
      GET
  1. 持股

账户头寸

开发中
GET
/positions/

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Query 参数
account_number
string 
账户号
可选
示例值:
{{account_number}}
nonzero
boolean 
不展示为零的
可选
示例值:
true

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.robinhood.com/positions/?account_number={{account_number}}&nonzero=true'

返回响应

🟢200成功
application/json
Body
next
null 
必需
previous
null 
必需
results
array [object {34}] 
必需
url
string 
必需
instrument
string 
必需
instrument_id
string 
股票ID
必需
symbol
string 
股票代码
必需
account
string 
股票交易金额
必需
account_number
string 
股票交易账户
必需
brokerage_account_type
string 
必需
average_buy_price
string 
平均购买价格
必需
pending_average_buy_price
string 
必需
quantity
string 
股票交易数量
必需
intraday_average_buy_price
string 
必需
intraday_quantity
string 
必需
shares_available_for_exercise
string 
必需
shares_available_for_sells
string 
必需
shares_held_for_buys
string 
必需
shares_held_for_sells
string 
持有待售股份
必需
shares_held_for_stock_grants
string 
必需
shares_held_for_options_collateral
string 
必需
shares_held_for_options_events
string 
必需
shares_pending_from_options_events
string 
必需
shares_available_for_closing_short_position
string 
必需
ipo_allocated_quantity
string 
必需
ipo_dsp_allocated_quantity
string 
必需
avg_cost_affected
boolean 
必需
avg_cost_affected_reason
array | null 
必需
is_primary_account
boolean 
必需
updated_at
string 
更新日期
必需
created_at
string 
创建日期
必需
instrument_is_halted
boolean 
必需
clearing_cost_basis
null 
必需
clearing_running_quantity
null 
必需
clearing_intraday_cost_basis
null 
必需
clearing_intraday_running_quantity
null 
必需
custom_tax_lot_selection_eligible
boolean 
必需
示例
{
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "string",
            "instrument": "string",
            "instrument_id": "string",
            "symbol": "string",
            "account": "string",
            "account_number": "string",
            "brokerage_account_type": "string",
            "average_buy_price": "string",
            "pending_average_buy_price": "string",
            "quantity": "string",
            "intraday_average_buy_price": "string",
            "intraday_quantity": "string",
            "shares_available_for_exercise": "string",
            "shares_available_for_sells": "string",
            "shares_held_for_buys": "string",
            "shares_held_for_sells": "string",
            "shares_held_for_stock_grants": "string",
            "shares_held_for_options_collateral": "string",
            "shares_held_for_options_events": "string",
            "shares_pending_from_options_events": "string",
            "shares_available_for_closing_short_position": "string",
            "ipo_allocated_quantity": "string",
            "ipo_dsp_allocated_quantity": "string",
            "avg_cost_affected": true,
            "avg_cost_affected_reason": [
                null
            ],
            "is_primary_account": true,
            "updated_at": "string",
            "created_at": "string",
            "instrument_is_halted": true,
            "clearing_cost_basis": null,
            "clearing_running_quantity": null,
            "clearing_intraday_cost_basis": null,
            "clearing_intraday_running_quantity": null,
            "custom_tax_lot_selection_eligible": true
        }
    ]
}
修改于 2024-10-08 05:25:39
上一页
账户持有人的投资概况数据
下一页
账户仓位
Built with