@@ -16,24 +16,35 @@ pip install __PYTHON_PACKAGE_NAME__
1616
1717## Usage
1818
19- ### Async
19+ ### Sync
2020
2121``` Python
22- from __PYTHON_PACKAGE_KEY__ import __ExchangeName__Async
22+ from __PYTHON_PACKAGE_KEY__ import __ExchangeName__Sync
2323
24- async def main ():
25- instance = __ExchangeName__Async({})
26- order = await instance.create_order(__EXAMPLE_SYMBOL__ , " limit" , " buy" , 1 , 100000 )
24+ def main ():
25+ instance = __ExchangeName__Sync({})
26+ ob = instance.fetch_order_book(" __EXAMPLE_SYMBOL__" )
27+ print (ob)
28+ #
29+ # balance = instance.fetch_balance()
30+ # order = instance.create_order("__EXAMPLE_SYMBOL__", "limit", "buy", 1, 100000)
2731```
2832
29- ### Sync
33+ ### Async
3034
3135``` Python
32- from __PYTHON_PACKAGE_KEY__ import __ExchangeName__Sync
36+ import asyncio
37+ from __PYTHON_PACKAGE_KEY__ import __ExchangeName__Async
3338
34- def main ():
35- instance = __ExchangeName__Sync({})
36- order = instance.create_order(__EXAMPLE_SYMBOL__ , " limit" , " buy" , 1 , 100000 )
39+ async def main ():
40+ instance = __ExchangeName__Async({})
41+ ob = await instance.fetch_order_book(" __EXAMPLE_SYMBOL__" )
42+ print (ob)
43+ #
44+ # balance = await instance.fetch_balance()
45+ # order = await instance.create_order("__EXAMPLE_SYMBOL__", "limit", "buy", 1, 100000)
46+
47+ asyncio.run(main())
3748```
3849
3950### Websockets
@@ -44,6 +55,8 @@ from __PYTHON_PACKAGE_KEY__ import __ExchangeName__Ws
4455async def main ():
4556 instance = __ExchangeName__Ws({})
4657 while True :
47- orders = await instance.watch_orders(__EXAMPLE_SYMBOL__ )
58+ ob = await instance.watch_order_book(" __EXAMPLE_SYMBOL__" )
59+ print (ob)
60+ # orders = await instance.watch_orders("__EXAMPLE_SYMBOL__")
4861```
4962
0 commit comments