Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@ or by providing attributes to :code:`Account(api_key='***', api_secret='***')`

...

- Get orderbook via websocket

.. testcode::

import asyncio
import cryptocom.exchange as cro

async def main():
exchange = cro.Exchange()
cro_usdt = cro.Pair(exchange_name="CRO_USDT", price_precision=4, quantity_precision=6)
async for orderbook in exchange.listen_orderbook(cro_usdt):
print(f"First buy in orderbook: {orderbook.buys[0]}")


asyncio.run(main())

.. testoutput::
:hide:

...
Indices and tables
==================

Expand Down