-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added responses to GETTransactionsStream
Added stream_transaction.py in ./bin
- Loading branch information
1 parent
0a469f1
commit 1dcd05e
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import asyncio | ||
|
||
from async_v20 import OandaClient | ||
|
||
|
||
async def stream(): | ||
async with OandaClient() as client: | ||
async for rsp in await client.stream_transactions(): | ||
if 'HEARTBEAT' not in rsp: | ||
print(next(iter(rsp.values())).series()) | ||
|
||
|
||
loop = asyncio.get_event_loop() | ||
loop.run_until_complete(stream()) |