Skip to content

Commit 4b3abd1

Browse files
authored
Renamed stock api funcs (#16)
* Initial release of REST endpoints functionality
1 parent 70718f5 commit 4b3abd1

16 files changed

+1505
-262
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,65 @@
55
[![Build Status](https://github.com/PyDataBlog/PolygonIO.jl/workflows/CI/badge.svg)](https://github.com/PyDataBlog/PolygonIO.jl/actions)
66
[![Coverage](https://codecov.io/gh/PyDataBlog/PolygonIO.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/PyDataBlog/PolygonIO.jl)
77
[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/PyDataBlog/PolygonIO.jl)
8+
9+
`PolygonIO.jl` is a client accessing the WebSocket and RESTful APIs of [Polygon.io](https://polygon.io/) in native [Julia](https://julialang.org/).
10+
11+
## Installation
12+
13+
To install `PolygonIO` either do
14+
15+
```julia
16+
using Pkg
17+
Pkg.add("PolygonIO")
18+
```
19+
20+
or switch to `Pkg` mode with `]` and issue
21+
22+
```julia
23+
pkg> add PolygonIO
24+
```
25+
26+
## Usage
27+
28+
```julia
29+
using PolygonIO
30+
opts = PolyOpts(API_KEY, Table.jl Supported Tabular Interface As Sink or nothing)
31+
data = API_FUNC(opts, [args...]; [kwargs...])
32+
```
33+
34+
### Example
35+
36+
```julia
37+
using PolygonIO
38+
using DataFrames
39+
40+
opts = PolyOpts(API_KEY, DataFrame)
41+
ticker_search_info = tickers(opts, "bitcoin")
42+
```
43+
44+
```julia
45+
julia> ticker_search_info = tickers(opts, "bitcoin")
46+
10×10 DataFrame
47+
Row │ ticker name market locale active currency_symbol currency_name base_curre
48+
│ String String String String Bool String String String
49+
─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
50+
1 │ X:BSVUSD Bitcoin SV - United States Dollar crypto global true USD United States Dollar BSV
51+
2 │ X:BTCJPY Bitcoin - Japanese Yen crypto global true JPY Japanese Yen BTC
52+
3 │ X:BCHGBP Bitcoin Cash - Great Britian Pou crypto global true GBP Great Britian Pound BCH
53+
4 │ X:BTCGBP Bitcoin Cash - Great Britain Pou crypto global true GBP Great Britain Pound BTC
54+
5 │ X:BCHCZK Bitcoin Cash - Czech Koruna crypto global true CZK Czech Koruna BCH
55+
6 │ X:ETHBTC Ethereum - Bitcoin crypto global true BTC Bitcoin ETH
56+
7 │ X:BTCEUR Bitcoin - Euro crypto global true EUR Euro BTC
57+
8 │ X:BCHABCUSD Bitcoin Cash ABC - United States crypto global true USD United States Dollar BCHABC
58+
9 │ X:ATMUSD Bitcoin ATM - United States Doll crypto global true USD United States Dollar ATM
59+
10 │ X:BCHUSD Bitcoin Cash - United States Dol crypto global true USD United States Dollar BCH
60+
3 columns omitted
61+
```
62+
63+
## Features
64+
65+
- [X] Full coverage of Stock API
66+
- [X] Full coverage of Forex API
67+
- [X] Full coverage of Crypto API
68+
- [X] Full coverage of Reference Data API
69+
- [ ] Full coverage of WebSocket API

docs/src/crypto.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
11
# Crypto API
2+
3+
The following endpoints are covered by the Crypto API via these functions:
4+
5+
* `last_trade_crypto_pair` => Last Trade for a Crypto Pair
6+
* `crypto_daily_open_close` => Daily Open/Close
7+
* `historic_crypto_trades` => Historic Crypto Trades
8+
* `crypto_grouped_daily_bars` => Grouped Daily (Bars)
9+
* `crypto_previous_close` => Previous Close
10+
* `crypto_aggregates_bars` => Aggregates (Bars)
11+
* `crypto_snapshot_all_tickers` => Snapshot All Tickers
12+
* `crypto_snapshot_ticker` => Snapshot Ticker
13+
* `crypto_snapshot_ticker_full_book` => Snapshot Ticker Full Book (L2)
14+
* `crypto_snapshot_gainers_losers` => Snapshot Gainers/Losers
15+
16+
Detailed information on each function can be extracted in Julia. For example;
17+
18+
```julia
19+
using PolygonIO
20+
julia>?last_trade_crypto_pair
21+
```

docs/src/forex.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11
# Forex API
2+
3+
The following endpoints are covered by the Forex API via these functions:
4+
5+
* `historic_forex_ticks` => Historic Forex Ticks
6+
* `real_time_currency_conversion` => Real-time Currency Conversion
7+
* `last_quote_currency_pair` => Last Quote for a Currency Pair
8+
* `forex_grouped_daily_bars` => Aggregates (Bars)
9+
* `forex_previous_close` => Grouped Daily (Bars)
10+
* `forex_aggregates_bars` => Previous Close
11+
* `forex_snapshot_ticker` => Snapshot - All Tickers
12+
* `forex_snapshot_all_tickers` => Snapshot - Gainers/Losers
13+
* `forex_snapshot_gainers_losers` => Snapshot - Ticker
14+
15+
Detailed information on each function can be extracted in Julia. For example;
16+
17+
```julia
18+
using PolygonIO
19+
julia>?historic_forex_ticks
20+
```

docs/src/index.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,81 @@ CurrentModule = PolygonIO
66

77
Documentation for [PolygonIO](https://github.com/PyDataBlog/PolygonIO.jl).
88

9+
`PolygonIO.jl` is a client accessing the WebSocket and RESTful APIs of [Polygon.io](https://polygon.io/) in native [Julia](https://julialang.org/).
10+
11+
## Installation
12+
13+
To install `PolygonIO` either do
14+
15+
```julia
16+
using Pkg
17+
Pkg.add("PolygonIO")
18+
```
19+
20+
or switch to `Pkg` mode with `]` and issue
21+
22+
```julia
23+
pkg> add PolygonIO
24+
```
25+
26+
## Usage
27+
28+
```julia
29+
using PolygonIO
30+
opts = PolyOpts(API_KEY, Table.jl Supported Tabular Interface As Sink or nothing)
31+
data = API_FUNC(opts, [args...]; [kwargs...])
32+
```
33+
34+
### Example
35+
36+
```julia
37+
using PolygonIO
38+
using DataFrames
39+
40+
opts = PolyOpts(API_KEY, DataFrame)
41+
ticker_search_info = tickers(opts, "bitcoin")
42+
```
43+
44+
```julia
45+
julia> ticker_search_info = tickers(opts, "bitcoin")
46+
10×10 DataFrame
47+
Row │ ticker name market locale active currency_symbol currency_name base_curre
48+
│ String String String String Bool String String String
49+
─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
50+
1 │ X:BSVUSD Bitcoin SV - United States Dollar crypto global true USD United States Dollar BSV
51+
2 │ X:BTCJPY Bitcoin - Japanese Yen crypto global true JPY Japanese Yen BTC
52+
3 │ X:BCHGBP Bitcoin Cash - Great Britian Pou crypto global true GBP Great Britian Pound BCH
53+
4 │ X:BTCGBP Bitcoin Cash - Great Britain Pou crypto global true GBP Great Britain Pound BTC
54+
5 │ X:BCHCZK Bitcoin Cash - Czech Koruna crypto global true CZK Czech Koruna BCH
55+
6 │ X:ETHBTC Ethereum - Bitcoin crypto global true BTC Bitcoin ETH
56+
7 │ X:BTCEUR Bitcoin - Euro crypto global true EUR Euro BTC
57+
8 │ X:BCHABCUSD Bitcoin Cash ABC - United States crypto global true USD United States Dollar BCHABC
58+
9 │ X:ATMUSD Bitcoin ATM - United States Doll crypto global true USD United States Dollar ATM
59+
10 │ X:BCHUSD Bitcoin Cash - United States Dol crypto global true USD United States Dollar BCH
60+
3 columns omitted
61+
```
62+
63+
## Features
64+
65+
- [X] Full coverage of Stock API
66+
- [X] Full coverage of Forex API
67+
- [X] Full coverage of Crypto API
68+
- [X] Full coverage of Reference Data API
69+
- [ ] Full coverage of WebSocket API
70+
71+
## User API Functions & Associated Upstream Endpoints
72+
73+
```@contents
74+
Pages = [
75+
"crypto.md",
76+
"forex.md",
77+
"reference.md",
78+
"stocks.md",
79+
"streaming.md"
80+
]
81+
Depth = 2
82+
```
83+
984
```@index
1085
```
1186

docs/src/reference.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
11
# Reference API
2+
3+
The following endpoints are covered by the Reference API via these functions:
4+
5+
* `tickers` => Tickers
6+
* `ticker_types` => Ticker Types
7+
* `ticker_details` => Ticker Details
8+
* `ticker_details_vX` => Ticker Details vX
9+
* `ticker_news` => Ticker News
10+
* `markets` => Markets
11+
* `locales` => Locales
12+
* `stock_splits` => Stock Splits
13+
* `stock_dividends` => Stock Dividends
14+
* `stock_financials` => Stock Financials
15+
* `market_holidays` => Market Holidays
16+
* `market_status` => Market Status
17+
* `stock_exchanges` => Stock Exchanges
18+
* `condition_mappings` => Condition Mappings
19+
* `crypto_exchanges` => Crypto Exchanges
20+
21+
Detailed information on each function can be extracted in Julia. For example;
22+
23+
```julia
24+
using PolygonIO
25+
julia>?tickers
26+
```

docs/src/stocks.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
11
# Stocks API
2+
3+
The following endpoints are covered by the Stocks API via these functions:
4+
5+
* `stocks_trades` => Trades
6+
* `stocks_quotes_nbbo` => Quotes (NBBO)
7+
* `stocks_last_trade_symbol` => Last Trade for a Symbol v2
8+
* `stocks_last_quote_symbol` => Last Quote for a Symbol v2
9+
* `stocks_daily_open_close` => Daily Open/Close
10+
* `stocks_grouped_daily_bars` => Grouped Daily Bars
11+
* `stocks_previous_close` => Previous Close
12+
* `stocks_aggregates_bars` => Aggregates (Bars)
13+
* `stocks_snapshot_all_tickers` => Snapshot All Tickers
14+
* `stocks_snapshot_ticker` => Snapshot Ticker
15+
* `stocks_snapshot_gainers_losers` => Snapshot Gainers/Losers
16+
17+
Detailed information on each function can be extracted in Julia. For example;
18+
19+
```julia
20+
using PolygonIO
21+
julia>?tickers
22+
```

src/PolygonIO.jl

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,29 @@ include("urls.jl")
1313
include("crypto_api.jl")
1414
include("forex_api.jl")
1515
include("reference_api.jl")
16-
include("stock_api.jl")
16+
include("stocks_api.jl")
1717
include("streaming_socket.jl")
1818

1919

2020

2121
######### Global export of user API ################
2222
# Reference API
2323
export PolyOpts, tickers, ticker_types, ticker_details, ticker_details_vX,
24-
ticker_news, markets, locales, stock_splits, stock_dividends,
25-
stock_financials, market_holidays, market_status, stock_exchanges,
26-
condition_mappings, crypto_exchanges,
24+
ticker_news, markets, locales, stock_splits, stock_dividends,
25+
stock_financials, market_holidays, market_status, stock_exchanges,
26+
condition_mappings, crypto_exchanges,
2727

2828
# Stock API
29-
trades, quotes_nbbo, last_trade_symbol, last_quote_symbol, daily_open_close,
30-
grouped_daily_bars, previous_close, aggregates_bars, snapshot_all_tickers,
31-
snapshot_ticker, snapshot_gainers_losers,
29+
stocks_trades, stocks_quotes_nbbo, stocks_last_trade_symbol, stocks_last_quote_symbol,
30+
stocks_daily_open_close, stocks_grouped_daily_bars, stocks_previous_close,
31+
stocks_aggregates_bars, stocks_snapshot_all_tickers, stocks_snapshot_ticker,
32+
stocks_snapshot_gainers_losers,
3233

3334
# Crypto API
34-
last_trade_crypto_pair, crypto_daily_open_close, historic_crypto_trades,
35-
crypto_grouped_daily_bars, crypto_previous_close, crypto_aggregates_bars,
36-
crypto_snapshot_all_tickers, crypto_snapshot_ticker, crypto_snapshot_ticker_full_book,
37-
crypto_snapshot_gainers_losers,
35+
last_trade_crypto_pair, crypto_daily_open_close, historic_crypto_trades,
36+
crypto_grouped_daily_bars, crypto_previous_close, crypto_aggregates_bars,
37+
crypto_snapshot_all_tickers, crypto_snapshot_ticker, crypto_snapshot_ticker_full_book,
38+
crypto_snapshot_gainers_losers,
3839

3940
# Forex API
4041
historic_forex_ticks, real_time_currency_conversion, last_quote_currency_pair,

0 commit comments

Comments
 (0)