()
| 15 | |
| 16 | |
| 17 | async def example(): |
| 18 | exchange = ccxt.binance({ |
| 19 | 'apiKey': 'MY_API_KEY', |
| 20 | 'secret': 'MY_SECRET', |
| 21 | }) |
| 22 | exchange.set_sandbox_mode(True) |
| 23 | exchange.verbose = True # uncomment for debugging purposes if necessary |
| 24 | # load markets |
| 25 | await exchange.load_markets() |
| 26 | symbol = 'ETH/USDT' |
| 27 | type = 'limit' |
| 28 | side = 'buy' |
| 29 | amount = 0.01 |
| 30 | price = 1000 |
| 31 | orders = [] |
| 32 | for i in range(1, 5): |
| 33 | response = await exchange.create_order_ws(symbol, type, side, amount, price) |
| 34 | price += i |
| 35 | orders.append(response) |
| 36 | print(orders) |
| 37 | |
| 38 | await exchange.close() |
| 39 | |
| 40 | |
| 41 | asyncio.run(example()) |
no test coverage detected
searching dependent graphs…