Skip to content

Commit b13d11e

Browse files
committed
add gitter badge
1 parent 8093636 commit b13d11e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![PyPI](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade)
33
[![Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade)
44
[![Release)](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases)
5+
[![Gitter](https://img.shields.io/gitter/room/:user/tastyware)](https://matrix.to/#/#tastyware:gitter.im)
56

67
# Tastytrade Python SDK
78

@@ -48,17 +49,18 @@ from tastytrade.dxfeed import Quote
4849
async with DXLinkStreamer(session) as streamer:
4950
subs_list = ['SPY'] # list of symbols to subscribe to
5051
await streamer.subscribe(Quote, subs_list)
51-
# this example fetches quotes once, then exits
52+
# fetch a single quote
5253
quote = await streamer.get_event(Quote)
5354
print(quote)
55+
# or multiple quotes...
56+
async for quote in streamer.listen(Quote):
57+
print(quote)
5458
```
5559

5660
```python
5761
>>> Quote(event_symbol='SPY', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='Q', bid_price=411.58, bid_size=400.0, ask_time=0, ask_exchange_code='Q', ask_price=411.6, ask_size=1313.0)
5862
```
5963

60-
Note that this is asynchronous code, so you can't run it as is unless you're using a Jupyter notebook or something similar.
61-
6264
## Getting current positions
6365

6466
```python
@@ -118,13 +120,11 @@ async with DXLinkStreamer(session) as streamer:
118120
```
119121

120122
```python
121-
>>> [Greeks(event_symbol='.SPLG230616C23', event_time=0, event_flags=0, index=7235129486797176832, time=1684559855338, sequence=0, price=26.3380972233688, volatility=0.396983376650804, delta=0.999999999996191, gamma=4.81989763184255e-12, theta=-2.5212017514875e-12, rho=0.01834504287973133, vega=3.7003015672215e-12)]
123+
>>> Greeks(event_symbol='.SPLG230616C23', event_time=0, event_flags=0, index=7235129486797176832, time=1684559855338, sequence=0, price=26.3380972233688, volatility=0.396983376650804, delta=0.999999999996191, gamma=4.81989763184255e-12, theta=-2.5212017514875e-12, rho=0.01834504287973133, vega=3.7003015672215e-12)
122124
```
123125

124126
For more examples, check out the [documentation](https://tastyworks-api.readthedocs.io/en/latest/).
125127

126128
## Disclaimer
127129

128130
This is an unofficial SDK for Tastytrade. There is no implied warranty for any actions and results which arise from using it.
129-
130-
![Alt](https://repobeats.axiom.co/api/embed/292b0cb5dd25a26e9abc6e5f8d8e180461d9faf8.svg "Repobeats analytics image")

docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
:target: https://github.com/tastyware/tastytrade/releases
1515
:alt: Release
1616

17+
.. image:: https://img.shields.io/gitter/room/:user/tastyware
18+
:target: https://matrix.to/#/#tastyware:gitter.im
19+
:alt: Gitter
20+
1721
Tastytrade Python SDK
1822
=====================
1923

0 commit comments

Comments
 (0)