#api #generated #web-api #endpoint #api-client #generator #openapi

ib_client

使用 openapi 生成器通过 reqwest 生成的异步 Interactive Broker 客户端门户 Web API

1 个稳定版本

1.0.0 2021年2月22日

#37 in #endpoint

Apache-2.0

365KB
6K SLoC

Rust API 客户端用于 openapi

客户端门户 Web API 您需要在生产环境中设置证书才能使用此客户端。

对于本地开发,您可以在 clientportal.gw/root/conf.yaml 中配置网关以禁用 ssl 验证

listenSsl: false

概述

此 API 客户端由 OpenAPI Generator 项目生成。通过使用来自远程服务器的 openapi-spec,您可以轻松生成 API 客户端。

  • API 版本:1.0.0
  • 包版本:1.0.0
  • 构建包:org.openapitools.codegen.languages.RustClientCodegen

API 端点文档

所有 URI 都相对于 https://127.0.0.1:5000/v1/api

方法 HTTP 请求 描述
AccountApi iserver_account_pnl_partitioned_get get /iserver/account/pnl/partitioned 所选账户的 PnL
AccountApi iserver_account_post post /iserver/account 切换账户
AccountApi iserver_accounts_get get /iserver/accounts 经纪账户
AccountApi portfolio_account_id_ledger_get get /portfolio/{accountId}/ledger 账户账簿
AccountApi portfolio_account_id_meta_get get /portfolio/{accountId}/meta 账户信息
AccountApi portfolio_account_id_summary_get get /portfolio/{accountId}/summary 账户摘要
AccountApi portfolio_accounts_get get /portfolio/accounts 投资组合账户
AccountApi portfolio_subaccounts_get get /portfolio/subaccounts 子账户列表
AlertApi iserver_account_account_id_alert_activate_post post /iserver/account/{accountId}/alert/activate 激活或停用警报
AlertApi iserver_account_account_id_alert_alert_id_delete delete /iserver/account/{accountId}/alert/{alertId} 删除警报
AlertApi iserver_account_account_id_alert_post post /iserver/account/{accountId}/alert 创建或修改警报
AlertApi iserver_account_account_id_alerts_get get /iserver/account/{accountId}/alerts 获取可用警报的列表
AlertApi iserver_account_alert_id_get get /iserver/account/alert/:id 获取警报的详细信息
AlertApi iserver_account_mta_get get /iserver/account/mta 获取 MTA 警报
ContractApi iserver_contract_conid_info_and_rules_get get /iserver/contract/{conid}/info-and-rules 信息和规则
ContractApi iserver_contract_conid_info_get get /iserver/contract/{conid}/info 合约详情
ContractApi iserver_secdef_info_get get /iserver/secdef/info Secdef 信息
ContractApi iserver_secdef_search_post post /iserver/secdef/search 通过符号或名称搜索
ContractApi iserver_secdef_strikes_get get /iserver/secdef/strikes 搜索交易限制
ContractApi trsrv_futures_get get /trsrv/futures 按符号搜索证券期货
ContractApi trsrv_secdef_post post /trsrv/secdef 按 Conid 搜索 Secdef
ContractApi trsrv_secdef_schedule_get get /trsrv/secdef/schedule 获取特定符号的交易时间表
ContractApi trsrv_stocks_get get /trsrv/stocks 按符号搜索证券股票
FYIApi fyi_deliveryoptions_device_id_delete delete /fyi/deliveryoptions/{deviceId} 删除设备
FYIApi fyi_deliveryoptions_device_post post /fyi/deliveryoptions/device 启用/禁用设备选项
FYIApi fyi_deliveryoptions_email_put put /fyi/deliveryoptions/email 启用/禁用电子邮件选项
FYIApi fyi_deliveryoptions_get get /fyi/deliveryoptions 获取投递选项
FYIApi fyi_disclaimer_typecode_get get /fyi/disclaimer/{typecode} 获取特定类型 fyi 的免责声明
FYIApi fyi_disclaimer_typecode_put put /fyi/disclaimer/{typecode} 标记免责声明为已读
FYIApi fyi_notifications_get get /fyi/notifications 获取通知列表
FYIApi fyi_notifications_more_get get /fyi/notifications/more 基于特定通知获取更多通知
FYIApi fyi_notifications_notification_id_put put /fyi/notifications/{notificationId} 获取通知列表
FYIApi fyi_settings_get get /fyi/settings 获取订阅列表
FYIApi fyi_settings_typecode_post post /fyi/settings/{typecode} 启用/禁用特定订阅
FYIApi fyi_unreadnumber_get get /fyi/unreadnumber 获取未读 fyis 数量。也支持 POST HTTP 方法。
IBCustApi ibcust_entity_info_get get /ibcust/entity/info IBCust 实体信息
MarketDataApi iserver_marketdata_conid_unsubscribe_get get /iserver/marketdata/{conid}/unsubscribe 市场数据取消(单个)
MarketDataApi iserver_marketdata_history_get get /iserver/marketdata/history 市场数据历史记录
MarketDataApi iserver_marketdata_snapshot_get get /iserver/marketdata/snapshot 市场数据
MarketDataApi iserver_marketdata_unsubscribeall_get get /iserver/marketdata/unsubscribeall 市场数据取消(全部)
OrderApi iserver_account_account_id_order_order_id_delete delete /iserver/account/{accountId}/order/{orderId} 取消订单
OrderApi iserver_account_account_id_order_order_id_post post /iserver/account/{accountId}/order/{orderId} 修改订单
OrderApi iserver_account_account_id_order_post post /iserver/account/{accountId}/order 下单
OrderApi iserver_account_account_id_order_whatif_post post /iserver/account/{accountId}/order/whatif 预览订单
OrderApi iserver_account_account_id_orders_post post /iserver/account/{accountId}/orders 下单(支持括号订单)
OrderApi iserver_account_orders_fa_group_post post /iserver/account/orders/{faGroup} 为财务顾问团体下单
OrderApi iserver_account_orders_get get /iserver/account/orders 实时订单
OrderApi iserver_reply_replyid_post post /iserver/reply/{replyid} 下单回复
PnLApi iserver_account_pnl_partitioned_get get /iserver/account/pnl/partitioned 所选账户的 PnL
PortfolioApi portfolio_account_id_allocation_get get /portfolio/{accountId}/allocation 账户分配
PortfolioApi portfolio_account_id_ledger_get get /portfolio/{accountId}/ledger 账户账簿
PortfolioApi portfolio_account_id_meta_get get /portfolio/{accountId}/meta 账户信息
PortfolioApi portfolio_account_id_position_conid_get get /portfolio/{accountId}/position/{conid} 按 Conid 获取头寸
PortfolioApi portfolio_account_id_positions_invalidate_post post /portfolio/{accountId}/positions/invalidate 使投资组合的后端缓存无效
PortfolioApi portfolio_account_id_positions_page_id_get get /portfolio/{accountId}/positions/{pageId} 投资组合头寸
PortfolioApi portfolio_account_id_summary_get get /portfolio/{accountId}/summary 账户摘要
PortfolioApi portfolio_accounts_get get /portfolio/accounts 投资组合账户
PortfolioApi portfolio_allocation_post post /portfolio/allocation 账户分配(所有账户)
PortfolioApi portfolio_positions_conid_get get /portfolio/positions/{conid} 按 Conid 获取头寸
PortfolioApi portfolio_subaccounts_get get /portfolio/subaccounts 子账户列表
投资组合分析师API pa_performance_post post /pa/performance 账户业绩
投资组合分析师API pa_summary_post post /pa/summary 账户余额概要
投资组合分析师API pa_transactions_post post /pa/transactions 持仓交易历史
扫描器API iserver_scanner_params_get get /iserver/scanner/params 扫描器参数
扫描器API iserver_scanner_run_post post /iserver/scanner/run 运行扫描器以获取合约列表
会话API iserver_auth_status_post post /iserver/auth/status 身份验证状态
会话API iserver_reauthenticate_post post /iserver/reauthenticate 尝试重新验证到经纪商
会话API logout_post post /logout 结束当前会话
会话API sso_validate_get get /sso/validate 验证SSO
会话API tickle_post post /tickle ping服务器以保持会话开启
流式API ws_post post /ws Websocket端点
交易API iserver_account_trades_get get /iserver/account/trades 所选账户的交易列表

模型文档

要获取crate生成的文档,请使用

cargo doc --open

作者

依赖项

~3–7MB
~169K SLoC