#financial-data #api-client #crypto #io #stock #platform #forex

pt

A client for polygon.io, a financial data platform for stocks, forex and crypto

10 releases (4 stable)

1.0.3 Sep 15, 2021
1.0.2 Aug 21, 2021
1.0.1 Aug 23, 2020
0.2.3 Jul 31, 2020
0.1.0 Jun 10, 2020

#16 in #stocks

32 downloads per month

MIT license

440KB
12K SLoC

Rust API client for pt

The future of fintech.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.1
  • Package version: 0.2.4
  • Build package: com.rust.codegen.RustGenerator

Installation

Put the package under your project folder and add the following in import:

    "./pt"

Documentation for API Endpoints

All URIs are relative to https://api.polygon.io/

Class Method HTTP request Description
CryptoApi v1_historic_crypto_from_to_date_get GET v1/historic/crypto/{from}/{to}/{date} Historic Crypto Trades
CryptoApi v1_last_crypto_from_to_get GET v1/last/crypto/{from}/{to} Last Trade for a Crypto Pair
CryptoApi v1_meta_crypto_exchanges_get GET v1/meta/crypto-exchanges Crypto Exchanges
CryptoApi v1_open_close_crypto_from_to_date_get GET v1/open-close/crypto/{from}/{to}/{date} Daily Open / Close
CryptoApi v2_aggs_grouped_locale_locale_market_market_date_get GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} Grouped Daily ( Bars )
CryptoApi v2_aggs_ticker_ticker_prev_get GET v2/aggs/ticker/{ticker}/prev Previous Close
CryptoApi v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates ( Bars )
CryptoApi v2_snapshot_locale_global_markets_crypto_direction_get GET v2/snapshot/locale/global/markets/crypto/{direction} Snapshot - Gainers / Losers
CryptoApi v2_snapshot_locale_global_markets_crypto_tickers_get GET v2/snapshot/locale/global/markets/crypto/tickers Snapshot - All Tickers
CryptoApi v2_snapshot_locale_global_markets_crypto_tickers_ticker_book_get GET v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book Snapshot - Single Ticker Full Book ( L2 )
CryptoApi v2_snapshot_locale_global_markets_crypto_tickers_ticker_get GET v2/snapshot/locale/global/markets/crypto/tickers/{ticker} Snapshot - Single Ticker
ForexCurrenciesApi v1_conversion_from_to_get GET v1/conversion/{from}/{to} Real-time Currency Conversion
ForexCurrenciesApi v1_historic_forex_from_to_date_get GET v1/historic/forex/{from}/{to}/{date} Historic Forex Ticks
ForexCurrenciesApi v1_last_quote_currencies_from_to_get GET v1/last_quote/currencies/{from}/{to} Last Quote for a Currency Pair
ForexCurrenciesApi v2_aggs_grouped_locale_locale_market_market_date_get GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} Grouped Daily ( Bars )
ForexCurrenciesApi v2_aggs_ticker_ticker_prev_get GET v2/aggs/ticker/{ticker}/prev Previous Close
ForexCurrenciesApi v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates ( Bars )
ForexCurrenciesApi v2_snapshot_locale_global_markets_forex_direction_get GET v2/snapshot/locale/global/markets/forex/{direction} Snapshot - Gainers / Losers
ForexCurrenciesApi v2_snapshot_locale_global_markets_forex_tickers_get GET v2/snapshot/locale/global/markets/forex/tickers Snapshot - All Tickers
ReferenceApi v1_marketstatus_now_get GET v1/marketstatus/now Market Status
ReferenceApi v1_marketstatus_upcoming_get GET v1/marketstatus/upcoming Market Holidays
ReferenceApi v1_meta_symbols_symbol_company_get GET v1/meta/symbols/{symbol}/company Ticker Details
ReferenceApi v1_meta_symbols_symbol_news_get GET v1/meta/symbols/{symbol}/news Ticker News
ReferenceApi v2_reference_dividends_symbol_get GET v2/reference/dividends/{symbol} Stock Dividends
ReferenceApi v2_reference_financials_symbol_get GET v2/reference/financials/{symbol} Stock Financials
ReferenceApi v2_reference_locales_get GET v2/reference/locales Locales
ReferenceApi v2_reference_markets_get GET v2/reference/markets Markets
ReferenceApi v2_reference_splits_symbol_get GET v2/reference/splits/{symbol} Stock Splits
ReferenceApi v2_reference_tickers_get GET v2/reference/tickers Tickers
ReferenceApi v2_reference_types_get GET v2/reference/types Ticker Types
StocksEquitiesApi v1_last_quote_stocks_symbol_get GET v1/last_quote/stocks/{symbol} Last Quote for a Symbol
StocksEquitiesApi v1_last_stocks_symbol_get GET v1/last/stocks/{symbol} Last Trade for a Symbol
StocksEquitiesApi v1_meta_conditions_ticktype_get GET v1/meta/conditions/{ticktype} Condition Mappings
StocksEquitiesApi v1_meta_exchanges_get GET v1/meta/exchanges Exchanges
StocksEquitiesApi v1_open_close_symbol_date_get GET v1/open-close/{symbol}/{date} Daily Open / Close
StocksEquitiesApi v2_aggs_grouped_locale_locale_market_market_date_get GET v2/aggs/grouped/locale/{locale}/market/{market}/{date} Grouped Daily ( Bars )
StocksEquitiesApi v2_aggs_ticker_ticker_prev_get GET v2/aggs/ticker/{ticker}/prev Previous Close
StocksEquitiesApi v2_aggs_ticker_ticker_range_multiplier_timespan_from_to_get GET v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates ( Bars )
StocksEquitiesApi v2_snapshot_locale_us_markets_stocks_direction_get GET v2/snapshot/locale/us/markets/stocks/{direction} Snapshot - Gainers / Losers
StocksEquitiesApi v2_snapshot_locale_us_markets_stocks_tickers_get GET v2/snapshot/locale/us/markets/stocks/tickers Snapshot - All Tickers
StocksEquitiesApi v2_snapshot_locale_us_markets_stocks_tickers_ticker_get GET v2/snapshot/locale/us/markets/stocks/tickers/{ticker} Snapshot - Single Ticker
StocksEquitiesApi v2_ticks_stocks_nbbo_ticker_date_get GET v2/ticks/stocks/nbbo/{ticker}/{date} Historic Quotes ( NBBO )
StocksEquitiesApi v2_ticks_stocks_trades_ticker_date_get GET v2/ticks/stocks/trades/{ticker}/{date} Historic Trades

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key

Example

	auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{
		Key: "APIKEY",
		Prefix: "Bearer", // Omit if not necessary.
	})
    r, err := client.Service.Operation(auth, args)

Author

Dependencies

~16MB
~273K SLoC