(self, trade: dict, market: Market = None)
| 4787 | return candles |
| 4788 | |
| 4789 | def parse_trade(self, trade: dict, market: Market = None) -> Trade: |
| 4790 | if 'isDustTrade' in trade: |
| 4791 | return self.parse_dust_trade(trade, market) |
| 4792 | # |
| 4793 | # aggregate trades |
| 4794 | # https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list |
| 4795 | # |
| 4796 | # { |
| 4797 | # "a": 26129, # Aggregate tradeId |
| 4798 | # "p": "0.01633102", # Price |
| 4799 | # "q": "4.70443515", # Quantity |
| 4800 | # "f": 27781, # First tradeId |
| 4801 | # "l": 27781, # Last tradeId |
| 4802 | # "T": 1498793709153, # Timestamp |
| 4803 | # "m": True, # Was the buyer the maker? |
| 4804 | # "M": True # Was the trade the best price match? |
| 4805 | # } |
| 4806 | # |
| 4807 | # REST: aggregate trades for swap & future(both linear and inverse) |
| 4808 | # |
| 4809 | # { |
| 4810 | # "a": "269772814", |
| 4811 | # "p": "25864.1", |
| 4812 | # "q": "3", |
| 4813 | # "f": "662149354", |
| 4814 | # "l": "662149355", |
| 4815 | # "T": "1694209776022", |
| 4816 | # "m": False, |
| 4817 | # } |
| 4818 | # |
| 4819 | # recent public trades and old public trades |
| 4820 | # https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#recent-trades-list |
| 4821 | # https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#old-trade-lookup-market_data |
| 4822 | # |
| 4823 | # { |
| 4824 | # "id": 28457, |
| 4825 | # "price": "4.00000100", |
| 4826 | # "qty": "12.00000000", |
| 4827 | # "time": 1499865549590, |
| 4828 | # "isBuyerMaker": True, |
| 4829 | # "isBestMatch": True |
| 4830 | # } |
| 4831 | # |
| 4832 | # private trades |
| 4833 | # https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#account-trade-list-user_data |
| 4834 | # |
| 4835 | # { |
| 4836 | # "symbol": "BNBBTC", |
| 4837 | # "id": 28457, |
| 4838 | # "orderId": 100234, |
| 4839 | # "price": "4.00000100", |
| 4840 | # "qty": "12.00000000", |
| 4841 | # "commission": "10.10000000", |
| 4842 | # "commissionAsset": "BNB", |
| 4843 | # "time": 1499865549590, |
| 4844 | # "isBuyer": True, |
| 4845 | # "isMaker": False, |
| 4846 | # "isBestMatch": True |
nothing calls this directly
no test coverage detected