1 个稳定版本
1.0.0 | 2021年2月1日 |
---|
#5 在 #tinkoff
105KB
2K SLoC
Rust API 客户端用于 openapi
tinkoff.ru/invest OpenAPI。
概述
此 API 客户端是由 OpenAPI Generator 项目生成的。通过使用来自远程服务器的 openapi-spec,您可以轻松地生成 API 客户端。
- API 版本:1.0.0
- 包版本:1.0.0
- 构建包:org.openapitools.codegen.languages.RustClientCodegen
安装
将以下内容添加到 Cargo.toml
下的 [dependencies]
tinkoff-api = 1.0.0
API 端点文档
所有 URI 都是相对于 https://api-invest.tinkoff.ru/openapi
类 | 方法 | HTTP 请求 | 描述 |
---|---|---|---|
MarketApi | market_bonds_get | get /market/bonds | 获取债券列表 |
MarketApi | market_candles_get | get /market/candles | 获取按 FIGI 的历史蜡烛 |
MarketApi | market_currencies_get | get /market/currencies | 获取货币对列表 |
MarketApi | market_etfs_get | get /market/etfs | 获取 ETF 列表 |
MarketApi | market_orderbook_get | get /market/orderbook | 获取按 FIGI 的订单簿 |
MarketApi | market_search_by_figi_get | get /market/search/by-figi | 获取按 FIGI 的工具 |
MarketApi | market_search_by_ticker_get | get /market/search/by-ticker | 获取按交易代码的工具 |
MarketApi | market_stocks_get | get /market/stocks | 获取股票列表 |
OperationsApi | operations_get | get /operations | 获取操作列表 |
OrdersApi | orders_cancel_post | post /orders/cancel | 取消订单 |
OrdersApi | orders_get | get /orders | 获取活动订单列表 |
OrdersApi | orders_limit_order_post | post /orders/limit-order | 创建限价订单 |
OrdersApi | orders_market_order_post | post /orders/market-order | 创建市价订单 |
PortfolioApi | portfolio_currencies_get | get /portfolio/currencies | 获取客户货币资产 |
PortfolioApi | portfolio_get | get /portfolio | 获取客户投资组合 |
SandboxApi | sandbox_clear_post | post /sandbox/clear | 删除所有仓位 |
SandboxApi | sandbox_currencies_balance_post | post /sandbox/currencies/balance | 设置货币仓位余额 |
SandboxApi | sandbox_positions_balance_post | post /sandbox/positions/balance | 根据工具头寸设置余额 |
SandboxApi | sandbox_register_post | post /sandbox/register | 在sandbox中注册客户 |
SandboxApi | sandbox_remove_post | post /sandbox/remove | 删除账户 |
UserApi | user_accounts_get | get /user/accounts | 获取客户经纪账户 |
模型文档
- BrokerAccountType
- Candle
- CandleResolution
- Candles
- CandlesResponse
- Currencies
- Currency
- CurrencyPosition
- Empty
- Error
- ErrorPayload
- InstrumentType
- LimitOrderRequest
- LimitOrderResponse
- MarketInstrument
- MarketInstrumentList
- MarketInstrumentListResponse
- MarketInstrumentResponse
- MarketOrderRequest
- MarketOrderResponse
- MoneyAmount
- Operation
- OperationStatus
- OperationTrade
- OperationType
- OperationTypeWithCommission
- Operations
- OperationsResponse
- Order
- OrderResponse
- OrderStatus
- OrderType
- Orderbook
- OrderbookResponse
- OrdersResponse
- PlacedLimitOrder
- PlacedMarketOrder
- Portfolio
- PortfolioCurrenciesResponse
- PortfolioPosition
- PortfolioResponse
- SandboxAccount
- SandboxCurrency
- SandboxRegisterRequest
- SandboxRegisterResponse
- SandboxSetCurrencyBalanceRequest
- SandboxSetPositionBalanceRequest
- SearchMarketInstrument
- SearchMarketInstrumentResponse
- TradeStatus
- UserAccount
- UserAccounts
- UserAccountsResponse
要获取crate生成的文档,请使用
cargo doc --open
作者
依赖项
~3–7.5MB
~171K SLoC