[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FP0X33D3GSKJSMJZBDSA5M":3,"skill-same:01M6FP0X33D3GSKJSMJZBDSA5M":73},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M6FP0X33D3GSKJSMJZBDSA5M","longbridge-openapi",null,"kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002FSKILL.md",[],[17,18,19],"openapi","longbridge","longbridge openapi","2026-11-10 10:12:30",false,"# Longbridge OpenAPI\n\nLongbridge Securities OpenAPI SDK, supporting Hong Kong and US stock trading, real-time market data subscription, and account management.\n\n## Introduction\n\nLongbridge OpenAPI Skill is an AI skill package integrated with Longbridge Securities Open API, allowing you to interact with OpenClaw using natural language to easily complete stock market queries, trade orders, account management, and other operations.\n\n## Core Features\n\n### ? Market Data\n- **Real-time Market Subscription**: Subscribe to real-time market feeds for Hong Kong stocks, US stocks, and A-shares\n- **Stock Quote Query**: Get real-time data such as latest price, volume, price change, etc.\n- **Candlestick Data**: Support multiple periods including minute, day, week, month, and year\n- **Static Information**: Query basic information such as stock name, exchange, currency, lot size, etc.\n\n### ? Trading Features\n- **Smart Order Placement**: Support various order types including limit order, market order, enhanced limit order, etc.\n- **Order Management**: Cancel orders, modify orders\n- **Order Query**: View today's orders, historical orders, and trade records\n- **Multi-market Support**: Coverage of Hong Kong stocks, US stocks, and A-shares\n\n### ? Account Management\n- **Fund Query**: View account balance, buying power, and net assets in real-time\n- **Position Management**: Query current positions, cost price, market value, and other information\n- **Multi-currency Support**: Support multiple currencies including HKD, USD, CNY, etc.\n\n## Supported Markets\n\n| Market | Code Format | Examples |\n|--------|------------|----------|\n| ?? Hong Kong | `XXX.HK` | `700.HK` (Tencent), `9988.HK` (Alibaba) |\n| ?? US Stocks | `XXX.US` | `AAPL.US` (Apple), `TSLA.US` (Tesla) |\n| ?? A-Shares | `XXX.SH\u002FSZ` | `000001.SZ` (Ping An Bank), `600519.SH` (Moutai) |\n\n## Configuration Guide\n\n### 1. Obtain API Credentials\n\nVisit [Longbridge Open Platform](https:\u002F\u002Fopen.longportapp.com\u002F) to register an account and create an application to obtain:\n\n- **App Key**: Application key\n- **App Secret**: Application secret\n- **Access Token**: Access token\n\n### 2. Configure Environment Variables\n\nBefore using this skill, you must set the following environment variables:\n\n```bash\nexport LONGBRIDGE_APP_KEY=\"your_app_key_here\"\nexport LONGBRIDGE_APP_SECRET=\"your_app_secret_here\"\nexport LONGBRIDGE_ACCESS_TOKEN=\"your_access_token_here\"\n```\n\n**Persistent Configuration** (Recommended):\n\nAdd to `~\u002F.bashrc` or `~\u002F.zshrc`:\n\n```bash\n# Longbridge OpenAPI Configuration\nexport LONGBRIDGE_APP_KEY=\"your_app_key_here\"\nexport LONGBRIDGE_APP_SECRET=\"your_app_secret_here\"\nexport LONGBRIDGE_ACCESS_TOKEN=\"your_access_token_here\"\n```\n\nThen execute `source ~\u002F.bashrc` or `source ~\u002F.zshrc` to apply the configuration.\n\n## Usage Examples\n\n### Example 1: Query Stock Market Data\n\n**User Input:**\n```\nQuery the latest stock prices of Tencent and Alibaba\n```\n\n**OpenClaw Operation:**\n- Call `get_realtime_quote` tool\n- Parameters: `symbols=['700.HK', '9988.HK']`\n\n**Response:**\n```\nTencent Holdings (700.HK)\nLatest: 320.40 HKD | Change: +2.40 (+0.75%)\nOpen: 318.00 | High: 322.80 | Low: 317.60\nVolume: 1,234,567 shares | Turnover: 395M HKD\n\nAlibaba-SW (9988.HK)\nLatest: 78.50 HKD | Change: -1.20 (-1.51%)\nOpen: 79.20 | High: 80.00 | Low: 78.00\nVolume: 2,345,678 shares | Turnover: 184M HKD\n```\n\n### Example 2: Get Candlestick Data\n\n**User Input:**\n```\nGet the last 7 days of daily candlestick data for Apple stock\n```\n\n**OpenClaw Operation:**\n- Call `get_candlesticks` tool\n- Parameters: `symbol='AAPL.US', period='day', count=7`\n\n**Response:**\nContains 7 candlesticks with data including open, high, low, close, volume, etc.\n\n### Example 3: Submit Buy Order\n\n**User Input:**\n```\nBuy 100 shares of Tencent at 320 HKD\n```\n\n**OpenClaw Operation:**\n- First confirm order details with user\n- Call `submit_order` tool\n- Parameters:\n  ```python\n  symbol='700.HK'\n  order_type='LO'  # Limit order\n  side='Buy'\n  quantity=100\n  price=320.0\n  time_in_force='Day'\n  ```\n\n**Response:**\n```\n✅ Order submitted successfully\nOrder ID: 123456789\nStock: Tencent Holdings (700.HK)\nSide: Buy\nQuantity: 100 shares\nPrice: 320.00 HKD\nType: Limit Order (Day)\n```\n\n### Example 4: Query Account Information\n\n**User Input:**\n```\nWhat is my account balance?\n```\n\n**OpenClaw Operation:**\n- Call `get_account_balance` tool\n\n**Response:**\n```\n? Account Fund Status\n\nHKD Account\nCash: 50,000.00 HKD\nBuying Power: 100,000.00 HKD\nNet Assets: 150,000.00 HKD\n\nUSD Account\nCash: 10,000.00 USD\nBuying Power: 20,000.00 USD\nNet Assets: 30,000.00 USD\n```\n\n### Example 5: View Positions\n\n**User Input:**\n```\nWhat stocks do I hold?\n```\n\n**OpenClaw Operation:**\n- Call `get_stock_positions` tool\n\n**Response:**\n```\n? Current Positions\n\n1. Tencent Holdings (700.HK)\n   Quantity: 500 shares | Available: 500 shares\n   Cost: 300.00 HKD | Current: 320.40 HKD\n   Market Value: 160,200.00 HKD | P&L: +10,200.00 (+6.80%)\n\n2. Apple (AAPL.US)\n   Quantity: 100 shares | Available: 100 shares\n   Cost: 150.00 USD | Current: 175.50 USD\n   Market Value: 17,550.00 USD | P&L: +2,550.00 (+17.00%)\n```\n\n## API Tool List\n\n### Market Data Tools\n| Tool Name | Description |\n|-----------|-------------|\n| `quote_subscribe` | Subscribe to real-time market feeds (quote\u002Fdepth\u002Fbroker\u002Ftrade) |\n| `get_realtime_quote` | Get real-time stock quotes |\n| `get_static_info` | Get stock static information |\n| `get_candlesticks` | Get historical candlestick data |\n\n### Trading Tools\n| Tool Name | Description |\n|-----------|-------------|\n| `submit_order` | Submit trading orders |\n| `cancel_order` | Cancel orders |\n| `get_today_orders` | Get today's order list |\n| `get_history_orders` | Get historical orders |\n\n### Account Tools\n| Tool Name | Description |\n|-----------|-------------|\n| `get_account_balance` | Query account fund balance |\n| `get_stock_positions` | Query position list |\n\n## Order Type Description\n\n| Type Code | Order Type | Description |\n|-----------|------------|-------------|\n| `LO` | Limit Order | Execute at specified price or better |\n| `MO` | Market Order | Execute immediately at current market price |\n| `ELO` | Enhanced Limit Order | Hong Kong stocks specific, can match at multiple price levels |\n| `ALO` | At-auction Limit Order | Use during auction period |\n\n## Order Time in Force\n\n| Code | Time in Force | Description |\n|------|---------------|-------------|\n| `Day` | Day Order | Valid for the current trading day |\n| `GTC` | Good Till Cancelled | Valid until filled or manually cancelled |\n| `GTD` | Good Till Date | Valid until specified date |\n\n## Security Precautions\n\n### ⚠️ Risk Warnings\n1. **Investment Risks**: Stock trading involves market risks, users are responsible for their own investment decisions\n2. **For Learning Only**: This skill is for technical learning and research only, does not constitute investment advice\n3. **Use with Caution**: Do not use directly in production environment without thorough testing\n\n### ? Security Recommendations\n1. **Protect Keys**: Keep API keys secure, do not leak to others or commit to code repositories\n2. **Test with Demo**: Recommend testing with Longbridge demo account first\n3. **Order Confirmation**: All trading operations should be confirmed manually before execution\n4. **Permission Control**: Recommend setting minimum necessary permissions for API keys\n5. **Regular Rotation**: Regularly rotate API keys to improve security\n\n## Technical Architecture\n\n```\n┌──────────────────┐\n│    OpenClaw      │  ← User natural language interaction\n└────────┬─────────┘\n         │\n         ▼\n┌──────────────────┐\n│ Longbridge Skill │  ← Skill layer (tool invocation)\n│   (skill.py)     │\n└────────┬─────────┘\n         │\n         ▼\n┌──────────────────┐\n│ Longbridge SDK   │  ← Python SDK (FFI)\n│   (longbridge)   │\n└────────┬─────────┘\n         │\n         ▼\n┌──────────────────┐\n│ Longbridge API   │  ← REST API \u002F WebSocket\n│ (HTTP\u002FWebSocket) │\n└──────────────────┘\n```\n\n## Dependencies\n\n- **Python**: >= 3.7\n- **longbridge**: >= 0.2.77\n\nDependencies will be installed automatically when installing the skill.\n\n## Frequently Asked Questions\n\n### Q1: How to obtain API keys?\nVisit [Longbridge Open Platform](https:\u002F\u002Fopen.longportapp.com\u002F), register an account, then create an application in \"Application Management\" to obtain the keys.\n\n### Q2: Does it support demo account?\nYes, Longbridge provides demo accounts for testing. You can switch to the simulation environment on the open platform.\n\n### Q3: What to do if order submission fails?\nPlease check:\n- Are environment variables configured correctly?\n- Are API keys valid?\n- Is account balance sufficient?\n- Is trading time within market hours?\n- Are order parameters valid (price, quantity, etc.)?\n\n### Q4: Which markets are supported?\nCurrently supports stocks, ETFs, warrants, and options trading in Hong Kong, US, and A-share markets.\n\n### Q5: How to view API call logs?\nThe SDK outputs logs internally. You can configure Python's logging module to view detailed call information.\n\n## Changelog\n\n### v1.0.0 (2026-02-02)\n- ✨ Initial release\n- ✅ Support real-time market query and subscription\n- ✅ Support order submission, cancellation, and modification\n- ✅ Support account fund and position queries\n- ✅ Support historical candlestick data retrieval\n- ✅ Full coverage of Hong Kong, US, and A-share markets\n\n## References\n\n- ? [Longbridge OpenAPI Official Documentation](https:\u002F\u002Fopen.longbridge.com\u002Fdocs)\n- ? [Python SDK Documentation](https:\u002F\u002Flongbridge.readthedocs.io\u002Fen\u002Flatest\u002F)\n- ? [GitHub Source Repository](https:\u002F\u002Fgithub.com\u002Flongportapp\u002Fopenapi)\n- ? [PyPI Package](https:\u002F\u002Fpypi.org\u002Fproject\u002Flongbridge\u002F)\n- ? [Open Platform Homepage](https:\u002F\u002Fopen.longportapp.com\u002F)\n\n## License\n\nMIT License\n\n## Author\n\ngenkin\n\n## Support\n\nIf you have questions or suggestions, please contact us through:\n- Submit issues to GitHub\n- Visit Longbridge developer community\n- Refer to official documentation\n\n---\n\n**Disclaimer**: This skill is for learning and technical research only and does not constitute investment advice. Users should fully understand the risks of stock investment and be responsible for their own investment decisions.\n",{},"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fgenkin-he\u002Flongbridge-openapi",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add kbarbel640-del\u002Fskills --skill longbridge-openapi",{"tool":37,"command":38},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill longbridge-openapi",{"tool":40,"command":41},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill longbridge-openapi","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002FSKILL.md",true,[45,51,55,59,63,67],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"_meta.json","REFERENCE","参考文档",291,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002F_meta.json",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},".claude\u002Fsettings.local.json",84,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002F.claude\u002Fsettings.local.json",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"README.md",5371,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002FREADME.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"SKILL_ZH.md",9726,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002FSKILL_ZH.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"skill.json",6288,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002Fskill.json",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill.py","SCRIPT","脚本",13475,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgenkin-he\u002Flongbridge-openapi\u002Fskill.py",[74,100,124,142,147,167],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":20},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[107,83,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,88,123],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[131,132,133,134,135,136,137,84,138,121,123,139,83,140,141],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":143,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":20},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[134,133,132,131,141,136,137,84,135,121,123,138,139,83,140],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":20},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[154,155,156,157,158,159,160,161,162,163,164,165,166],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":20},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[174,175,176,177,84,178,179,24,180,139,181,182,183,184,185,97,186,187,188],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]