get the list of most recent trades for a particular symbol https://docs.delta.exchange/#get-public-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 :param int [limi
(self, symbol: str, since: Int = None, limit: Int = None, params={})
| 1522 | }, market) |
| 1523 | |
| 1524 | def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]: |
| 1525 | """ |
| 1526 | get the list of most recent trades for a particular symbol |
| 1527 | |
| 1528 | https://docs.delta.exchange/#get-public-trades |
| 1529 | |
| 1530 | :param str symbol: unified symbol of the market to fetch trades for |
| 1531 | :param int [since]: timestamp in ms of the earliest trade to fetch |
| 1532 | :param int [limit]: the maximum amount of trades to fetch |
| 1533 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1534 | :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/?id=public-trades>` |
| 1535 | """ |
| 1536 | self.load_markets() |
| 1537 | market = self.market(symbol) |
| 1538 | request = { |
| 1539 | 'symbol': market['id'], |
| 1540 | } |
| 1541 | response = self.publicGetTradesSymbol(self.extend(request, params)) |
| 1542 | # |
| 1543 | # { |
| 1544 | # "result":[ |
| 1545 | # { |
| 1546 | # "buyer_role":"maker", |
| 1547 | # "price":"15896.5", |
| 1548 | # "seller_role":"taker", |
| 1549 | # "size":241, |
| 1550 | # "symbol":"BTCUSDT", |
| 1551 | # "timestamp":1605376684714595 |
| 1552 | # } |
| 1553 | # ], |
| 1554 | # "success":true |
| 1555 | # } |
| 1556 | # |
| 1557 | result = self.safe_list(response, 'result', []) |
| 1558 | return self.parse_trades(result, market, since, limit) |
| 1559 | |
| 1560 | def parse_ohlcv(self, ohlcv, market: Market = None) -> list: |
| 1561 | # |
nothing calls this directly
no test coverage detected