10 个版本 (4 个稳定版)
1.0.3 | 2021 年 9 月 15 日 |
---|---|
1.0.2 | 2021 年 8 月 21 日 |
1.0.1 | 2020 年 8 月 23 日 |
0.2.3 | 2020 年 7 月 31 日 |
0.1.0 | 2020 年 6 月 10 日 |
#4 in #stocks
440KB
12K SLoC
Rust pt API 客户端
金融科技的未来。
概述
此 API 客户端是由 swagger-codegen 项目生成的。通过使用来自远程服务器的 swagger-spec,您可以轻松生成 API 客户端。
- API 版本:1.0.1
- 包版本:0.2.4
- 构建包:com.rust.codegen.RustGenerator
安装
将包放入您的项目文件夹中,并在导入中添加以下内容
"./pt"
API 端点文档
所有 URI 都相对于 https://api.polygon.io/
类 | 方法 | HTTP 请求 | 描述 |
---|---|---|---|
CryptoApi | v1_historic_crypto_from_to_date_get | GET v1/historic/crypto/{from}/{to}/{date} | 历史加密货币交易 |
CryptoApi | v1_last_crypto_from_to_get | GET v1/last/crypto/{from}/{to} | 加密货币对的最后交易 |
CryptoApi | v1_meta_crypto_exchanges_get | GET v1/meta/crypto-exchanges | 加密货币交易所 |
CryptoApi | v1_open_close_crypto_from_to_date_get | GET v1/open-close/crypto/{from}/{to}/{date} | 每日开盘/收盘价 |
CryptoApi | v2_aggs_grouped_locale_locale_market_market_date_get | GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} | 分组每日(条形图) |
CryptoApi | v2_aggs_ticker_ticker_prev_get | GET v2/aggs/ticker/{ticker}/prev | 上一个收盘价 |
CryptoApi | v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get | GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} | 聚合(条形图) |
CryptoApi | v2_snapshot_locale_global_markets_crypto_direction_get | GET v2/snapshot/locale/global/markets/crypto/{direction} | 快照 - 收益者 / 输家 |
CryptoApi | v2_snapshot_locale_global_markets_crypto_tickers_get | GET v2/snapshot/locale/global/markets/crypto/tickers | 快照 - 所有指标 |
CryptoApi | v2_snapshot_locale_global_markets_crypto_tickers_ticker_book_get | GET v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book | 快照 - 单个指标全簿(L2) |
CryptoApi | v2_snapshot_locale_global_markets_crypto_tickers_ticker_get | GET v2/snapshot/locale/global/markets/crypto/tickers/{ticker} | 快照 - 单个指标 |
ForexCurrenciesApi | v1_conversion_from_to_get | GET v1/conversion/{from}/{to} | 实时货币转换 |
ForexCurrenciesApi | v1_historic_forex_from_to_date_get | GET v1/historic/forex/{from}/{to}/{date} | 历史外汇交易 |
ForexCurrenciesApi | v1_last_quote_currencies_from_to_get | GET v1/last_quote/currencies/{from}/{to} | 货币对的最后报价 |
ForexCurrenciesApi | v2_aggs_grouped_locale_locale_market_market_date_get | GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} | 分组每日(条形图) |
ForexCurrenciesApi | v2_aggs_ticker_ticker_prev_get | GET v2/aggs/ticker/{ticker}/prev | 上一个收盘价 |
ForexCurrenciesApi | v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get | GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} | 聚合(条形图) |
ForexCurrenciesApi | v2_snapshot_locale_global_markets_forex_direction_get | GET v2/snapshot/locale/global/markets/forex/{direction} | 快照 - 收益者 / 输家 |
ForexCurrenciesApi | v2_snapshot_locale_global_markets_forex_tickers_get | GET v2/snapshot/locale/global/markets/forex/tickers | 快照 - 所有指标 |
参考API | v1_marketstatus_now_get | GET v1/marketstatus/now | 市场状态 |
参考API | v1_marketstatus_upcoming_get | GET v1/marketstatus/upcoming | 市场假日 |
参考API | v1_meta_symbols_symbol_company_get | GET v1/meta/symbols/{symbol}/company | 股票代码详情 |
参考API | v1_meta_symbols_symbol_news_get | GET v1/meta/symbols/{symbol}/news | 股票代码新闻 |
参考API | v2_reference_dividends_symbol_get | GET v2/reference/dividends/{symbol} | 股票分红 |
参考API | v2_reference_financials_symbol_get | GET v2/reference/financials/{symbol} | 股票财务数据 |
参考API | v2_reference_locales_get | GET v2/reference/locales | 区域 |
参考API | v2_reference_markets_get | GET v2/reference/markets | 市场 |
参考API | v2_reference_splits_symbol_get | GET v2/reference/splits/{symbol} | 股票分割 |
参考API | v2_reference_tickers_get | GET v2/reference/tickers | 股票代码 |
参考API | v2_reference_types_get | GET v2/reference/types | 股票代码类型 |
StocksEquitiesApi | v1_last_quote_stocks_symbol_get | GET v1/last_quote/stocks/{symbol} | 股票代码的最新报价 |
StocksEquitiesApi | v1_last_stocks_symbol_get | GET v1/last/stocks/{symbol} | 股票代码的最新交易 |
StocksEquitiesApi | v1_meta_conditions_ticktype_get | GET v1/meta/conditions/{ticktype} | 条件映射 |
StocksEquitiesApi | v1_meta_exchanges_get | GET v1/meta/exchanges | 交易所 |
StocksEquitiesApi | v1_open_close_symbol_date_get | GET v1/open-close/{symbol}/{date} | 每日开盘/收盘价 |
StocksEquitiesApi | v2_aggs_grouped_locale_locale_market_market_date_get | GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} | 分组每日(条形图) |
StocksEquitiesApi | v2_aggs_ticker_ticker_prev_get | GET v2/aggs/ticker/{ticker}/prev | 上一个收盘价 |
StocksEquitiesApi | v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get | GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} | 聚合(条形图) |
StocksEquitiesApi | v2_snapshot_locale_us_markets_stocks_direction_get | GET v2/snapshot/locale/us/markets/stocks/{direction} | 快照 - 收益者 / 输家 |
StocksEquitiesApi | v2_snapshot_locale_us_markets_stocks_tickers_get | GET v2/snapshot/locale/us/markets/stocks/tickers | 快照 - 所有指标 |
StocksEquitiesApi | v2_snapshot_locale_us_markets_stocks_tickers_ticker_get | GET v2/snapshot/locale/us/markets/stocks/tickers/{ticker} | 快照 - 单个指标 |
StocksEquitiesApi | v2_ticks_stocks_nbbo_ticker_date_get | GET v2/ticks/stocks/nbbo/{ticker}/{date} | 历史报价(NBBO) |
StocksEquitiesApi | v2_ticks_stocks_trades_ticker_date_get | GET v2/ticks/stocks/trades/{ticker}/{date} | 历史交易 |
模型文档
- AggResponse
- 聚合
- Aggv2
- AnalystRatings
- 公司
- ConditionTypeMap
- Conflict
- CryptoExchange
- CryptoSnapshotAgg
- CryptoSnapshotBookItem
- CryptoSnapshotTicker
- CryptoSnapshotTickerBook
- CryptoTick
- CryptoTickJson
- Dividend
- Earning
- Error
- Exchange
- Financial
- Financials
- Forex
- ForexAggregate
- ForexSnapshotAgg
- ForexSnapshotTicker
- HistTrade
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse20017
- InlineResponse20017LastAverage
- InlineResponse20018
- InlineResponse20019
- InlineResponse2002
- InlineResponse20020
- InlineResponse20021
- InlineResponse20022
- InlineResponse2002Results
- InlineResponse2003
- InlineResponse2003Results
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- LastForexQuote
- LastForexTrade
- LastQuote
- LastTrade
- MarketHoliday
- MarketStatus
- MarketStatusCurrencies
- MarketStatusExchanges
- News
- NotFound
- Quote
- RatingSection
- Split
- StocksOpenClose
- StocksSnapshotAgg
- StocksSnapshotBookItem
- StocksSnapshotQuote
- StocksSnapshotTicker
- StocksSnapshotTickerBook
- StocksV2Nbbo
- StocksV2Trade
- Symbol
- SymbolTypeMap
- Ticker
- TickerCodes
- Trade
- Unauthorized
授权文档
apiKey
- 类型:API密钥
示例
auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
作者
依赖关系
~15MB
~286K SLoC