get the list of most recent trades for a particular symbol https://ascendex.github.io/ascendex-pro-api/#market-trades :param str symbol: unified symbol of the market to fetch trades for :param int [since]: timestamp in ms of the earliest trade to fetch :par
(self, symbol: str, since: Int = None, limit: Int = None, params={})
| 1353 | }, market) |
| 1354 | |
| 1355 | def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]: |
| 1356 | """ |
| 1357 | get the list of most recent trades for a particular symbol |
| 1358 | |
| 1359 | https://ascendex.github.io/ascendex-pro-api/#market-trades |
| 1360 | |
| 1361 | :param str symbol: unified symbol of the market to fetch trades for |
| 1362 | :param int [since]: timestamp in ms of the earliest trade to fetch |
| 1363 | :param int [limit]: the maximum amount of trades to fetch |
| 1364 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1365 | :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/?id=public-trades>` |
| 1366 | """ |
| 1367 | self.load_markets() |
| 1368 | market = self.market(symbol) |
| 1369 | request = { |
| 1370 | 'symbol': market['id'], |
| 1371 | } |
| 1372 | if limit is not None: |
| 1373 | request['n'] = limit # max 100 |
| 1374 | response = self.v1PublicGetTrades(self.extend(request, params)) |
| 1375 | # |
| 1376 | # { |
| 1377 | # "code":0, |
| 1378 | # "data":{ |
| 1379 | # "m":"trades", |
| 1380 | # "symbol":"BTC-PERP", |
| 1381 | # "data":[ |
| 1382 | # {"p":"9128.5","q":"0.0030","ts":1590229002385,"bm":false,"seqnum":180143985289898554}, |
| 1383 | # {"p":"9129","q":"0.0030","ts":1590229002642,"bm":false,"seqnum":180143985289898587}, |
| 1384 | # {"p":"9129.5","q":"0.0030","ts":1590229021306,"bm":false,"seqnum":180143985289899043} |
| 1385 | # ] |
| 1386 | # } |
| 1387 | # } |
| 1388 | # |
| 1389 | records = self.safe_dict(response, 'data', {}) |
| 1390 | trades = self.safe_list(records, 'data', []) |
| 1391 | return self.parse_trades(trades, market, since, limit) |
| 1392 | |
| 1393 | def parse_order_status(self, status: Str): |
| 1394 | statuses = { |
nothing calls this directly
no test coverage detected