Skip to content

Instantly share code, notes, and snippets.

View GloryYang's full-sized avatar

Yang GloryYang

View GitHub Profile
@GloryYang
GloryYang / ptrade-api.code-snippets
Created May 22, 2026 16:50 — forked from kay-ou/ptrade-api.code-snippets
将这个文件放入.vscode目录下即可实现开发ptrade策略时函数和签名的自动补全
{
"get_history": {
"scope": "python",
"prefix": "get_history",
"body": [
"get_history(count=${1:20}, frequency='${2:1d}', field='${3:close}', security_list=${4:candidates}, fq=${5:None}, is_dict=${6:True})"
],
"description": "获取历史行情数据"
},
"get_fundamentals": {
@GloryYang
GloryYang / builtins.pyi
Created May 22, 2026 16:50 — forked from kay-ou/builtins.pyi
将此文件保存在typings目录下,将鼠标悬停在ptrade api函数上可显示完整函数签名和文档
# -*- coding: utf-8 -*-
"""
PTrade 全局 API 类型定义
扩展 Python builtins,将 ptrade API 注入全局作用域
"""
from typing import Any, Callable, Dict, List, Optional, Union
import pandas as pd
# ==================== 基础 API ====================