## 提示

- `live-or-trading-module-only`
- `broker-or-counter-dependent`


## 原型

```python
get_marginsec_stocks()
```

## 释义

get_marginsec_stocks 是 PTrade 中用于获取融券标的列表的接口。

研究：不支持；回测：不支持；模拟：官方目录未明确；实盘：支持。

## 参数

官方结构化目录未列出独立参数。请以本页函数签名和下方官方原文为准。

## 返回值

返回上交所、深交所最近一次披露的的可融券标的列表的list(list[str,...])

['000002.SZ', '000519.SZ', '600570.SS', '600519.SS']

## 示例

```python
def initialize(context):

g.security = '600570.SS'

set_universe(g.security)

def handle_data(context, data):

# 获取最新的融券标的列表

marginsec_stocks = get_marginsec_stocks()

log.info(marginsec_stocks)
```

## 详细说明

get_marginsec_stocks()

### 使用场景

该函数仅支持PTrade客户端可用，仅在两融交易模块可用，对接顶点HTS柜台暂不支持该函数。

### 接口说明

该接口用于获取融券标的。

### 注意事项

无

### 参数详细说明

无

### 返回值

返回上交所、深交所最近一次披露的的可融券标的列表的list(list[str,...])

['000002.SZ', '000519.SZ', '600570.SS', '600519.SS']
